feat : add dark theme
parent
acb8cfc638
commit
4ae2dcfb39
|
@ -13,7 +13,7 @@
|
|||
</Found>
|
||||
<NotFound>
|
||||
<MudRTLProvider RightToLeft="true">
|
||||
<MudThemeProvider IsDarkMode="true" Theme="@MainTheme.MyCustomTheme" />
|
||||
<MudThemeProvider IsDarkMode="@MainTheme.IsDarkMode" Theme="@MainTheme.MyCustomTheme" />
|
||||
<MudDialogProvider />
|
||||
<MudSnackbarProvider />
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<AuthorizeView>
|
||||
<Authorized>
|
||||
<MudRTLProvider RightToLeft="true">
|
||||
<MudThemeProvider IsDarkMode="false" Theme="@MainTheme.MyCustomTheme" />
|
||||
<MudThemeProvider IsDarkMode="@MainTheme.IsDarkMode" Theme="@MainTheme.MyCustomTheme" />
|
||||
<MudDialogProvider />
|
||||
<MudSnackbarProvider />
|
||||
<RadzenContextMenu />
|
||||
|
@ -53,7 +53,9 @@
|
|||
<MudText Color="Color.Inherit" Typo="Typo.caption">@_user?.PhoneNumber</MudText>
|
||||
</MudStack>
|
||||
<MudSpacer />
|
||||
@* <MudIconButton Size="Size.Medium" Color="Color.Inherit" Icon="@Icons.Material.Outlined.Settings"/> *@
|
||||
<MudToggleIconButton @bind-Toggled="@MainTheme.IsDarkMode"
|
||||
Icon="@Icons.Material.Outlined.DarkMode" Color="@Color.Default" Title="تاریک"
|
||||
ToggledIcon="@Icons.Material.Filled.LightMode" ToggledColor="@Color.Default" ToggledTitle="روشن" />
|
||||
<MudIconButton Size="Size.Medium" Color="Color.Error" OnClick="LogoutAsync" Icon="@Icons.Material.Outlined.ExitToApp" />
|
||||
</MudAppBar>
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
public static class Address
|
||||
{
|
||||
#if DEBUG
|
||||
public static string BaseAddress = "http://localhost:32770/api";
|
||||
//public static string BaseAddress = "https://api.vesmook.com/api";
|
||||
//public static string BaseAddress = "http://localhost:32770/api";
|
||||
public static string BaseAddress = "https://api.vesmook.com/api";
|
||||
#else
|
||||
public static string BaseAddress = "https://api.vesmook.com/api";
|
||||
#endif
|
||||
|
|
|
@ -23,4 +23,5 @@ public static class MainTheme
|
|||
Secondary = "#E59F2E",
|
||||
}
|
||||
};
|
||||
public static bool IsDarkMode { get; set; } = true;
|
||||
}
|
Loading…
Reference in New Issue