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,19 +53,21 @@
|
|||
<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>
|
||||
|
||||
<MudDrawer @bind-Open="@open" Breakpoint="Breakpoint.MdAndUp" Elevation="1" Variant="@DrawerVariant.Responsive">
|
||||
<SideBarUi/>
|
||||
<SideBarUi />
|
||||
</MudDrawer>
|
||||
|
||||
<MudGrid Spacing="0">
|
||||
|
||||
<MudItem md="3" lg="2">
|
||||
<MudHidden Breakpoint="Breakpoint.SmAndDown">
|
||||
<SideBarUi/>
|
||||
<SideBarUi />
|
||||
</MudHidden>
|
||||
</MudItem>
|
||||
<MudItem sm="12" md="9" lg="10">
|
||||
|
@ -77,7 +79,7 @@
|
|||
</MudGrid>
|
||||
</MudLayout>
|
||||
<div dir="ltr">
|
||||
<PWAUpdater Align="PWAUpdater.Aligns.Buttom" Text="@_updateText" ButtonCaption="اپدیت کنید"/>
|
||||
<PWAUpdater Align="PWAUpdater.Aligns.Buttom" Text="@_updateText" ButtonCaption="اپدیت کنید" />
|
||||
</div>
|
||||
</MudRTLProvider>
|
||||
|
||||
|
@ -90,9 +92,9 @@
|
|||
|
||||
<MudLayout>
|
||||
<div>
|
||||
<LoginPage/>
|
||||
<LoginPage />
|
||||
<div dir="ltr">
|
||||
<PWAUpdater Text="@_updateText" ButtonCaption="اپدیت کنید"/>
|
||||
<PWAUpdater Text="@_updateText" ButtonCaption="اپدیت کنید" />
|
||||
</div>
|
||||
</div>
|
||||
</MudLayout>
|
||||
|
@ -110,7 +112,7 @@
|
|||
private async Task LogoutAsync()
|
||||
{
|
||||
await UserUtility.LogoutAsync();
|
||||
NavigationManager.NavigateTo("login",true,true);
|
||||
NavigationManager.NavigateTo("login", true, true);
|
||||
}
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
|
|
|
@ -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