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