-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#115 chore: display themes ordered and add Theme after each name
- Loading branch information
1 parent
a5f38f3
commit b93d4a1
Showing
3 changed files
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,8 @@ | |
@using Microsoft.Extensions.Options | ||
<div class="d-flex align-items-center justify-content-end"> | ||
<RadzenDropDown TValue="string" AllowClear="false" class="mx-0 mx-lg-3" | ||
Data="@Enum.GetNames(typeof(Style)).Select(s => s.ToString())" | ||
Value="Style.Default.ToString()" | ||
Data="@(Enum.GetNames(typeof(Style)).Select(s => $"{s} Theme").OrderBy(s => s))" | ||
Value="@($"{Style.Default} Theme")" | ||
ValueChanged="OnStyleChanged"> | ||
</RadzenDropDown> | ||
<RadzenProfileMenu class="text-end" Click="MenuClick"> | ||
|
@@ -35,7 +35,8 @@ | |
string GreetingMessage => $"Hi, {_user}"; | ||
string GravatarEmail => _email ?? "[email protected]"; | ||
|
||
async Task OnStyleChanged(string styleName) { | ||
async Task OnStyleChanged(string value) { | ||
var styleName = value.Split(" ").First(); | ||
var style = Enum.Parse<Style>(styleName); | ||
await _jsRuntime.InvokeVoidAsync("setStylesheet", | ||
StyleUtils.GetStylesheet(style)); | ||
|