Improved ui and popup

This commit is contained in:
BOT Alex 2023-07-06 20:44:52 +02:00
parent bb125e7c7d
commit 7a1d873ae6
4 changed files with 15 additions and 4 deletions

View File

@ -8,7 +8,7 @@
public int TotalAnswers { get => NumOfCorrects + NumOfWrongs; } public int TotalAnswers { get => NumOfCorrects + NumOfWrongs; }
public float Accuracy public float Accuracy
{ {
get get
{ {
return (float)NumOfCorrects / (float)TotalAnswers; return (float)NumOfCorrects / (float)TotalAnswers;
} }

View File

@ -24,7 +24,7 @@ namespace LearningChineseFixed
{ {
config.SnackbarConfiguration.ShowTransitionDuration = 100; config.SnackbarConfiguration.ShowTransitionDuration = 100;
config.SnackbarConfiguration.HideTransitionDuration = 100; config.SnackbarConfiguration.HideTransitionDuration = 100;
config.SnackbarConfiguration.VisibleStateDuration = 7500; config.SnackbarConfiguration.VisibleStateDuration = 5000;
config.SnackbarConfiguration.PositionClass = Defaults.Classes.Position.BottomCenter; config.SnackbarConfiguration.PositionClass = Defaults.Classes.Position.BottomCenter;
}); });
builder.Services.AddBlazoredLocalStorage(); builder.Services.AddBlazoredLocalStorage();

View File

@ -32,8 +32,6 @@
@*Color="@(selectedCorrect ? Color.Success : Color.Error)"*@ @*Color="@(selectedCorrect ? Color.Success : Color.Error)"*@
<MudButton Disabled="@(!(Answers.Any(x=>x.isSelected)))" OnClick="()=>RemoveCCharFromSelection()" Variant="Variant.Outlined">Avoid</MudButton> <MudButton Disabled="@(!(Answers.Any(x=>x.isSelected)))" OnClick="()=>RemoveCCharFromSelection()" Variant="Variant.Outlined">Avoid</MudButton>
} }
<MudButton Color="Color.Default" Variant="Variant.Outlined" OnClick="ShowMeaning">Meaning</MudButton>
<MudButton Color="Color.Default" Variant="Variant.Outlined" OnClick="SayCorrectChar">Speech</MudButton>
</MudStack> </MudStack>
<MudContainer> <MudContainer>
<MudPaper Class="pa-16 ma-2 rounded-xl mud-dark" Elevation="1"> <MudPaper Class="pa-16 ma-2 rounded-xl mud-dark" Elevation="1">
@ -66,6 +64,12 @@
</MudGrid> </MudGrid>
</MudContainer> </MudContainer>
<MudSpacer/> <MudSpacer/>
<MudContainer Class="justify-center d-flex">
<MudStack Row=true>
<MudButton Color="Color.Default" Variant="Variant.Outlined" OnClick="ShowMeaning">Meaning</MudButton>
<MudButton Color="Color.Default" Variant="Variant.Outlined" OnClick="SayCorrectChar">Speech</MudButton>
</MudStack>
</MudContainer>
<MudContainer Class="pb-8 justify-center align-center d-flex"> <MudContainer Class="pb-8 justify-center align-center d-flex">
@if (!Answers.Any(x => x == null)) @if (!Answers.Any(x => x == null))
{ {

File diff suppressed because one or more lines are too long