Revert "Add webUI apis to manager user's access codes"
This reverts commit c1cac55683f9688c8f7b5b6e1e52838c29126a66.
This commit is contained in:
parent
c1cac55683
commit
de1671aac9
@ -8,12 +8,12 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SharedProject\SharedProject.csproj"/>
|
||||
<ProjectReference Include="..\SharedProject\SharedProject.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0-rc.2.23480.1"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0-rc.2.23480.1"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0-rc.2.23480.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0-rc.2.23480.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0-rc.2.23480.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
@ -10,19 +10,19 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="JorgeSerrano.Json.JsonSnakeCaseNamingPolicy" Version="0.9.0"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0-rc.2.23480.1"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0-rc.2.23480.1"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0-rc.2.23480.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="SharpZipLib" Version="1.4.0"/>
|
||||
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1"/>
|
||||
<PackageReference Include="JorgeSerrano.Json.JsonSnakeCaseNamingPolicy" Version="0.9.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0-rc.2.23480.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0-rc.2.23480.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0-rc.2.23480.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="SharpZipLib" Version="1.4.0" />
|
||||
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\GameDatabase\GameDatabase.csproj"/>
|
||||
<ProjectReference Include="..\GameDatabase\GameDatabase.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -1,8 +0,0 @@
|
||||
namespace SharedProject.Models.Requests;
|
||||
|
||||
public class BindAccessCodeRequest
|
||||
{
|
||||
public string AccessCode { get; set; } = string.Empty;
|
||||
|
||||
public uint Baid { get; set; }
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Throw" Version="1.3.0"/>
|
||||
<PackageReference Include="Throw" Version="1.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"DataSettings": {
|
||||
"DanDataFileName": "dan_data.json",
|
||||
"GaidenDataFileName": "gaiden_data.json",
|
||||
"EventFolderDataFileName": "event_folder_data.json",
|
||||
"IntroDataFileName": "intro_data.json",
|
||||
"DataSettings" : {
|
||||
"DanDataFileName" : "dan_data.json",
|
||||
"GaidenDataFileName" : "gaiden_data.json",
|
||||
"EventFolderDataFileName" : "event_folder_data.json",
|
||||
"IntroDataFileName" : "intro_data.json",
|
||||
"MovieDataFileName": "movie_data.json",
|
||||
"ShopFolderDataFileName": "shop_folder_data.json",
|
||||
"TokenDataFileName": "token_data.json",
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"DbFileName": "taiko.db3"
|
||||
"DbFileName" : "taiko.db3"
|
||||
}
|
@ -1,9 +1,6 @@
|
||||
{
|
||||
"Serilog": {
|
||||
"Using": [
|
||||
"Serilog.Sinks.Console",
|
||||
"Serilog.Sinks.File"
|
||||
],
|
||||
"Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File" ],
|
||||
"MinimumLevel": {
|
||||
"Default": "Information",
|
||||
"Override": {
|
||||
@ -23,10 +20,7 @@
|
||||
"WriteTo": [
|
||||
{
|
||||
"Name": "File",
|
||||
"Args": {
|
||||
"path": "./Logs/log-.txt",
|
||||
"rollingInterval": "Day"
|
||||
}
|
||||
"Args": { "path": "./Logs/log-.txt", "rollingInterval": "Day" }
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
using GameDatabase.Entities;
|
||||
using SharedProject.Models.Requests;
|
||||
using SharedProject.Models.Requests;
|
||||
|
||||
namespace TaikoLocalServer.Controllers.Api;
|
||||
|
||||
@ -15,29 +14,10 @@ public class CardsController : BaseController<CardsController>
|
||||
}
|
||||
|
||||
[HttpDelete("{accessCode}")]
|
||||
public async Task<IActionResult> DeleteUser(string accessCode)
|
||||
public async Task<IActionResult> DeleteUser(uint baid)
|
||||
{
|
||||
var result = await cardService.DeleteCard(accessCode);
|
||||
var result = await cardService.DeleteCard(baid);
|
||||
|
||||
return result ? NoContent() : NotFound();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> BindAccessCode(BindAccessCodeRequest request)
|
||||
{
|
||||
var accessCode = request.AccessCode;
|
||||
var baid = request.Baid;
|
||||
var existingCard = await cardService.GetCardByAccessCode(accessCode);
|
||||
if (existingCard is not null)
|
||||
{
|
||||
return BadRequest("Access code already exists");
|
||||
}
|
||||
var newCard = new Card
|
||||
{
|
||||
Baid = baid,
|
||||
AccessCode = accessCode
|
||||
};
|
||||
await cardService.AddCard(newCard);
|
||||
return NoContent();
|
||||
}
|
||||
}
|
@ -13,6 +13,14 @@ public class CredentialsController : BaseController<CredentialsController>
|
||||
this.credentialService = credentialService;
|
||||
}
|
||||
|
||||
[HttpDelete("{baid}")]
|
||||
public async Task<IActionResult> DeleteUser(uint baid)
|
||||
{
|
||||
var result = await credentialService.DeleteCredential(baid);
|
||||
|
||||
return result ? NoContent() : NotFound();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> UpdatePassword(SetPasswordRequest request)
|
||||
{
|
||||
|
@ -1,23 +0,0 @@
|
||||
using SharedProject.Models.Requests;
|
||||
|
||||
namespace TaikoLocalServer.Controllers.Api;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
public class UsersController : BaseController<UsersController>
|
||||
{
|
||||
private readonly IUserDatumService userDatumService;
|
||||
|
||||
public UsersController(IUserDatumService userDatumService)
|
||||
{
|
||||
this.userDatumService = userDatumService;
|
||||
}
|
||||
|
||||
[HttpDelete("{baid}")]
|
||||
public async Task<IActionResult> DeleteUser(uint baid)
|
||||
{
|
||||
var result = await userDatumService.DeleteUser(baid);
|
||||
|
||||
return result ? NoContent() : NotFound();
|
||||
}
|
||||
}
|
@ -59,12 +59,16 @@ public class CardService : ICardService
|
||||
await context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
public async Task<bool> DeleteCard(string accessCode)
|
||||
public async Task<bool> DeleteCard(uint baid)
|
||||
{
|
||||
var card = await context.Cards.FindAsync(accessCode);
|
||||
if (card == null) return false;
|
||||
context.Cards.Remove(card);
|
||||
var cards = await context.Cards.ToListAsync();
|
||||
var deletingCards = cards.Where(card => card.Baid == baid).ToList();
|
||||
|
||||
if (deletingCards.Count == 0) return false;
|
||||
|
||||
context.RemoveRange(deletingCards);
|
||||
await context.SaveChangesAsync();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -13,5 +13,5 @@ public interface ICardService
|
||||
|
||||
public Task AddCard(Card card);
|
||||
|
||||
public Task<bool> DeleteCard(string accessCode);
|
||||
public Task<bool> DeleteCard(uint baid);
|
||||
}
|
@ -16,9 +16,9 @@ public interface IUserDatumService
|
||||
|
||||
public Task UpdateUserDatum(UserDatum userDatum);
|
||||
|
||||
public Task<bool> DeleteUser(uint baid);
|
||||
|
||||
public Task<List<uint>> GetFavoriteSongIds(ulong baid);
|
||||
|
||||
public Task UpdateFavoriteSong(ulong baid, uint songId, bool isFavorite);
|
||||
|
||||
|
||||
}
|
@ -57,16 +57,6 @@ public class UserDatumService : IUserDatumService
|
||||
await context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
public async Task<bool> DeleteUser(uint baid)
|
||||
{
|
||||
var userDatum = await context.UserData.FindAsync((ulong)baid);
|
||||
if (userDatum == null) return false;
|
||||
context.UserData.Remove(userDatum);
|
||||
await context.SaveChangesAsync();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public async Task<List<uint>> GetFavoriteSongIds(ulong baid)
|
||||
{
|
||||
var userDatum = await context.UserData.FindAsync(baid);
|
||||
|
@ -6,154 +6,154 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>1.0.0-beta</Version>
|
||||
<LangVersion>11</LangVersion>
|
||||
<EnableConfigurationBindingGenerator>false</EnableConfigurationBindingGenerator>
|
||||
<EnableConfigurationBindingGenerator>false</EnableConfigurationBindingGenerator>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Templates\TemplateController.cs"/>
|
||||
<Compile Remove="Templates\TemplateController.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.0-rc.1.23421.29"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0-rc.2.23480.1"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0-rc.2.23480.1"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.0-rc.1.23421.29" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0-rc.2.23480.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0-rc.2.23480.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0-rc.2.23480.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="protobuf-net" Version="3.2.26"/>
|
||||
<PackageReference Include="protobuf-net.AspNetCore" Version="3.2.12"/>
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0"/>
|
||||
<PackageReference Include="Serilog.Expressions" Version="4.0.0-dev-00137"/>
|
||||
<PackageReference Include="Serilog.Sinks.File.Header" Version="1.0.2"/>
|
||||
<PackageReference Include="SharpZipLib" Version="1.4.2"/>
|
||||
<PackageReference Include="Swan.Core" Version="7.0.0-beta.2"/>
|
||||
<PackageReference Include="Swan.Logging" Version="6.0.2-beta.96"/>
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0"/>
|
||||
<PackageReference Include="Throw" Version="1.4.0"/>
|
||||
<PackageReference Include="Yoh.Text.Json.NamingPolicies" Version="1.0.0"/>
|
||||
<PackageReference Include="protobuf-net" Version="3.2.26" />
|
||||
<PackageReference Include="protobuf-net.AspNetCore" Version="3.2.12" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
|
||||
<PackageReference Include="Serilog.Expressions" Version="4.0.0-dev-00137" />
|
||||
<PackageReference Include="Serilog.Sinks.File.Header" Version="1.0.2" />
|
||||
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||
<PackageReference Include="Swan.Core" Version="7.0.0-beta.2" />
|
||||
<PackageReference Include="Swan.Logging" Version="6.0.2-beta.96" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||
<PackageReference Include="Throw" Version="1.4.0" />
|
||||
<PackageReference Include="Yoh.Text.Json.NamingPolicies" Version="1.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Certificates\cert.pfx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Certificates\root.pfx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Remove="Configurations\ServerSettings.json"/>
|
||||
<None Include="Configurations\ServerSettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Remove="Configurations\Database.json"/>
|
||||
<None Include="Configurations\Database.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Remove="Configurations\DataSettings.json"/>
|
||||
<None Include="Configurations\DataSettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Remove="Configurations\Kestrel.json"/>
|
||||
<None Include="Configurations\Kestrel.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Remove="Configurations\Logging.json"/>
|
||||
<None Include="Configurations\Logging.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Update="wwwroot\data\locked_songs_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\movie_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\music_order.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\musicinfo.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\shop_folder_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\token_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\wordlist.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\gaiden_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\qrcode_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\music_order.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\musicinfo.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\wordlist.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\don_cos_reward.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\don_cos_reward.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\shougou.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\shougou.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\neiro.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\neiro.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\don_cos_reward.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\music_order.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\musicinfo.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\neiro.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\shougou.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\wordlist.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Update="Certificates\cert.pfx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Certificates\root.pfx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Remove="Configurations\ServerSettings.json" />
|
||||
<None Include="Configurations\ServerSettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Remove="Configurations\Database.json" />
|
||||
<None Include="Configurations\Database.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Remove="Configurations\DataSettings.json" />
|
||||
<None Include="Configurations\DataSettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Remove="Configurations\Kestrel.json" />
|
||||
<None Include="Configurations\Kestrel.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Remove="Configurations\Logging.json" />
|
||||
<None Include="Configurations\Logging.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Update="wwwroot\data\locked_songs_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\movie_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\music_order.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\musicinfo.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\shop_folder_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\token_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\wordlist.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\gaiden_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\qrcode_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\music_order.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\musicinfo.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\wordlist.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\don_cos_reward.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\don_cos_reward.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\shougou.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\shougou.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\neiro.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\neiro.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\don_cos_reward.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\music_order.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\musicinfo.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\neiro.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\shougou.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\wordlist.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="wwwroot\data\dan_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\event_folder_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\intro_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\dan_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\event_folder_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\intro_data.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\GameDatabase\GameDatabase.csproj"/>
|
||||
<ProjectReference Include="..\SharedProject\SharedProject.csproj"/>
|
||||
<ProjectReference Include="..\GameDatabase\GameDatabase.csproj" />
|
||||
<ProjectReference Include="..\SharedProject\SharedProject.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ProjectReference Include="..\TaikoWebUI\TaikoWebUI.csproj"/>
|
||||
<ProjectReference Include="..\TaikoWebUI\TaikoWebUI.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -16,7 +16,7 @@
|
||||
如果你的应用程序需要此虚拟化来实现向后兼容性,则移除此
|
||||
元素。
|
||||
-->
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
@ -40,7 +40,7 @@
|
||||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
||||
|
||||
<!-- Windows 10 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||
|
||||
</application>
|
||||
</compatibility>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,227 +1,84 @@
|
||||
[
|
||||
{
|
||||
"folderId": 1,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": []
|
||||
},
|
||||
{
|
||||
"folderId": 2,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": [
|
||||
478,
|
||||
153,
|
||||
200,
|
||||
482,
|
||||
511,
|
||||
672,
|
||||
675,
|
||||
646,
|
||||
644,
|
||||
645,
|
||||
676,
|
||||
671,
|
||||
479,
|
||||
707,
|
||||
480,
|
||||
481,
|
||||
203,
|
||||
204,
|
||||
483,
|
||||
205,
|
||||
202,
|
||||
241,
|
||||
14,
|
||||
387,
|
||||
197,
|
||||
281,
|
||||
226,
|
||||
484,
|
||||
543,
|
||||
512,
|
||||
709,
|
||||
35
|
||||
]
|
||||
},
|
||||
{
|
||||
"folderId": 3,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": [
|
||||
1485,
|
||||
1404,
|
||||
1580,
|
||||
1730,
|
||||
1750,
|
||||
1277,
|
||||
1478,
|
||||
1481,
|
||||
1482,
|
||||
1484,
|
||||
1500,
|
||||
1890,
|
||||
2349,
|
||||
2604,
|
||||
2640,
|
||||
1176,
|
||||
1419,
|
||||
1596,
|
||||
1693,
|
||||
2248,
|
||||
1049,
|
||||
1221,
|
||||
1222,
|
||||
1223,
|
||||
1224,
|
||||
1493,
|
||||
1578,
|
||||
1719,
|
||||
2650,
|
||||
1595,
|
||||
1964,
|
||||
1469,
|
||||
1217,
|
||||
1314,
|
||||
1406,
|
||||
1565,
|
||||
1745,
|
||||
2120,
|
||||
2200,
|
||||
2324,
|
||||
2785,
|
||||
1631,
|
||||
2301,
|
||||
2802,
|
||||
1490,
|
||||
2088,
|
||||
2268,
|
||||
2309,
|
||||
2507,
|
||||
2126,
|
||||
1630,
|
||||
2509,
|
||||
1263,
|
||||
2495,
|
||||
2642,
|
||||
2745,
|
||||
1054,
|
||||
2583,
|
||||
1271,
|
||||
1266,
|
||||
1267,
|
||||
2923
|
||||
]
|
||||
},
|
||||
{
|
||||
"folderId": 4,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": [
|
||||
1361,
|
||||
1366,
|
||||
1373,
|
||||
1379,
|
||||
1337,
|
||||
1345,
|
||||
1357,
|
||||
1362,
|
||||
1367,
|
||||
1368,
|
||||
1369,
|
||||
1374,
|
||||
1375,
|
||||
1388,
|
||||
1390,
|
||||
1579,
|
||||
2225,
|
||||
1354,
|
||||
1394,
|
||||
2804,
|
||||
1340,
|
||||
1341,
|
||||
1370,
|
||||
1376,
|
||||
1384,
|
||||
1359,
|
||||
1385,
|
||||
2416,
|
||||
2756,
|
||||
1363,
|
||||
1920,
|
||||
1353,
|
||||
1360,
|
||||
1381,
|
||||
1389,
|
||||
1364,
|
||||
1391,
|
||||
1342,
|
||||
1546,
|
||||
1931
|
||||
]
|
||||
},
|
||||
{
|
||||
"folderId": 5,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": [
|
||||
242,
|
||||
430,
|
||||
368,
|
||||
604,
|
||||
333
|
||||
]
|
||||
},
|
||||
{
|
||||
"folderId": 6,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": [
|
||||
841,
|
||||
767,
|
||||
658,
|
||||
467,
|
||||
468,
|
||||
466,
|
||||
460,
|
||||
157,
|
||||
465
|
||||
]
|
||||
},
|
||||
{
|
||||
"folderId": 7,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": [
|
||||
733,
|
||||
732,
|
||||
44,
|
||||
790,
|
||||
894
|
||||
]
|
||||
},
|
||||
{
|
||||
"folderId": 8,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": []
|
||||
},
|
||||
{
|
||||
"folderId": 12,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": []
|
||||
},
|
||||
{
|
||||
"folderId": 13,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": []
|
||||
},
|
||||
{
|
||||
"folderId": 14,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": []
|
||||
}
|
||||
{
|
||||
"folderId": 1,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": []
|
||||
},
|
||||
{
|
||||
"folderId": 2,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": [
|
||||
478, 153, 200, 482, 511, 672, 675, 646, 644, 645, 676, 671, 479,
|
||||
707, 480, 481, 203, 204, 483, 205, 202, 241, 14, 387, 197, 281, 226,
|
||||
484, 543, 512, 709, 35
|
||||
]
|
||||
},
|
||||
{
|
||||
"folderId": 3,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": [
|
||||
1485, 1404, 1580, 1730, 1750, 1277, 1478, 1481, 1482, 1484, 1500,
|
||||
1890, 2349, 2604, 2640, 1176, 1419, 1596, 1693, 2248, 1049, 1221,
|
||||
1222, 1223, 1224, 1493, 1578, 1719, 2650, 1595, 1964, 1469, 1217,
|
||||
1314, 1406, 1565, 1745, 2120, 2200, 2324, 2785, 1631, 2301, 2802,
|
||||
1490, 2088, 2268, 2309, 2507, 2126, 1630, 2509, 1263, 2495, 2642,
|
||||
2745, 1054, 2583, 1271, 1266, 1267, 2923
|
||||
]
|
||||
},
|
||||
{
|
||||
"folderId": 4,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": [
|
||||
1361, 1366, 1373, 1379, 1337, 1345, 1357, 1362, 1367, 1368, 1369,
|
||||
1374, 1375, 1388, 1390, 1579, 2225, 1354, 1394, 2804, 1340, 1341,
|
||||
1370, 1376, 1384, 1359, 1385, 2416, 2756, 1363, 1920, 1353, 1360,
|
||||
1381, 1389, 1364, 1391, 1342, 1546, 1931
|
||||
]
|
||||
},
|
||||
{
|
||||
"folderId": 5,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": [242, 430, 368, 604, 333]
|
||||
},
|
||||
{
|
||||
"folderId": 6,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": [841, 767, 658, 467, 468, 466, 460, 157, 465]
|
||||
},
|
||||
{
|
||||
"folderId": 7,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": [733, 732, 44, 790, 894]
|
||||
},
|
||||
{
|
||||
"folderId": 8,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": []
|
||||
},
|
||||
{
|
||||
"folderId": 12,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": []
|
||||
},
|
||||
{
|
||||
"folderId": 13,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": []
|
||||
},
|
||||
{
|
||||
"folderId": 14,
|
||||
"verupNo": 1,
|
||||
"priority": 1,
|
||||
"songNo": []
|
||||
}
|
||||
]
|
||||
|
@ -1,37 +1,37 @@
|
||||
[
|
||||
{
|
||||
"danId": 20,
|
||||
"verupNo": 1,
|
||||
"title": "gaiden_2022_odai_7",
|
||||
"aryOdaiSong": [
|
||||
"danId":20,
|
||||
"verupNo":1,
|
||||
"title":"gaiden_2022_odai_7",
|
||||
"aryOdaiSong":[
|
||||
{
|
||||
"songNo": 828,
|
||||
"level": 2,
|
||||
"isHiddenSongName": false
|
||||
"songNo":828,
|
||||
"level":2,
|
||||
"isHiddenSongName":false
|
||||
},
|
||||
{
|
||||
"songNo": 187,
|
||||
"level": 2,
|
||||
"isHiddenSongName": false
|
||||
"songNo":187,
|
||||
"level":2,
|
||||
"isHiddenSongName":false
|
||||
},
|
||||
{
|
||||
"songNo": 789,
|
||||
"level": 2,
|
||||
"isHiddenSongName": false
|
||||
"songNo":789,
|
||||
"level":2,
|
||||
"isHiddenSongName":false
|
||||
}
|
||||
],
|
||||
"aryOdaiBorder": [
|
||||
"aryOdaiBorder":[
|
||||
{
|
||||
"odaiType": 1,
|
||||
"borderType": 1,
|
||||
"redBorderTotal": 92,
|
||||
"goldBorderTotal": 95
|
||||
"odaiType":1,
|
||||
"borderType":1,
|
||||
"redBorderTotal":92,
|
||||
"goldBorderTotal":95
|
||||
},
|
||||
{
|
||||
"odaiType": 8,
|
||||
"borderType": 1,
|
||||
"redBorderTotal": 786,
|
||||
"goldBorderTotal": 832
|
||||
"odaiType":8,
|
||||
"borderType":1,
|
||||
"redBorderTotal":786,
|
||||
"goldBorderTotal":832
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,134 +1,74 @@
|
||||
[
|
||||
{
|
||||
"setId": 1,
|
||||
"verupNo": 1,
|
||||
"mainSongNo": 1115,
|
||||
"subSongNo": [
|
||||
1022,
|
||||
7,
|
||||
1089,
|
||||
1059
|
||||
]
|
||||
"setId":1,
|
||||
"verupNo":1,
|
||||
"mainSongNo":1115,
|
||||
"subSongNo":[1022,7,1089,1059]
|
||||
},
|
||||
{
|
||||
"setId": 2,
|
||||
"verupNo": 1,
|
||||
"mainSongNo": 1102,
|
||||
"subSongNo": [
|
||||
1065,
|
||||
966,
|
||||
1008,
|
||||
916
|
||||
]
|
||||
"setId":2,
|
||||
"verupNo":1,
|
||||
"mainSongNo":1102,
|
||||
"subSongNo":[1065,966,1008,916]
|
||||
},
|
||||
{
|
||||
"setId": 3,
|
||||
"verupNo": 1,
|
||||
"mainSongNo": 1091,
|
||||
"subSongNo": [
|
||||
1009,
|
||||
1064,
|
||||
36,
|
||||
965
|
||||
]
|
||||
"setId":3,
|
||||
"verupNo":1,
|
||||
"mainSongNo":1091,
|
||||
"subSongNo":[1009,1064,36,965]
|
||||
},
|
||||
{
|
||||
"setId": 4,
|
||||
"verupNo": 1,
|
||||
"mainSongNo": 1117,
|
||||
"subSongNo": [
|
||||
122,
|
||||
42,
|
||||
430,
|
||||
256
|
||||
]
|
||||
"setId":4,
|
||||
"verupNo":1,
|
||||
"mainSongNo":1117,
|
||||
"subSongNo":[122,42,430,256]
|
||||
},
|
||||
{
|
||||
"setId": 5,
|
||||
"verupNo": 1,
|
||||
"mainSongNo": 1116,
|
||||
"subSongNo": [
|
||||
885,
|
||||
985,
|
||||
1003,
|
||||
1063
|
||||
]
|
||||
"setId":5,
|
||||
"verupNo":1,
|
||||
"mainSongNo":1116,
|
||||
"subSongNo":[885,985,1003,1063]
|
||||
},
|
||||
{
|
||||
"setId": 6,
|
||||
"verupNo": 1,
|
||||
"mainSongNo": 1101,
|
||||
"subSongNo": [
|
||||
915,
|
||||
1004,
|
||||
47,
|
||||
1054
|
||||
]
|
||||
"setId":6,
|
||||
"verupNo":1,
|
||||
"mainSongNo":1101,
|
||||
"subSongNo":[915,1004,47,1054]
|
||||
},
|
||||
{
|
||||
"setId": 7,
|
||||
"verupNo": 1,
|
||||
"mainSongNo": 1111,
|
||||
"subSongNo": [
|
||||
1028,
|
||||
937,
|
||||
374,
|
||||
1062
|
||||
]
|
||||
"setId":7,
|
||||
"verupNo":1,
|
||||
"mainSongNo":1111,
|
||||
"subSongNo":[1028,937,374,1062]
|
||||
},
|
||||
{
|
||||
"setId": 8,
|
||||
"verupNo": 1,
|
||||
"mainSongNo": 1112,
|
||||
"subSongNo": [
|
||||
1065,
|
||||
1090,
|
||||
1073,
|
||||
1087
|
||||
]
|
||||
"setId":8,
|
||||
"verupNo":1,
|
||||
"mainSongNo":1112,
|
||||
"subSongNo":[1065,1090,1073,1087]
|
||||
},
|
||||
{
|
||||
"setId": 9,
|
||||
"verupNo": 1,
|
||||
"mainSongNo": 1090,
|
||||
"subSongNo": [
|
||||
1112,
|
||||
1003,
|
||||
1007,
|
||||
1088
|
||||
]
|
||||
"setId":9,
|
||||
"verupNo":1,
|
||||
"mainSongNo":1090,
|
||||
"subSongNo":[1112,1003,1007,1088]
|
||||
},
|
||||
{
|
||||
"setId": 10,
|
||||
"verupNo": 1,
|
||||
"mainSongNo": 1113,
|
||||
"subSongNo": [
|
||||
1061,
|
||||
1056,
|
||||
1060,
|
||||
1016
|
||||
]
|
||||
"setId":10,
|
||||
"verupNo":1,
|
||||
"mainSongNo":1113,
|
||||
"subSongNo":[1061,1056,1060,1016]
|
||||
},
|
||||
{
|
||||
"setId": 11,
|
||||
"verupNo": 1,
|
||||
"mainSongNo": 1127,
|
||||
"subSongNo": [
|
||||
1038,
|
||||
665,
|
||||
1004,
|
||||
1088
|
||||
]
|
||||
"setId":11,
|
||||
"verupNo":1,
|
||||
"mainSongNo":1127,
|
||||
"subSongNo":[1038,665,1004,1088]
|
||||
},
|
||||
{
|
||||
"setId": 12,
|
||||
"verupNo": 1,
|
||||
"mainSongNo": 1126,
|
||||
"subSongNo": [
|
||||
1077,
|
||||
1030,
|
||||
730,
|
||||
1092
|
||||
]
|
||||
"setId":12,
|
||||
"verupNo":1,
|
||||
"mainSongNo":1126,
|
||||
"subSongNo":[1077,1030,730,1092]
|
||||
}
|
||||
]
|
@ -1,87 +0,0 @@
|
||||
@page "/Users/{baid:int}/AccessCode"
|
||||
@inject HttpClient Client
|
||||
@inject IDialogService DialogService
|
||||
@inject LoginService LoginService
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
<MudBreadcrumbs Items="breadcrumbs" Class="px-0"></MudBreadcrumbs>
|
||||
|
||||
<h1>Access Code Management</h1>
|
||||
<MudText Typo="Typo.caption">User: @Baid</MudText>
|
||||
|
||||
@if (response is null)
|
||||
{
|
||||
@for (uint i = 0; i < 3; i++)
|
||||
{
|
||||
<MudItem xs="12" md="6" lg="4">
|
||||
<MudCard Outlined="true">
|
||||
<MudCardContent>
|
||||
<MudSkeleton Width="30%" Height="42px;" Class="mb-5"/>
|
||||
<MudSkeleton Width="80%"/>
|
||||
<MudSkeleton Width="100%"/>
|
||||
</MudCardContent>
|
||||
<MudCardActions>
|
||||
<MudStack Row="true" Style="width:100%" Spacing="4" Justify="Justify.FlexEnd">
|
||||
<MudSkeleton Width="64px" Height="40px"/>
|
||||
<MudSkeleton Width="64px" Height="40px"/>
|
||||
</MudStack>
|
||||
</MudCardActions>
|
||||
</MudCard>
|
||||
</MudItem>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@if ((LoginService.LoginRequired && (!LoginService.IsLoggedIn || (LoginService.GetLoggedInUser().Baid != Baid && !LoginService.IsAdmin))) || User is null)
|
||||
{
|
||||
<MudItem xs="12">
|
||||
<MudText Align="Align.Center" Class="my-8">
|
||||
Please log in by clicking on "Users" tab first.
|
||||
</MudText>
|
||||
</MudItem>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudGrid Justify="Justify.Center">
|
||||
<MudItem xs="6" md="4" lg="4">
|
||||
<MudCard>
|
||||
<MudCardContent>
|
||||
<MudForm @ref="bindAccessCodeForm">
|
||||
<MudText Typo="Typo.h4" Align="Align.Center">Bind New Access Code</MudText>
|
||||
<MudTextField @bind-value="inputAccessCode" InputType="InputType.Text" T="string"
|
||||
FullWidth="true" Required="@true" RequiredError="Access Code is required"
|
||||
Label="New Access Code"/>
|
||||
<MudButton OnClick="OnBind" FullWidth="true" Class="mt-3" StartIcon="@Icons.Material.Filled.AddCard" Color="Color.Primary" Variant="Variant.Filled">Bind</MudButton>
|
||||
</MudForm>
|
||||
</MudCardContent>
|
||||
</MudCard>
|
||||
</MudItem>
|
||||
<MudDivider/>
|
||||
@for (var idx = 0; idx < User.AccessCodes.Count; idx++)
|
||||
{
|
||||
var accessCode = User.AccessCodes[idx];
|
||||
var localIdx = idx + 1;
|
||||
<MudItem xs="6" md="4" lg="4">
|
||||
<MudCard Outlined="true">
|
||||
<MudCardHeader>
|
||||
<CardHeaderContent>
|
||||
<MudText Typo="Typo.h6" Style="font-weight:bold">User Access Code @localIdx</MudText>
|
||||
</CardHeaderContent>
|
||||
</MudCardHeader>
|
||||
<MudCardContent>
|
||||
<MudText Style="font-weight:bold">@accessCode</MudText>
|
||||
</MudCardContent>
|
||||
<MudCardActions>
|
||||
<MudButton OnClick="@(_ => DeleteAccessCode(accessCode))"
|
||||
Size="Size.Small" Variant="Variant.Text" StartIcon="@Icons.Material.Filled.Delete"
|
||||
Color="Color.Primary">
|
||||
Delete Access Code
|
||||
</MudButton>
|
||||
</MudCardActions>
|
||||
</MudCard>
|
||||
</MudItem>
|
||||
<MudDivider/>
|
||||
}
|
||||
</MudGrid>
|
||||
}
|
||||
}
|
@ -1,105 +0,0 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System.Linq;
|
||||
using TaikoWebUI.Pages.Dialogs;
|
||||
|
||||
namespace TaikoWebUI.Pages;
|
||||
|
||||
public partial class AccessCode
|
||||
{
|
||||
[Parameter]
|
||||
public int Baid { get; set; }
|
||||
|
||||
private string inputAccessCode = "";
|
||||
private MudForm bindAccessCodeForm = default!;
|
||||
|
||||
private User? User { get; set; } = new();
|
||||
|
||||
private DashboardResponse? response;
|
||||
|
||||
private readonly List<BreadcrumbItem> breadcrumbs = new()
|
||||
{
|
||||
new BreadcrumbItem("Users", href: "/Users"),
|
||||
};
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await base.OnInitializedAsync();
|
||||
await InitializeUser();
|
||||
breadcrumbs.Add(new BreadcrumbItem($"User: {Baid}", href: null, disabled: true));
|
||||
breadcrumbs.Add(new BreadcrumbItem("Access Code Management", href: $"/Users/{Baid}/AccessCode", disabled: false));
|
||||
}
|
||||
|
||||
private async Task InitializeUser()
|
||||
{
|
||||
response = await Client.GetFromJsonAsync<DashboardResponse>("api/Dashboard");
|
||||
LoginService.ResetLoggedInUser(response);
|
||||
if (LoginService.IsAdmin || !LoginService.LoginRequired)
|
||||
{
|
||||
if (response is not null)
|
||||
{
|
||||
User = response.Users.FirstOrDefault(u => u.Baid == Baid);
|
||||
}
|
||||
}
|
||||
else if (LoginService.IsLoggedIn)
|
||||
{
|
||||
User = LoginService.GetLoggedInUser();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task DeleteAccessCode(string accessCode)
|
||||
{
|
||||
var parameters = new DialogParameters<AccessCodeDeleteConfirmDialog>
|
||||
{
|
||||
{ x => x.User, User },
|
||||
{ x => x.AccessCode, accessCode }
|
||||
};
|
||||
|
||||
var dialog = DialogService.Show<AccessCodeDeleteConfirmDialog>("Delete Access Code", parameters);
|
||||
var result = await dialog.Result;
|
||||
|
||||
if (result.Canceled) return;
|
||||
|
||||
await InitializeUser();
|
||||
NavigationManager.NavigateTo(NavigationManager.Uri);
|
||||
}
|
||||
|
||||
private async Task OnBind()
|
||||
{
|
||||
if (response != null)
|
||||
{
|
||||
var result = await LoginService.BindAccessCode(inputAccessCode, Client);
|
||||
switch (result)
|
||||
{
|
||||
case 0:
|
||||
await DialogService.ShowMessageBox(
|
||||
"Error",
|
||||
(MarkupString)
|
||||
"Not logged in.<br />Please log in first and try again.",
|
||||
"Ok");
|
||||
break;
|
||||
case 1:
|
||||
await DialogService.ShowMessageBox(
|
||||
"Success",
|
||||
"New access code bound successfully.",
|
||||
"Ok");
|
||||
await InitializeUser();
|
||||
NavigationManager.NavigateTo(NavigationManager.Uri);
|
||||
break;
|
||||
case 2:
|
||||
await DialogService.ShowMessageBox(
|
||||
"Error",
|
||||
(MarkupString)
|
||||
"Bound access code upper limit reached.<br />Please delete one access code first.",
|
||||
"Ok");
|
||||
break;
|
||||
case 3:
|
||||
await DialogService.ShowMessageBox(
|
||||
"Error",
|
||||
(MarkupString)
|
||||
"Access code already bound.<br />Please delete it from the bound user first.",
|
||||
"Ok");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -23,7 +23,7 @@ public partial class DaniDojo
|
||||
.Sort((stageData, otherStageData) => stageData.SongNumber.CompareTo(otherStageData.SongNumber)));
|
||||
bestDataMap = response.DanBestDataList.ToDictionary(data => data.DanId);
|
||||
|
||||
breadcrumbs.Add(new BreadcrumbItem($"User: {Baid}", href: null, disabled: true));
|
||||
breadcrumbs.Add(new BreadcrumbItem($"Card: {Baid}", href: null, disabled: true));
|
||||
breadcrumbs.Add(new BreadcrumbItem("Dani Dojo", href: $"/Users/{Baid}/DaniDojo", disabled: false));
|
||||
}
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
@inject HttpClient Client
|
||||
@inject ISnackbar Snackbar
|
||||
|
||||
<MudDialog>
|
||||
<TitleContent>
|
||||
<MudText Typo="Typo.h6">
|
||||
<MudIcon Icon="@Icons.Material.Filled.DeleteForever" Class="mr-3 mb-n1"/>
|
||||
Delete user?
|
||||
</MudText>
|
||||
</TitleContent>
|
||||
<DialogContent>
|
||||
<MudText>
|
||||
Do you really want to delete the access code @AccessCode?
|
||||
This process cannot be undone!
|
||||
</MudText>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<MudButton OnClick="Cancel">CANCEL</MudButton>
|
||||
<MudButton Color="Color.Error" OnClick="DeleteAccessCode">
|
||||
<MudText>DELETE</MudText>
|
||||
</MudButton>
|
||||
</DialogActions>
|
||||
</MudDialog>
|
@ -1,38 +0,0 @@
|
||||
namespace TaikoWebUI.Pages.Dialogs;
|
||||
|
||||
public partial class AccessCodeDeleteConfirmDialog
|
||||
{
|
||||
|
||||
[CascadingParameter]
|
||||
MudDialogInstance MudDialog { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public User User { get; set; } = new();
|
||||
|
||||
[Parameter]
|
||||
public string AccessCode { get; set; } = "";
|
||||
|
||||
private void Cancel() => MudDialog.Cancel();
|
||||
|
||||
private async Task DeleteAccessCode()
|
||||
{
|
||||
if (User.AccessCodes.Count == 1)
|
||||
{
|
||||
Snackbar.Add("Cannot delete last access code!", Severity.Error);
|
||||
MudDialog.Close(DialogResult.Ok(false));
|
||||
return;
|
||||
}
|
||||
|
||||
var cardResponseMessage = await Client.DeleteAsync($"api/Cards/{AccessCode}");
|
||||
|
||||
if (!cardResponseMessage.IsSuccessStatusCode)
|
||||
{
|
||||
Snackbar.Add("Something went wrong when deleting access code!", Severity.Error);
|
||||
MudDialog.Close(DialogResult.Ok(false));
|
||||
return;
|
||||
}
|
||||
|
||||
Snackbar.Add("Delete success!", Severity.Success);
|
||||
MudDialog.Close(DialogResult.Ok(true));
|
||||
}
|
||||
}
|
@ -15,9 +15,9 @@
|
||||
</MudText>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<MudButton OnClick="Cancel">CANCEL</MudButton>
|
||||
<MudButton OnClick="Cancel">Cancel</MudButton>
|
||||
<MudButton Color="Color.Error" OnClick="DeleteUser">
|
||||
<MudText>DELETE</MudText>
|
||||
<MudText>Delete User</MudText>
|
||||
</MudButton>
|
||||
</DialogActions>
|
||||
</MudDialog>
|
@ -13,9 +13,18 @@ public partial class UserDeleteConfirmDialog
|
||||
|
||||
private async Task DeleteUser()
|
||||
{
|
||||
var responseMessage = await Client.DeleteAsync($"api/Users/{User.Baid}");
|
||||
var credentialResponseMessage = await Client.DeleteAsync($"api/Credentials/{User.Baid}");
|
||||
|
||||
if (!responseMessage.IsSuccessStatusCode)
|
||||
if (!credentialResponseMessage.IsSuccessStatusCode)
|
||||
{
|
||||
Snackbar.Add("Something went wrong when deleting user credentials!", Severity.Error);
|
||||
MudDialog.Close(DialogResult.Ok(false));
|
||||
return;
|
||||
}
|
||||
|
||||
var cardResponseMessage = await Client.DeleteAsync($"api/Cards/{User.Baid}");
|
||||
|
||||
if (!cardResponseMessage.IsSuccessStatusCode)
|
||||
{
|
||||
Snackbar.Add("Something went wrong when deleting user!", Severity.Error);
|
||||
MudDialog.Close(DialogResult.Ok(false));
|
||||
|
@ -43,7 +43,7 @@ public partial class HighScores
|
||||
}
|
||||
|
||||
|
||||
breadcrumbs.Add(new BreadcrumbItem($"User: {Baid}", href: null, disabled: true));
|
||||
breadcrumbs.Add(new BreadcrumbItem($"Card: {Baid}", href: null, disabled: true));
|
||||
breadcrumbs.Add(new BreadcrumbItem("High Scores", href: $"/Users/{Baid}/HighScores", disabled: false));
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ public partial class Profile
|
||||
isSavingOptions = false;
|
||||
response = await Client.GetFromJsonAsync<UserSetting>($"api/UserSettings/{Baid}");
|
||||
|
||||
breadcrumbs.Add(new BreadcrumbItem($"User: {Baid}", href: null, disabled: true));
|
||||
breadcrumbs.Add(new BreadcrumbItem($"Card: {Baid}", href: null, disabled: true));
|
||||
breadcrumbs.Add(new BreadcrumbItem("Profile", href: $"/Users/{Baid}/Profile", disabled: false));
|
||||
|
||||
costumeFlagArraySizes = GameDataService.GetCostumeFlagArraySizes();
|
||||
|
@ -20,9 +20,9 @@ else
|
||||
<MudCardContent>
|
||||
<MudForm @ref="registerForm">
|
||||
<MudText Typo="Typo.h4" Align="Align.Center">Register</MudText>
|
||||
<MudTextField @bind-value="accessCode" InputType="InputType.Text" T="string"
|
||||
FullWidth="true" Required="@true" RequiredError="Access Code is required"
|
||||
Label="Access Code"/>
|
||||
<MudTextField @bind-value="cardNum" InputType="InputType.Text" T="string"
|
||||
FullWidth="true" Required="@true" RequiredError="Card Number is required"
|
||||
Label="Card Number"/>
|
||||
<MudTextField @bind-Value="password" InputType="InputType.Password"
|
||||
T="string" FullWidth="true" Required="@true"
|
||||
RequiredError="Password is required"
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
public partial class Register
|
||||
{
|
||||
private string accessCode = "";
|
||||
private string cardNum = "";
|
||||
private string confirmPassword = "";
|
||||
private string password = "";
|
||||
private MudForm registerForm = default!;
|
||||
@ -19,7 +19,7 @@ public partial class Register
|
||||
{
|
||||
if (response != null)
|
||||
{
|
||||
var result = await LoginService.Register(accessCode, password, confirmPassword, response, Client);
|
||||
var result = await LoginService.Register(cardNum, password, confirmPassword, response, Client);
|
||||
switch (result)
|
||||
{
|
||||
case 0:
|
||||
@ -32,7 +32,7 @@ public partial class Register
|
||||
case 1:
|
||||
await DialogService.ShowMessageBox(
|
||||
"Success",
|
||||
"Access code registered successfully.",
|
||||
"Card registered successfully.",
|
||||
"Ok");
|
||||
NavigationManager.NavigateTo("/Users");
|
||||
break;
|
||||
@ -46,14 +46,14 @@ public partial class Register
|
||||
await DialogService.ShowMessageBox(
|
||||
"Error",
|
||||
(MarkupString)
|
||||
"Access code not found.<br />Please play one game with this access code to register it.",
|
||||
"Card number not found.<br />Please play one game with this card number to register it.",
|
||||
"Ok");
|
||||
break;
|
||||
case 4:
|
||||
await DialogService.ShowMessageBox(
|
||||
"Error",
|
||||
(MarkupString)
|
||||
"Access code is already registered, please use set password to login.",
|
||||
"Card is already registered, please use set password to login.",
|
||||
"Ok");
|
||||
NavigationManager.NavigateTo("/Users");
|
||||
break;
|
||||
|
@ -30,7 +30,7 @@
|
||||
}
|
||||
else if (response.Users.Count != 0)
|
||||
{
|
||||
if (LoginService.IsAdmin || !LoginService.LoginRequired) // Admin mode, can see all users
|
||||
if (LoginService.IsAdmin || !LoginService.LoginRequired)
|
||||
{
|
||||
@foreach (var user in response.Users)
|
||||
{
|
||||
@ -38,7 +38,7 @@
|
||||
<MudCard Outlined="true">
|
||||
<MudCardHeader>
|
||||
<CardHeaderContent>
|
||||
<MudText Typo="Typo.h6" Style="font-weight:bold">User: @user.Baid</MudText>
|
||||
<MudText Typo="Typo.h6" Style="font-weight:bold">@user.Baid</MudText>
|
||||
</CardHeaderContent>
|
||||
<CardHeaderActions>
|
||||
<MudMenu Icon="@Icons.Material.Filled.MoreVert" Dense="true" AnchorOrigin="Origin.BottomLeft"
|
||||
@ -49,12 +49,6 @@
|
||||
Show QR Code
|
||||
</MudMenuItem>
|
||||
<MudDivider/>
|
||||
<MudMenuItem Icon="@Icons.Material.Filled.FeaturedPlayList"
|
||||
Href="@($"Users/{user.Baid}/AccessCode")"
|
||||
IconColor="@Color.Primary">
|
||||
Manage Access Codes
|
||||
</MudMenuItem>
|
||||
<MudDivider/>
|
||||
<MudMenuItem Icon="@Icons.Material.Filled.Delete"
|
||||
OnClick="@(_ => DeleteUser(user))"
|
||||
IconColor="@Color.Error">
|
||||
@ -65,11 +59,14 @@
|
||||
</MudCardHeader>
|
||||
<MudCardContent>
|
||||
<MudText Style="font-weight:bold">Access Code</MudText>
|
||||
<MudText Style="font-family:monospace;overflow:hidden;overflow-x:scroll">@user.AccessCodes[0]</MudText>
|
||||
@if (user.AccessCodes.Count > 1)
|
||||
{
|
||||
<MudText Style="font-family:monospace;overflow:hidden;overflow-x:scroll">... and @(user.AccessCodes.Count-1) other access code(s)</MudText>
|
||||
}
|
||||
<MudGrid>
|
||||
@foreach (var accessCode in user.AccessCodes)
|
||||
{
|
||||
<MudItem xs="12">
|
||||
<MudText Style="font-family:monospace;overflow:hidden;overflow-x:scroll">@accessCode</MudText>
|
||||
</MudItem>
|
||||
}
|
||||
</MudGrid>
|
||||
</MudCardContent>
|
||||
<MudCardActions>
|
||||
<MudStack Row="true" Style="width:100%" Spacing="4" Justify="Justify.FlexEnd">
|
||||
@ -98,7 +95,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (!LoginService.IsLoggedIn) // Not logged in, show login form
|
||||
@if (!LoginService.IsLoggedIn)
|
||||
{
|
||||
<MudContainer>
|
||||
<MudGrid Justify="Justify.Center">
|
||||
@ -107,10 +104,10 @@
|
||||
<MudCardContent>
|
||||
<MudForm @ref="loginForm">
|
||||
<MudText Typo="Typo.h4" Align="Align.Center">Login</MudText>
|
||||
<MudTextField @bind-value="inputAccessCode" InputType="InputType.Text" T="string"
|
||||
FullWidth="true" Required="@true" RequiredError="Access code is required"
|
||||
Label="Access code"/>
|
||||
<MudTextField @bind-Value="inputPassword" InputType="InputType.Password"
|
||||
<MudTextField @bind-value="cardNum" InputType="InputType.Text" T="string"
|
||||
FullWidth="true" Required="@true" RequiredError="Card Number is required"
|
||||
Label="Card Number"/>
|
||||
<MudTextField @bind-Value="password" InputType="InputType.Password"
|
||||
T="string" FullWidth="true" Required="@true"
|
||||
RequiredError="Password is required"
|
||||
Label="Password">
|
||||
@ -131,13 +128,13 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
var user = LoginService.GetLoggedInUser(); // Logged in, show only own user
|
||||
var user = LoginService.GetLoggedInUser();
|
||||
<MudGrid Justify="Justify.Center">
|
||||
<MudItem xs="12" md="6" lg="4">
|
||||
<MudCard Outlined="true">
|
||||
<MudCardHeader>
|
||||
<CardHeaderContent>
|
||||
<MudText Typo="Typo.h6" Style="font-weight:bold">User: @user.Baid</MudText>
|
||||
<MudText Typo="Typo.h6" Style="font-weight:bold">@user.Baid</MudText>
|
||||
</CardHeaderContent>
|
||||
<CardHeaderActions>
|
||||
<MudMenu Icon="@Icons.Material.Filled.MoreVert" Dense="true" AnchorOrigin="Origin.BottomLeft"
|
||||
@ -148,12 +145,6 @@
|
||||
Show QR Code
|
||||
</MudMenuItem>
|
||||
<MudDivider/>
|
||||
<MudMenuItem Icon="@Icons.Material.Filled.FeaturedPlayList"
|
||||
Href="@($"Users/{user.Baid}/AccessCode")"
|
||||
IconColor="@Color.Primary">
|
||||
Manage Access Codes
|
||||
</MudMenuItem>
|
||||
<MudDivider/>
|
||||
<MudMenuItem Icon="@Icons.Material.Filled.Delete"
|
||||
OnClick="@(_ => DeleteUser(user))"
|
||||
IconColor="@Color.Error">
|
||||
@ -164,11 +155,14 @@
|
||||
</MudCardHeader>
|
||||
<MudCardContent>
|
||||
<MudText Style="font-weight:bold">Access Code</MudText>
|
||||
<MudText Style="font-family:monospace;overflow:hidden;overflow-x:scroll">@user.AccessCodes[0]</MudText>
|
||||
@if (user.AccessCodes.Count > 1)
|
||||
{
|
||||
<MudText Style="font-family:monospace;overflow:hidden;overflow-x:scroll">... and @(user.AccessCodes.Count-1) other access code(s)</MudText>
|
||||
}
|
||||
<MudGrid>
|
||||
@foreach (var accessCode in user.AccessCodes)
|
||||
{
|
||||
<MudItem xs="12">
|
||||
<MudText Style="font-family:monospace;overflow:hidden;overflow-x:scroll">@accessCode</MudText>
|
||||
</MudItem>
|
||||
}
|
||||
</MudGrid>
|
||||
</MudCardContent>
|
||||
<MudCardActions>
|
||||
<MudStack Row="true" Style="width:100%" Spacing="4" Justify="Justify.FlexEnd">
|
||||
@ -181,7 +175,7 @@
|
||||
Dense="true"
|
||||
Color="Color.Primary"
|
||||
Label="View Play Data"
|
||||
StartIcon="@Icons.Material.Filled.DataExploration"
|
||||
StartIcon="@Icons.Material.Filled.FeaturedPlayList"
|
||||
EndIcon="@Icons.Material.Filled.KeyboardArrowDown"
|
||||
FullWidth="true"
|
||||
AnchorOrigin="Origin.BottomCenter"
|
||||
@ -198,7 +192,7 @@
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // No users in the database
|
||||
{
|
||||
<MudItem xs="12">
|
||||
<MudText Align="Align.Center" Class="my-8">
|
||||
No data.
|
||||
|
@ -4,9 +4,9 @@ namespace TaikoWebUI.Pages;
|
||||
|
||||
public partial class Users
|
||||
{
|
||||
private string inputAccessCode = "";
|
||||
private string cardNum = "";
|
||||
private MudForm loginForm = default!;
|
||||
private string inputPassword = "";
|
||||
private string password = "";
|
||||
private DashboardResponse? response;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
@ -35,7 +35,7 @@ public partial class Users
|
||||
{
|
||||
if (response != null)
|
||||
{
|
||||
var result = LoginService.Login(inputAccessCode, inputPassword, response);
|
||||
var result = LoginService.Login(cardNum, password, response);
|
||||
switch (result)
|
||||
{
|
||||
case 0:
|
||||
@ -58,14 +58,14 @@ public partial class Users
|
||||
await DialogService.ShowMessageBox(
|
||||
"Error",
|
||||
(MarkupString)
|
||||
"Access code not found.<br />Please play one game with this access code to register it.",
|
||||
"Card number not found.<br />Please play one game with this card number to register it.",
|
||||
"Ok");
|
||||
break;
|
||||
case 4:
|
||||
await DialogService.ShowMessageBox(
|
||||
"Error",
|
||||
(MarkupString)
|
||||
"Access code not registered.<br />Please use register button to create a password first.",
|
||||
"Card number not registered.<br />Please use register button to create a password first.",
|
||||
"Ok");
|
||||
break;
|
||||
}
|
||||
|
@ -9,9 +9,6 @@ public class LoginService
|
||||
{
|
||||
private readonly string adminPassword;
|
||||
private readonly string adminUsername;
|
||||
public bool LoginRequired { get; }
|
||||
public bool OnlyAdmin { get; }
|
||||
private int BoundAccessCodeUpperLimit;
|
||||
|
||||
public LoginService(IOptions<WebUiSettings> settings)
|
||||
{
|
||||
@ -22,13 +19,15 @@ public class LoginService
|
||||
adminPassword = webUiSettings.AdminPassword;
|
||||
LoginRequired = webUiSettings.LoginRequired;
|
||||
OnlyAdmin = webUiSettings.OnlyAdmin;
|
||||
BoundAccessCodeUpperLimit = webUiSettings.BoundAccessCodeUpperLimit;
|
||||
}
|
||||
|
||||
public bool IsLoggedIn { get; private set; }
|
||||
private User LoggedInUser { get; set; } = new();
|
||||
public bool IsAdmin { get; private set; }
|
||||
|
||||
public bool LoginRequired { get; }
|
||||
public bool OnlyAdmin { get; }
|
||||
|
||||
public int Login(string inputCardNum, string inputPassword, DashboardResponse response)
|
||||
{
|
||||
if (inputCardNum == adminUsername && inputPassword == adminPassword)
|
||||
@ -140,26 +139,4 @@ public class LoginService
|
||||
{
|
||||
return LoggedInUser;
|
||||
}
|
||||
|
||||
public void ResetLoggedInUser(DashboardResponse? response)
|
||||
{
|
||||
if (response is null) return;
|
||||
var baid = LoggedInUser.Baid;
|
||||
var newLoggedInUser = response.Users.FirstOrDefault(u => u.Baid == baid);
|
||||
if (newLoggedInUser is null) return;
|
||||
LoggedInUser = newLoggedInUser;
|
||||
}
|
||||
|
||||
public async Task<int> BindAccessCode(string inputAccessCode, HttpClient client)
|
||||
{
|
||||
if (!IsLoggedIn) return 0;
|
||||
if (LoggedInUser.AccessCodes.Count >= BoundAccessCodeUpperLimit) return 2;
|
||||
var request = new BindAccessCodeRequest
|
||||
{
|
||||
AccessCode = inputAccessCode,
|
||||
Baid = LoggedInUser.Baid
|
||||
};
|
||||
var responseMessage = await client.PostAsJsonAsync("api/Cards", request);
|
||||
return responseMessage.IsSuccessStatusCode ? 1 : 3;
|
||||
}
|
||||
}
|
@ -6,6 +6,4 @@ public class WebUiSettings
|
||||
public string AdminUsername { get; set; } = string.Empty;
|
||||
public string AdminPassword { get; set; } = string.Empty;
|
||||
public bool OnlyAdmin { get; set; }
|
||||
|
||||
public int BoundAccessCodeUpperLimit { get; set; }
|
||||
}
|
@ -8,42 +8,42 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autocomplete.Clients" Version="1.1.0"/>
|
||||
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="6.5.10"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0-rc.1.23421.29"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0-rc.1.23421.29" PrivateAssets="all"/>
|
||||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0-rc.1.23419.4"/>
|
||||
<PackageReference Include="MudBlazor" Version="6.10.0"/>
|
||||
<PackageReference Include="SharpZipLib" Version="1.4.2"/>
|
||||
<PackageReference Include="Swan.Core" Version="7.0.0-beta.2"/>
|
||||
<PackageReference Include="Autocomplete.Clients" Version="1.1.0" />
|
||||
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="6.5.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0-rc.1.23421.29" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0-rc.1.23421.29" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0-rc.1.23419.4" />
|
||||
<PackageReference Include="MudBlazor" Version="6.10.0" />
|
||||
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||
<PackageReference Include="Swan.Core" Version="7.0.0-beta.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SharedProject\SharedProject.csproj"/>
|
||||
<ProjectReference Include="..\SharedProject\SharedProject.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="wwwroot\appsettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\musicinfo.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\music_order.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\wordlist.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\music_order.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\musicinfo.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\wordlist.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\appsettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\musicinfo.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\music_order.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\wordlist.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\music_order.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\musicinfo.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\datatable\wordlist.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
"LoginRequired": "false",
|
||||
"AdminUserName": "admin",
|
||||
"AdminPassword": "admin",
|
||||
"OnlyAdmin": "false",
|
||||
"BoundAccessCodeUpperLimit": "3"
|
||||
"OnlyAdmin": "false"
|
||||
}
|
||||
}
|
@ -24,7 +24,7 @@ a, .btn-link {
|
||||
}
|
||||
|
||||
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
|
||||
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
|
||||
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
|
||||
}
|
||||
|
||||
.content {
|
||||
@ -55,12 +55,12 @@ a, .btn-link {
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#blazor-error-ui .dismiss {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
top: 0.5rem;
|
||||
}
|
||||
#blazor-error-ui .dismiss {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
top: 0.5rem;
|
||||
}
|
||||
|
||||
.blazor-error-boundary {
|
||||
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
|
||||
@ -68,9 +68,9 @@ a, .btn-link {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.blazor-error-boundary::after {
|
||||
content: "An error has occurred."
|
||||
}
|
||||
.blazor-error-boundary::after {
|
||||
content: "An error has occurred."
|
||||
}
|
||||
|
||||
.loading-progress {
|
||||
position: relative;
|
||||
@ -80,19 +80,19 @@ a, .btn-link {
|
||||
margin: 20vh auto 1rem auto;
|
||||
}
|
||||
|
||||
.loading-progress circle {
|
||||
fill: none;
|
||||
stroke: #e0e0e0;
|
||||
stroke-width: 0.6rem;
|
||||
transform-origin: 50% 50%;
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
.loading-progress circle {
|
||||
fill: none;
|
||||
stroke: #e0e0e0;
|
||||
stroke-width: 0.6rem;
|
||||
transform-origin: 50% 50%;
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.loading-progress circle:last-child {
|
||||
stroke: #1b6ec2;
|
||||
stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
|
||||
transition: stroke-dasharray 0.05s ease-in-out;
|
||||
}
|
||||
.loading-progress circle:last-child {
|
||||
stroke: #1b6ec2;
|
||||
stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
|
||||
transition: stroke-dasharray 0.05s ease-in-out;
|
||||
}
|
||||
|
||||
.loading-progress-text {
|
||||
position: absolute;
|
||||
@ -101,6 +101,6 @@ a, .btn-link {
|
||||
inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
|
||||
}
|
||||
|
||||
.loading-progress-text:after {
|
||||
content: var(--blazor-load-percentage-text, "Loading");
|
||||
}
|
||||
.loading-progress-text:after {
|
||||
content: var(--blazor-load-percentage-text, "Loading");
|
||||
}
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
### Open Iconic is the open source sibling of [Iconic](https://github.com/iconic/open-iconic). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](https://github.com/iconic/open-iconic)
|
||||
|
||||
|
||||
|
||||
## What's in Open Iconic?
|
||||
|
||||
* 223 icons designed to be legible down to 8 pixels
|
||||
@ -12,6 +14,7 @@
|
||||
* Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats
|
||||
* PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px.
|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
#### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](https://github.com/iconic/open-iconic) and [Reference](https://github.com/iconic/open-iconic) sections.
|
||||
@ -20,8 +23,7 @@
|
||||
|
||||
#### Using Open Iconic's SVGs
|
||||
|
||||
We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest
|
||||
you display them like you would any other image (don't forget the `alt` attribute).
|
||||
We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute).
|
||||
|
||||
```
|
||||
<img src="/open-iconic/svg/icon-name.svg" alt="icon name">
|
||||
@ -29,12 +31,9 @@ you display them like you would any other image (don't forget the `alt` attribut
|
||||
|
||||
#### Using Open Iconic's SVG Sprite
|
||||
|
||||
Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's
|
||||
like an icon font, without being a hack.
|
||||
Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack.
|
||||
|
||||
Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip:
|
||||
To make your icons easily style able, we suggest adding a general class to the* `<svg>` *tag and a unique class name for
|
||||
each different icon in the* `<use>` *tag.*
|
||||
Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `<svg>` *tag and a unique class name for each different icon in the* `<use>` *tag.*
|
||||
|
||||
```
|
||||
<svg class="icon">
|
||||
@ -42,8 +41,7 @@ each different icon in the* `<use>` *tag.*
|
||||
</svg>
|
||||
```
|
||||
|
||||
Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `<svg>` tag with equal width
|
||||
and height dimensions.
|
||||
Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `<svg>` tag with equal width and height dimensions.
|
||||
|
||||
```
|
||||
.icon {
|
||||
@ -64,14 +62,17 @@ To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.c
|
||||
|
||||
#### Using Open Iconic's Icon Font...
|
||||
|
||||
|
||||
##### …with Bootstrap
|
||||
|
||||
You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}`
|
||||
|
||||
|
||||
```
|
||||
<link href="/open-iconic/font/css/open-iconic-bootstrap.css" rel="stylesheet">
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
<span class="oi oi-icon-name" title="icon name" aria-hidden="true"></span>
|
||||
```
|
||||
@ -84,6 +85,7 @@ You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css
|
||||
<link href="/open-iconic/font/css/open-iconic-foundation.css" rel="stylesheet">
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
<span class="fi-icon-name" title="icon name" aria-hidden="true"></span>
|
||||
```
|
||||
@ -100,6 +102,7 @@ You can find our default stylesheets in `font/css/open-iconic.{css, less, scss,
|
||||
<span class="oi" data-glyph="icon-name" title="icon name" aria-hidden="true"></span>
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
### Icons
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,35 +2,35 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"/>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<title>TaikoWebUI</title>
|
||||
<base href="/"/>
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet"/>
|
||||
<base href="/" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
|
||||
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet"/>
|
||||
<link href="css/app.css" rel="stylesheet"/>
|
||||
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet"/>
|
||||
<link href="style.overrides.css" rel="stylesheet"/>
|
||||
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
|
||||
<link href="style.overrides.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<svg class="loading-progress">
|
||||
<circle cx="50%" cy="50%" r="40%"/>
|
||||
<circle cx="50%" cy="50%" r="40%"/>
|
||||
</svg>
|
||||
<div class="loading-progress-text"></div>
|
||||
</div>
|
||||
<div id="app">
|
||||
<svg class="loading-progress">
|
||||
<circle r="40%" cx="50%" cy="50%" />
|
||||
<circle r="40%" cx="50%" cy="50%" />
|
||||
</svg>
|
||||
<div class="loading-progress-text"></div>
|
||||
</div>
|
||||
|
||||
<div id="blazor-error-ui">
|
||||
An unhandled error has occurred.
|
||||
<a class="reload" href="">Reload</a>
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
|
||||
<script src="js/textFit.min.js"></script>
|
||||
<script src="js/updateTextFit.js"></script>
|
||||
<div id="blazor-error-ui">
|
||||
An unhandled error has occurred.
|
||||
<a href="" class="reload">Reload</a>
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
|
||||
<script src="js/textFit.min.js"></script>
|
||||
<script src="js/updateTextFit.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -4,7 +4,6 @@ var myDonName;
|
||||
var myDonNameOutline;
|
||||
var init = false
|
||||
const observer = new ResizeObserver(handleResize);
|
||||
|
||||
function handleResize() {
|
||||
updateFit()
|
||||
}
|
||||
@ -42,22 +41,22 @@ function initNameplate() {
|
||||
if (window.location.href.indexOf("Profile") > -1) {
|
||||
waitForElm('#nameplate-title').then((elm) => {
|
||||
title = elm
|
||||
waitForElm('#nameplate-name').then((elm) => {
|
||||
myDonName = elm
|
||||
waitForElm('#nameplate-name-outline').then((elm) => {
|
||||
myDonNameOutline = elm
|
||||
observer.observe(document.getElementById('nameplate'));
|
||||
init = true
|
||||
waitForElm('#nameplate-name').then((elm) => {
|
||||
myDonName = elm
|
||||
waitForElm('#nameplate-name-outline').then((elm) => {
|
||||
myDonNameOutline = elm
|
||||
observer.observe(document.getElementById('nameplate'));
|
||||
init = true
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function updateFit() {
|
||||
textFit(title, {alignHoriz: true, alignVert: true});
|
||||
textFit(myDonName, {alignHoriz: true, alignVert: true});
|
||||
textFit(myDonNameOutline, {alignHoriz: true, alignVert: true});
|
||||
textFit(title, { alignHoriz: true, alignVert: true });
|
||||
textFit(myDonName, { alignHoriz: true, alignVert: true });
|
||||
textFit(myDonNameOutline, { alignHoriz: true, alignVert: true });
|
||||
}
|
||||
|
||||
|
||||
@ -69,7 +68,6 @@ function updateMyDonName(elm) {
|
||||
updateFit()
|
||||
}
|
||||
}
|
||||
|
||||
function updateTitle(elm) {
|
||||
if (init) {
|
||||
title.textContent = elm
|
||||
|
@ -3,7 +3,7 @@
|
||||
}
|
||||
|
||||
.mud-progress-linear.bar-pass-gold .mud-progress-linear-bars .mud-progress-linear-bar {
|
||||
background: linear-gradient(90deg, rgb(255, 83, 147) 0%, rgb(255, 248, 6) 15%, rgb(255, 248, 6) 20%, rgb(122, 255, 79) 30%, rgb(122, 244, 255) 45%, rgb(149, 104, 255) 70%, rgb(255, 98, 244) 90%, rgb(255, 98, 244) 95%, rgb(255, 83, 147) 100%);
|
||||
background: linear-gradient( 90deg, rgb(255,83,147) 0%, rgb(255,248,6) 15%, rgb(255,248,6) 20%, rgb(122,255,79) 30%, rgb(122,244,255) 45%, rgb(149,104,255) 70%, rgb(255,98,244) 90%, rgb(255,98,244) 95%, rgb(255,83,147) 100% );
|
||||
}
|
||||
|
||||
.mud-progress-linear.bar-pass-red .mud-progress-linear-bars .mud-progress-linear-bar {
|
||||
|
Loading…
x
Reference in New Issue
Block a user