Fixed some things

This commit is contained in:
BOT Alex 2023-06-29 10:28:51 +02:00
parent 7aa40c171b
commit f634474923
6 changed files with 20 additions and 57 deletions

View File

@ -20,6 +20,8 @@ namespace LearningChineseFixed
{ {
config.SnackbarConfiguration.ShowTransitionDuration = 100; config.SnackbarConfiguration.ShowTransitionDuration = 100;
config.SnackbarConfiguration.HideTransitionDuration = 100; config.SnackbarConfiguration.HideTransitionDuration = 100;
config.SnackbarConfiguration.VisibleStateDuration = 3000;
config.SnackbarConfiguration.PositionClass = Defaults.Classes.Position.BottomCenter;
}); });
builder.Services.AddBlazoredLocalStorage(); builder.Services.AddBlazoredLocalStorage();

View File

@ -35,7 +35,7 @@
</MudContainer> </MudContainer>
@code{ @code{
int numOfChunks = 100; //Exclusive index 0 int numOfChunks = 197; //Exclusive index 0
int selectedChunk = 0; int selectedChunk = 0;
protected override void OnInitialized() protected override void OnInitialized()

View File

@ -27,7 +27,9 @@
<MudContainer Class="justify-center d-flex ma-0" Style="height: 100%;"> <MudContainer Class="justify-center d-flex ma-0" Style="height: 100%;">
<MudStack Class="d-flex"> <MudStack Class="d-flex">
<MudStack Row=true Class="pt-2 d-flex justify-center"> <MudStack Row=true Class="pt-2 d-flex justify-center">
<MudButton Color="Color.Default" OnClick="RemoveCCharFromSelection" Variant="Variant.Outlined">Skip</MudButton> <MudButton Color="Color.Default" 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="ShowPinyin">Pinyin</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">
@ -190,4 +192,14 @@
Console.WriteLine("Remaining CChars: " + DontSkipTheseCChar); Console.WriteLine("Remaining CChars: " + DontSkipTheseCChar);
GenerateQuestion(); GenerateQuestion();
} }
public void ShowMeaning()
{
Snackbar.Add($"<b>Definition:</b> {GetCorrectCChar().definition}", Severity.Info);
}
public void ShowPinyin()
{
Snackbar.Add($"<b>Pinyin:</b> {GetCorrectCChar().pinyin.ToTitleCase()}", Severity.Info);
}
} }

View File

@ -8,7 +8,7 @@
}, },
"dotnetRunMessages": true, "dotnetRunMessages": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "http://localhost:5198;http:/0.0.0.0:420/" "applicationUrl": "http://localhost:5198;http://0.0.0.0:420/"
}, },
"IIS Express": { "IIS Express": {
"commandName": "IISExpress", "commandName": "IISExpress",
@ -23,7 +23,7 @@
"windowsAuthentication": false, "windowsAuthentication": false,
"anonymousAuthentication": true, "anonymousAuthentication": true,
"iisExpress": { "iisExpress": {
"applicationUrl": "http://localhost:24989", "applicationUrl": "http://localhost:7860",
"sslPort": 0 "sslPort": 0
} }
} }

View File

@ -1,21 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.19" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.19" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="6.0.19" />
<PackageReference Include="MudBlazor" Version="6.5.0" />
</ItemGroup>
<ItemGroup>
<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js" />
</ItemGroup>
</Project>

View File

@ -1,30 +0,0 @@
{
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
},
"Mudblazor.Template": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": "true",
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:5001;http://0.0.0.0:420"
}
},
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:65283",
"sslPort": 44398
}
}
}