diff --git a/JournalApp.Tests/JournalApp.Tests.csproj b/JournalApp.Tests/JournalApp.Tests.csproj index 8fd76fb..bd5962a 100644 --- a/JournalApp.Tests/JournalApp.Tests.csproj +++ b/JournalApp.Tests/JournalApp.Tests.csproj @@ -6,10 +6,10 @@ - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/JournalApp/Components/DataPointView.razor b/JournalApp/Components/DataPointView.razor index 213f80a..e63bebc 100644 --- a/JournalApp/Components/DataPointView.razor +++ b/JournalApp/Components/DataPointView.razor @@ -27,7 +27,7 @@ else if (Point.Type == PointType.Sleep)
@((Point.SleepHours ?? 0).ToString("00.0")) - +
} @@ -37,27 +37,27 @@ else if (Point.Type == PointType.Scale) } else if (Point.Type == PointType.LowToHigh) { - - None - Low - Medium - High + + None + Low + Medium + High } else if (Point.Type == PointType.MildToSevere) { - - None - Mild - Moderate - Severe + + None + Mild + Moderate + Severe } else if (Point.Type == PointType.Bool) { - - No - Yes + + No + Yes } else if (Point.Type == PointType.Number) @@ -86,9 +86,9 @@ else if (Point.Type == PointType.Note) else if (Point.Type == PointType.Medication) {
- - No - Yes + + No + Yes Edit dose diff --git a/JournalApp/Components/EditCategoryDialog.razor b/JournalApp/Components/EditCategoryDialog.razor index bb047a5..258b948 100644 --- a/JournalApp/Components/EditCategoryDialog.razor +++ b/JournalApp/Components/EditCategoryDialog.razor @@ -5,20 +5,7 @@ -
- - - @(Category == null ? "New" : "Edit") @(Group == "Medications" ? "medication" : "category") - - - - @if (Category != null) - { - - } - - -
+ @(Category == null ? "New" : "Edit") @(Group == "Medications" ? "medication" : "category")
@@ -38,7 +25,7 @@ } else if (Group == "Medications") { -
+
@@ -52,6 +39,17 @@ Placeholder="@(Group == "Medications" ? "Start date, side effects, etc" : "Explanation, scoring criteria, etc")" /> + + + @if (Category != null) + { + Delete + } + + Cancel + + Submit + @code { diff --git a/JournalApp/Components/EditDoseDialog.razor b/JournalApp/Components/EditDoseDialog.razor index 1772cd4..3e6a49d 100644 --- a/JournalApp/Components/EditDoseDialog.razor +++ b/JournalApp/Components/EditDoseDialog.razor @@ -5,15 +5,7 @@ -
- - - Edit day's dose - - - - -
+ Edit day's dose
@@ -34,6 +26,12 @@ } + + + Cancel + + Submit +
@code { diff --git a/JournalApp/Components/EditNoteDialog.razor b/JournalApp/Components/EditNoteDialog.razor index c18a30d..cfa0f90 100644 --- a/JournalApp/Components/EditNoteDialog.razor +++ b/JournalApp/Components/EditNoteDialog.razor @@ -5,20 +5,18 @@ -
- - - @Title - - - - -
+ @Title
- + + + + Cancel + + Submit +
@code { diff --git a/JournalApp/JournalApp.csproj b/JournalApp/JournalApp.csproj index 79b7fb3..36caa77 100644 --- a/JournalApp/JournalApp.csproj +++ b/JournalApp/JournalApp.csproj @@ -48,7 +48,7 @@ - + @@ -60,7 +60,7 @@ - + diff --git a/JournalApp/Pages/Calendar/ColorPickerDialog.razor b/JournalApp/Pages/Calendar/ColorPickerDialog.razor index 58d8596..b2ed43a 100644 --- a/JournalApp/Pages/Calendar/ColorPickerDialog.razor +++ b/JournalApp/Pages/Calendar/ColorPickerDialog.razor @@ -6,9 +6,19 @@ @inject KeyEventService KeyEventService + + Pick color + + + + + Cancel + + Submit + @code { @@ -24,6 +34,11 @@ KeyEventService.Entered(() => Submit()); } + void Cancel() + { + KeyEventService.CancelDialog(MudDialog); + } + void Submit() { KeyEventService.CloseDialog(MudDialog, SelectedColor); diff --git a/JournalApp/Pages/Index.razor b/JournalApp/Pages/Index.razor index d390725..32c8380 100644 --- a/JournalApp/Pages/Index.razor +++ b/JournalApp/Pages/Index.razor @@ -59,64 +59,68 @@ continue; } -
+ @if (!string.IsNullOrEmpty(group.Key)) { - - @if (group.Key == "Medications") - { - @("Medications taken") - } - else if (group.Key == "Notes") - { - @("Today's notes") - } - + + + @if (group.Key == "Medications") + { + @("Medications taken") + } + else if (group.Key == "Notes") + { + @("Today's notes") + } + + } -
    - @foreach (var category in group.OrderBy(x => x.Index).ThenBy(x => x.Name)) - { - @foreach (var point in _day.Points.Where(x => !x.Deleted && x.Category.Guid == category.Guid && x.Type == category.Type).OrderBy(x => x.CreatedAt)) + +
      + @foreach (var category in group.OrderBy(x => x.Index).ThenBy(x => x.Name)) { -
    • - @if (!string.IsNullOrEmpty(category.Name)) - { -
      - - @(DataPointView.GetHeaderText(point)) - + @foreach (var point in _day.Points.Where(x => !x.Deleted && x.Category.Guid == category.Guid && x.Type == category.Type).OrderBy(x => x.CreatedAt)) + { +
    • + @if (!string.IsNullOrEmpty(category.Name)) + { +
      + + @(DataPointView.GetHeaderText(point)) + +
      + } + + @if (!category.SingleLine) + { + + } + +
      +
      - } - - @if (!category.SingleLine) - { - - } - -
      - -
      -
    • + + } } - } -
    +
+ -
+ @if (group.Key == null) { - Edit categories + Edit categories } else if (group.Key == "Medications") { - Edit medications + Edit medications } else if (group.Key == "Notes") { - New note + New note } -
-
+ + }
diff --git a/JournalApp/Pages/Index.razor.css b/JournalApp/Pages/Index.razor.css index 5b041de..6d6fc99 100644 --- a/JournalApp/Pages/Index.razor.css +++ b/JournalApp/Pages/Index.razor.css @@ -1,7 +1,7 @@ .main-timeline { display: flex; flex-direction: column; - gap: 0.5em; + gap: 1em; } .data-point-group { @@ -16,9 +16,6 @@ gap: 1em; } -.data-point-group-footer { -} - .data-point-container { display: flex; flex-wrap: wrap; diff --git a/JournalApp/Pages/MainLayout.razor b/JournalApp/Pages/MainLayout.razor index 5f8b853..5215e8c 100644 --- a/JournalApp/Pages/MainLayout.razor +++ b/JournalApp/Pages/MainLayout.razor @@ -53,7 +53,7 @@ LayoutProperties = new() { AppbarHeight = "4em", - DefaultBorderRadius = "1.0em", + DefaultBorderRadius = "2.0em", }, Typography = new() diff --git a/JournalApp/Pages/Worksheets/WorksheetsPage.razor b/JournalApp/Pages/Worksheets/WorksheetsPage.razor index 2b5bc5c..ca4b6a0 100644 --- a/JournalApp/Pages/Worksheets/WorksheetsPage.razor +++ b/JournalApp/Pages/Worksheets/WorksheetsPage.razor @@ -30,22 +30,24 @@ @foreach (var group in WorksheetGroups) { -
+ @if (!string.IsNullOrEmpty(group.Key)) { -
+ @group.Key -
+ } -
    - @foreach (var ws in group) - { - - } -
-
+ +
    + @foreach (var ws in group) + { + + } +
+
+ }
diff --git a/JournalApp/Pages/Worksheets/WorksheetsPage.razor.css b/JournalApp/Pages/Worksheets/WorksheetsPage.razor.css index 266194f..6ccdbab 100644 --- a/JournalApp/Pages/Worksheets/WorksheetsPage.razor.css +++ b/JournalApp/Pages/Worksheets/WorksheetsPage.razor.css @@ -1,7 +1,7 @@ .worksheet-group-list { display: flex; flex-direction: column; - gap: 2em; + gap: 1em; } .worksheet-group { @@ -12,7 +12,7 @@ .worksheet-group-items { display: flex; flex-direction: column; - gap: 1em; + gap: 2em; } .worksheet-group-toc { diff --git a/JournalApp/wwwroot/app.css b/JournalApp/wwwroot/app.css index cf97a35..02c0f8b 100644 --- a/JournalApp/wwwroot/app.css +++ b/JournalApp/wwwroot/app.css @@ -30,6 +30,7 @@ body { display: flex; justify-content: center; align-items: center; + box-shadow: var(--mud-elevation-4); } .switcher-header { @@ -61,7 +62,7 @@ h1, h2, h3, h4, h5, h6 { color: var(--mud-palette-text-primary); } -.mud-dialog .mud-dialog-title, .page-header { +.page-header { z-index: 999; display: flex; flex-direction: column; @@ -70,25 +71,13 @@ h1, h2, h3, h4, h5, h6 { top: 0 !important; position: sticky !important; background-color: var(--mud-palette-background); - border-bottom: 1px solid var(--mud-palette-divider); } -.mud-dialog .mud-dialog-content, .page-body { +.page-body { width: 100%; max-width: 960px; margin: 0 auto !important; padding: 0.5em !important; -} - -.mud-message-box :not(:has(.mud-dialog-title)) .mud-dialog-content { - padding-top: 1em !important; -} - -.mud-dialog .mud-dialog-actions { - padding: 0.5em !important; -} - -.page-body { padding-bottom: 15vh !important; } @@ -96,14 +85,10 @@ h1, h2, h3, h4, h5, h6 { width: calc(100% - 1em) !important; } -.color-picker .mud-dialog-content { - padding: 0 !important; -} - .mud-form { display: flex; flex-direction: column; - gap: 1em; + gap: 0.75em; } .mud-input-text { @@ -126,7 +111,7 @@ h1, h2, h3, h4, h5, h6 { } .mud-input > textarea.mud-input-root-outlined { - margin: 0.5em !important; + margin: 0.75em !important; } .mud-radio { @@ -138,6 +123,25 @@ h1, h2, h3, h4, h5, h6 { flex-grow: 1; } +.mud-dialog, .mud-card { + padding: 0.75em !important; + gap: 0.75em !important; +} + +.mud-dialog-title, .mud-card-header { + padding: 0 !important; +} + +.mud-dialog-content, .mud-card-content { + padding: 0 !important; + margin: 0 !important; + border-radius: 0 !important; +} + +.mud-dialog-actions, .mud-card-actions { + padding: 0 !important; +} + #blazor-error-ui { background: darkorange; bottom: 0;