Skip to content

Commit

Permalink
Use Rounded icons to match overall theme
Browse files Browse the repository at this point in the history
  • Loading branch information
danielchalmers committed Jun 16, 2024
1 parent c111200 commit e4e0683
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 47 deletions.
6 changes: 3 additions & 3 deletions JournalApp/Components/DataPointView.razor
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ else if (Point.Type == PointType.Sleep)
{
<div class="d-flex align-center flex-grow-1" style="gap: 0.5em">
<MudText Class="sleep-hours" Typo="Typo.caption">@((Point.SleepHours ?? 0).ToString("00.0"))</MudText>
<MudIconButton Class="less-sleep" Icon="@Icons.Material.Filled.Remove" aria-label="Less sleep" OnClick="DecrementSleep" Disabled="@(Point.SleepHours <= 0)" Size="Size.Small" />
<MudIconButton Class="less-sleep" Icon="@Icons.Material.Rounded.Remove" aria-label="Less sleep" OnClick="DecrementSleep" Disabled="@(Point.SleepHours <= 0)" Size="Size.Small" />
<MudSlider T="decimal" @bind-NullableValue="Point.SleepHours" Variant="Variant.Filled" Min="0" Max="24" Step="0.5m" Size="Size.Large" />
<MudIconButton Class="more-sleep" Icon="@Icons.Material.Filled.Add" aria-label="More sleep" OnClick="IncrementSleep" Disabled="@(Point.SleepHours >= 24)" Size="Size.Small" />
<MudIconButton Class="more-sleep" Icon="@Icons.Material.Rounded.Add" aria-label="More sleep" OnClick="IncrementSleep" Disabled="@(Point.SleepHours >= 24)" Size="Size.Small" />
</div>
}
else if (Point.Type == PointType.Scale)
{
<MudRating @bind-SelectedValue="ScaleIndexForMudRating" FullIcon="@Icons.Material.Filled.Circle" EmptyIcon="@Icons.Material.Outlined.Circle" Color="Color.Primary" />
<MudRating @bind-SelectedValue="ScaleIndexForMudRating" FullIcon="@Icons.Material.Rounded.Circle" EmptyIcon="@Icons.Material.Rounded.Circle" Color="Color.Primary" />
}
else if (Point.Type == PointType.LowToHigh)
{
Expand Down
6 changes: 3 additions & 3 deletions JournalApp/Components/EditCategoryDialog.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
<MudDialog DefaultFocus="DefaultFocus.FirstChild" OnBackdropClick="Submit">
<TitleContent>
<div class="page-toolbar">
<MudIconButton Icon="@Icons.Material.Filled.Close" aria-label="Cancel" OnClick="Cancel" />
<MudIconButton Icon="@Icons.Material.Rounded.Close" aria-label="Cancel" OnClick="Cancel" />

<MudText Typo="Typo.h6">@(Category == null ? "New" : "Edit") @(Group == "Medications" ? "medication" : "category")</MudText>

<MudSpacer />

@if (Category != null)
{
<MudIconButton Icon="@Icons.Material.Filled.DeleteForever" aria-label="Delete forever" OnClick="Delete" />
<MudIconButton Icon="@Icons.Material.Rounded.DeleteForever" aria-label="Delete forever" OnClick="Delete" />
}

<MudIconButton Icon="@Icons.Material.Filled.Check" aria-label="Submit" OnClick="Submit" />
<MudIconButton Icon="@Icons.Material.Rounded.Check" aria-label="Submit" OnClick="Submit" />
</div>
</TitleContent>

Expand Down
4 changes: 2 additions & 2 deletions JournalApp/Components/EditDoseDialog.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<MudDialog DefaultFocus="DefaultFocus.FirstChild" OnBackdropClick="Submit">
<TitleContent>
<div class="page-toolbar">
<MudIconButton Class="cancel-button" Icon="@Icons.Material.Filled.Close" aria-label="Cancel" OnClick="Cancel" />
<MudIconButton Class="cancel-button" Icon="@Icons.Material.Rounded.Close" aria-label="Cancel" OnClick="Cancel" />

<MudText Typo="Typo.h6">Edit day's dose</MudText>

<MudSpacer />

<MudIconButton Class="submit-button" Icon="@Icons.Material.Filled.Check" aria-label="Submit" OnClick="Submit" />
<MudIconButton Class="submit-button" Icon="@Icons.Material.Rounded.Check" aria-label="Submit" OnClick="Submit" />
</div>
</TitleContent>

Expand Down
4 changes: 2 additions & 2 deletions JournalApp/Components/EditNoteDialog.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<MudDialog DefaultFocus="DefaultFocus.FirstChild" OnBackdropClick="Submit">
<TitleContent>
<div class="page-toolbar">
<MudIconButton Class="cancel-button" Icon="@Icons.Material.Filled.Close" aria-label="Cancel" OnClick="Cancel" />
<MudIconButton Class="cancel-button" Icon="@Icons.Material.Rounded.Close" aria-label="Cancel" OnClick="Cancel" />

<MudText Typo="Typo.h6">@Title</MudText>

<MudSpacer />

<MudIconButton Class="submit-button" Icon="@Icons.Material.Filled.Check" aria-label="Submit" OnClick="Submit" />
<MudIconButton Class="submit-button" Icon="@Icons.Material.Rounded.Check" aria-label="Submit" OnClick="Submit" />
</div>
</TitleContent>

Expand Down
4 changes: 2 additions & 2 deletions JournalApp/Pages/Calendar/CalendarPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

<header class="page-header">
<div class="page-toolbar">
<MudIconButton Class="close-button" Icon="@Icons.Material.Filled.ArrowBack" aria-label="Return to home" OnClick="Close" />
<MudIconButton Class="close-button" Icon="@Icons.Material.Rounded.ArrowBack" aria-label="Return to home" OnClick="Close" />

<MudText Typo="Typo.h6">Calendar</MudText>

<MudSpacer />

<MudIconButton Class="pick-palette" Icon="@Icons.Material.Filled.Palette" aria-label="Pick color palette" OnClick="OpenColorPicker" />
<MudIconButton Class="pick-palette" Icon="@Icons.Material.Rounded.Palette" aria-label="Pick color palette" OnClick="OpenColorPicker" />
</div>

<CalendarSwitcher @ref="_switcher" @bind-SelectedYear="SelectedYear" @bind-SelectedYear:after="AfterSelectedYearChanged" YearClicked="OnYearClicked" />
Expand Down
4 changes: 2 additions & 2 deletions JournalApp/Pages/Calendar/CalendarSwitcher.razor
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
@namespace JournalApp

<div class="switcher">
<MudIconButton Class="previous-button" Icon="@Icons.Material.Filled.ArrowBackIos" aria-label="Previous year" OnClick="PreviousYear" />
<MudIconButton Class="previous-button" Icon="@Icons.Material.Rounded.ArrowBackIos" aria-label="Previous year" OnClick="PreviousYear" />

<div class="switcher-header">
<MudButton Class="year-button" OnClick="OnYearClicked">
<MudText Typo="Typo.h5">@SelectedYear</MudText>
</MudButton>
</div>

<MudIconButton Class="next-button" Icon="@Icons.Material.Filled.ArrowForwardIos" aria-label="Next year" OnClick="NextYear" Disabled="@(SelectedYear >= DateTime.Now.Year)" />
<MudIconButton Class="next-button" Icon="@Icons.Material.Rounded.ArrowForwardIos" aria-label="Next year" OnClick="NextYear" Disabled="@(SelectedYear >= DateTime.Now.Year)" />
</div>

@code {
Expand Down
4 changes: 2 additions & 2 deletions JournalApp/Pages/Calendar/CalendarView.razor
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
{
<section class="calendar-month" id="calendar-month-@(month.Month)">
<header class="calendar-month-header">
<MudIconButton Icon="@Icons.Material.Filled.ArrowLeft" OnClick="async () => await PreviousMonthClicked.InvokeAsync(month.Month)" aria-label="Previous month" />
<MudIconButton Icon="@Icons.Material.Rounded.ArrowLeft" OnClick="async () => await PreviousMonthClicked.InvokeAsync(month.Month)" aria-label="Previous month" />
<MudText Typo="Typo.h4">@(month.Name)</MudText>
<MudIconButton Icon="@Icons.Material.Filled.ArrowRight" OnClick="async () => await NextMonthClicked.InvokeAsync(month.Month)" aria-label="Next month" Disabled="@(month.Month == 12 && month.Year == DateTime.Now.Year)" />
<MudIconButton Icon="@Icons.Material.Rounded.ArrowRight" OnClick="async () => await NextMonthClicked.InvokeAsync(month.Month)" aria-label="Next month" Disabled="@(month.Month == 12 && month.Year == DateTime.Now.Year)" />
</header>

<div class="mood-blocks-month">
Expand Down
30 changes: 15 additions & 15 deletions JournalApp/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,36 @@

<MudSpacer />

<MudMenu Icon="@Icons.Material.Filled.MoreVert" aria-label="Main menu" AnchorOrigin="Origin.BottomRight" TransformOrigin="Origin.BottomLeft">
<MudMenuItem Icon="@Icons.Material.Filled.Category" OnClick="ManageCategories" AutoClose="false">Categories</MudMenuItem>
<MudMenuItem Icon="@Icons.Material.Filled.Medication" OnClick="ManageMedications" AutoClose="false">Medications</MudMenuItem>
<MudMenuItem Icon="@Icons.Material.Filled.Comment" OnClick="NewNote">New note</MudMenuItem>
<MudMenuItem Icon="@Icons.Material.Filled.ShowChart" OnClick="OpenTrends" AutoClose="false">Trends</MudMenuItem>
<MudMenuItem Icon="@Icons.Material.Filled.Article" OnClick="OpenWorksheets" AutoClose="false">Worksheets</MudMenuItem>
<MudMenu Icon="@Icons.Material.Rounded.MoreVert" aria-label="Main menu" AnchorOrigin="Origin.BottomRight" TransformOrigin="Origin.BottomLeft">
<MudMenuItem Icon="@Icons.Material.Rounded.Category" OnClick="ManageCategories" AutoClose="false">Categories</MudMenuItem>
<MudMenuItem Icon="@Icons.Material.Rounded.Medication" OnClick="ManageMedications" AutoClose="false">Medications</MudMenuItem>
<MudMenuItem Icon="@Icons.Material.Rounded.Comment" OnClick="NewNote">New note</MudMenuItem>
<MudMenuItem Icon="@Icons.Material.Rounded.ShowChart" OnClick="OpenTrends" AutoClose="false">Trends</MudMenuItem>
<MudMenuItem Icon="@Icons.Material.Rounded.Article" OnClick="OpenWorksheets" AutoClose="false">Worksheets</MudMenuItem>

@if (PreferenceService.SafetyPlan != null)
{
<MudMenuItem Icon="@Icons.Material.Filled.HealthAndSafety" OnClick="OpenSafetyPlan">Safety Plan</MudMenuItem>
<MudMenuItem Icon="@Icons.Material.Rounded.HealthAndSafety" OnClick="OpenSafetyPlan">Safety Plan</MudMenuItem>
}

<MudDivider />

<MudMenuItem Icon="@Icons.Material.Filled.Campaign" OnClick="OpenFeedback">Feedback</MudMenuItem>
<MudMenuItem Icon="@Icons.Material.Filled.Share" OnClick="OpenShare">Share</MudMenuItem>
<MudMenuItem Icon="@Icons.Material.Filled.Settings" OnClick="OpenSettings" AutoClose="false">Settings</MudMenuItem>
<MudMenuItem Icon="@Icons.Material.Rounded.Campaign" OnClick="OpenFeedback">Feedback</MudMenuItem>
<MudMenuItem Icon="@Icons.Material.Rounded.Share" OnClick="OpenShare">Share</MudMenuItem>
<MudMenuItem Icon="@Icons.Material.Rounded.Settings" OnClick="OpenSettings" AutoClose="false">Settings</MudMenuItem>
</MudMenu>
</div>

<div class="switcher">
<MudIconButton Icon="@Icons.Material.Filled.ArrowBackIos" aria-label="Previous day" OnClick="PreviousDay" Disabled="@(_day.Date.DayNumber <= 1)" />
<MudIconButton Icon="@Icons.Material.Rounded.ArrowBackIos" aria-label="Previous day" OnClick="PreviousDay" Disabled="@(_day.Date.DayNumber <= 1)" />

<div class="switcher-header">
<MudButton OnClick="OpenCalendar" aria-label="Open Calendar">
<MudText Typo="Typo.h5" Align="Align.Center" GutterBottom="false">@_day.Date.ToString("ddd, MMM d")</MudText>
</MudButton>
</div>

<MudIconButton Icon="@Icons.Material.Filled.ArrowForwardIos" aria-label="Next day" OnClick="NextDay" Disabled="@(_day.Date > DateOnly.FromDateTime(DateTime.Now))" />
<MudIconButton Icon="@Icons.Material.Rounded.ArrowForwardIos" aria-label="Next day" OnClick="NextDay" Disabled="@(_day.Date > DateOnly.FromDateTime(DateTime.Now))" />
</div>
</header>

Expand Down Expand Up @@ -103,15 +103,15 @@
<footer class="data-point-group-footer">
@if (group.Key == null)
{
<MudButton Variant="Variant.Text" StartIcon="@Icons.Material.Filled.Category" OnClick="ManageCategories" FullWidth>Edit categories</MudButton>
<MudButton Variant="Variant.Text" StartIcon="@Icons.Material.Rounded.Category" OnClick="ManageCategories" FullWidth>Edit categories</MudButton>
}
else if (group.Key == "Medications")
{
<MudButton Variant="Variant.Text" StartIcon="@Icons.Material.Filled.Medication" OnClick="ManageMedications" FullWidth>Edit medications</MudButton>
<MudButton Variant="Variant.Text" StartIcon="@Icons.Material.Rounded.Medication" OnClick="ManageMedications" FullWidth>Edit medications</MudButton>
}
else if (group.Key == "Notes")
{
<MudButton Variant="Variant.Text" StartIcon="@Icons.Material.Filled.Comment" OnClick="NewNote" FullWidth>New note</MudButton>
<MudButton Variant="Variant.Text" StartIcon="@Icons.Material.Rounded.Comment" OnClick="NewNote" FullWidth>New note</MudButton>
}
</footer>
</div>
Expand Down
2 changes: 1 addition & 1 deletion JournalApp/Pages/JaPage.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void ShowTeachingTip(string name, string text, bool oneTime = false)
if (PreferenceService.Get($"tip_{name}", string.Empty) == "seen")
return;

Snackbar.Add(text, Severity.Info, key: name);
Snackbar.Add(text, Severity.Info, c => c.Icon = Icons.Material.Rounded.Info, name);

if (oneTime)
PreferenceService.Set($"tip_{name}", "seen");
Expand Down
8 changes: 4 additions & 4 deletions JournalApp/Pages/ManageCategoriesPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

<header class="page-header">
<div class="page-toolbar">
<MudIconButton Icon="@Icons.Material.Filled.ArrowBack" aria-label="Save changes and go home" OnClick="Submit" />
<MudIconButton Icon="@Icons.Material.Rounded.ArrowBack" aria-label="Save changes and go home" OnClick="Submit" />

<MudText Typo="Typo.h6">@(Group == null ? "Categories" : Group)</MudText>

<MudSpacer />

<MudIconButton Icon="@Icons.Material.Filled.Add" aria-label="Open dialog to create new one" OnClick="New" />
<MudIconButton Icon="@Icons.Material.Rounded.Add" aria-label="Open dialog to create new one" OnClick="New" />
</div>
</header>

Expand All @@ -27,15 +27,15 @@
@foreach (var c in Categories.OrderBy(c => c.Index))
{
<div id="@($"manage-category-{c.Guid}")" class="manage-category">
<MudIconButton Class="manage-category-up-button" Icon="@Icons.Material.Filled.ArrowUpward" aria-label="Move up"
<MudIconButton Class="manage-category-up-button" Icon="@Icons.Material.Rounded.ArrowUpward" aria-label="Move up"
OnClick="async () => await MoveUp(c)" Edge="Edge.Start" Disabled="c.Index <= 1" />

<MudSwitch Class="manage-category-enabled-switch" T="bool" Value="c.Enabled" ValueChanged="async (v) => await OnEnabledChanged(c, v)"
Color="Color.Primary" Style="margin-right: -0.125em;" aria-label="Show in home" />

<MudButton Class="manage-category-edit-button"
Variant="Variant.Text" OnClick="async () => await Edit(c)" Disabled="c.ReadOnly"
StartIcon="@Icons.Material.Filled.Edit" Size="Size.Large" aria-label="Make changes">@c.Name</MudButton>
StartIcon="@Icons.Material.Rounded.Edit" Size="Size.Large" aria-label="Make changes">@c.Name</MudButton>
</div>
}
}
Expand Down
2 changes: 1 addition & 1 deletion JournalApp/Pages/SafetyPlanning/SafetyPlanPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<header class="page-header">
<div class="page-toolbar">
<MudIconButton Icon="@Icons.Material.Filled.ArrowBack" aria-label="Save changes and go home" OnClick="Submit" />
<MudIconButton Icon="@Icons.Material.Rounded.ArrowBack" aria-label="Save changes and go home" OnClick="Submit" />

<MudText Typo="Typo.h6">Safety Plan</MudText>
</div>
Expand Down
8 changes: 4 additions & 4 deletions JournalApp/Pages/SettingsPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
{
<header class="page-header">
<div class="page-toolbar">
<MudIconButton Icon="@Icons.Material.Filled.ArrowBack" aria-label="Go home" OnClick="Close" />
<MudIconButton Icon="@Icons.Material.Rounded.ArrowBack" aria-label="Go home" OnClick="Close" />

<MudText Typo="Typo.h6">Settings</MudText>
</div>
Expand All @@ -36,15 +36,15 @@ else

<MudCheckBox @bind-Value="PreferenceService.HideNotes" aria-label="Hide the notes section on the home page">Hide "Today's notes"</MudCheckBox>

<MudButton StartIcon="@Icons.Material.Filled.HealthAndSafety" OnClick="SetUpSafetyPlan" Variant="Variant.Outlined" FullWidth>Set Up Safety Plan</MudButton>
<MudButton StartIcon="@Icons.Material.Rounded.HealthAndSafety" OnClick="SetUpSafetyPlan" Variant="Variant.Outlined" FullWidth>Set Up Safety Plan</MudButton>
</section>

<section class="settings-group">
<MudText Typo="Typo.h4">Data & backups</MudText>

<MudButton StartIcon="@Icons.Material.Filled.Upload" OnClick="StartExport" Variant="Variant.Outlined" FullWidth>Export</MudButton>
<MudButton StartIcon="@Icons.Material.Rounded.Upload" OnClick="StartExport" Variant="Variant.Outlined" FullWidth>Export</MudButton>

<MudButton StartIcon="@Icons.Material.Filled.Download" OnClick="PickAndStartImport" Variant="Variant.Outlined" FullWidth>Import</MudButton>
<MudButton StartIcon="@Icons.Material.Rounded.Download" OnClick="PickAndStartImport" Variant="Variant.Outlined" FullWidth>Import</MudButton>
</section>

<section class="settings-group">
Expand Down
2 changes: 1 addition & 1 deletion JournalApp/Pages/Trends/TrendsPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<header class="page-header">
<div class="page-toolbar">
<MudIconButton Icon="@Icons.Material.Filled.ArrowBack" aria-label="Go home" OnClick="Close" />
<MudIconButton Icon="@Icons.Material.Rounded.ArrowBack" aria-label="Go home" OnClick="Close" />

<MudText Typo="Typo.h6">Trends</MudText>
</div>
Expand Down
4 changes: 2 additions & 2 deletions JournalApp/Pages/Trends/TrendsSwitcher.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
@inject ILogger<TrendsSwitcher> logger

<div class="switcher">
<MudIconButton Icon="@Icons.Material.Filled.ArrowBackIos" aria-label="Previous month" OnClick="GoPrevious" />
<MudIconButton Icon="@Icons.Material.Rounded.ArrowBackIos" aria-label="Previous month" OnClick="GoPrevious" />

<div class="switcher-header">
<MudButton OnClick="() => SelectedMonth = MonthAfterCurrent">
<MudText Typo="Typo.h5">@(HeaderText)</MudText>
</MudButton>
</div>

<MudIconButton Icon="@Icons.Material.Filled.ArrowForwardIos" aria-label="Next month" OnClick="GoNext" Disabled="@(NextSelectedMonth > MonthAfterCurrent)" />
<MudIconButton Icon="@Icons.Material.Rounded.ArrowForwardIos" aria-label="Next month" OnClick="GoNext" Disabled="@(NextSelectedMonth > MonthAfterCurrent)" />
</div>

@code {
Expand Down
2 changes: 1 addition & 1 deletion JournalApp/Pages/Worksheets/WorksheetView.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@inject ILogger<WorksheetView> logger

<li class="worksheet-view">
<MudButton OnClick="OnResourceClicked" StartIcon="@Icons.Material.Filled.Link" Color="Color.Primary" Disabled="@IsLinkDisabled">
<MudButton OnClick="OnResourceClicked" StartIcon="@Icons.Material.Rounded.Link" Color="Color.Primary" Disabled="@IsLinkDisabled">
<MudText Typo="Typo.h5">@Worksheet.Title</MudText>
</MudButton>

Expand Down
4 changes: 2 additions & 2 deletions JournalApp/Pages/Worksheets/WorksheetsPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<header class="page-header">
<div class="page-toolbar">
<MudIconButton Icon="@Icons.Material.Filled.ArrowBack" aria-label="Go home" OnClick="Close" />
<MudIconButton Icon="@Icons.Material.Rounded.ArrowBack" aria-label="Go home" OnClick="Close" />
<MudText Typo="Typo.h6">Worksheets</MudText>
</div>
</header>
Expand Down Expand Up @@ -35,7 +35,7 @@
{
<header class="d-flex align-center">
<MudText Typo="Typo.h4">@group.Key</MudText>
<MudIconButton Icon="@Icons.Material.Filled.ArrowUpward" OnClick="ScrollToTop" aria-label="Scroll to top" />
<MudIconButton Icon="@Icons.Material.Rounded.ArrowUpward" OnClick="ScrollToTop" aria-label="Scroll to top" />
</header>
}

Expand Down

0 comments on commit e4e0683

Please sign in to comment.