Improved ui and popup
This commit is contained in:
parent
bb125e7c7d
commit
7a1d873ae6
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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
Loading…
Reference in New Issue