From de1671aac9d3d6fcad5dc2d644facf118aff7a2b Mon Sep 17 00:00:00 2001 From: S-Sebb <794194678@qq.com> Date: Sun, 12 Nov 2023 17:41:36 +0000 Subject: [PATCH] Revert "Add webUI apis to manager user's access codes" This reverts commit c1cac55683f9688c8f7b5b6e1e52838c29126a66. --- GameDatabase/GameDatabase.csproj | 6 +- .../LocalSaveModScoreMigrator.csproj | 20 +- .../Models/Requests/BindAccessCodeRequest.cs | 8 - SharedProject/SharedProject.csproj | 2 +- .../Configurations/DataSettings.json | 12 +- TaikoLocalServer/Configurations/Database.json | 2 +- TaikoLocalServer/Configurations/Logging.json | 10 +- .../Controllers/Api/CardsController.cs | 28 +- .../Controllers/Api/CredentialsController.cs | 8 + .../Controllers/Api/UsersController.cs | 23 - TaikoLocalServer/README.md | 2 +- TaikoLocalServer/Services/CardService.cs | 14 +- .../Services/Interfaces/ICardService.cs | 4 +- .../Services/Interfaces/IUserDatumService.cs | 4 +- TaikoLocalServer/Services/UserDatumService.cs | 10 - TaikoLocalServer/TaikoLocalServer.csproj | 256 ++-- TaikoLocalServer/app.manifest | 4 +- TaikoLocalServer/wwwroot/data/dan_data.json | 1212 ++++++++--------- .../wwwroot/data/event_folder_data.json | 307 ++--- .../wwwroot/data/gaiden_data.json | 44 +- TaikoLocalServer/wwwroot/data/intro_data.json | 160 +-- TaikoWebUI/Pages/AccessCode.razor | 87 -- TaikoWebUI/Pages/AccessCode.razor.cs | 105 -- TaikoWebUI/Pages/DaniDojo.razor.cs | 2 +- .../AccessCodeDeleteConfirmDialog.razor | 23 - .../AccessCodeDeleteConfirmDialog.razor.cs | 38 - .../Dialogs/UserDeleteConfirmDialog.razor | 4 +- .../Dialogs/UserDeleteConfirmDialog.razor.cs | 15 +- TaikoWebUI/Pages/HighScores.razor.cs | 2 +- TaikoWebUI/Pages/Profile.razor.cs | 2 +- TaikoWebUI/Pages/Register.razor | 6 +- TaikoWebUI/Pages/Register.razor.cs | 10 +- TaikoWebUI/Pages/Users.razor | 60 +- TaikoWebUI/Pages/Users.razor.cs | 10 +- TaikoWebUI/Services/LoginService.cs | 29 +- TaikoWebUI/Settings/WebUiSettings.cs | 2 - TaikoWebUI/TaikoWebUI.csproj | 60 +- TaikoWebUI/wwwroot/appsettings.json | 3 +- TaikoWebUI/wwwroot/css/app.css | 50 +- TaikoWebUI/wwwroot/css/open-iconic/README.md | 21 +- .../open-iconic/font/fonts/open-iconic.svg | 1059 +++++++------- TaikoWebUI/wwwroot/index.html | 44 +- TaikoWebUI/wwwroot/js/updateTextFit.js | 22 +- TaikoWebUI/wwwroot/style.overrides.css | 2 +- 44 files changed, 1629 insertions(+), 2163 deletions(-) delete mode 100644 SharedProject/Models/Requests/BindAccessCodeRequest.cs delete mode 100644 TaikoLocalServer/Controllers/Api/UsersController.cs delete mode 100644 TaikoWebUI/Pages/AccessCode.razor delete mode 100644 TaikoWebUI/Pages/AccessCode.razor.cs delete mode 100644 TaikoWebUI/Pages/Dialogs/AccessCodeDeleteConfirmDialog.razor delete mode 100644 TaikoWebUI/Pages/Dialogs/AccessCodeDeleteConfirmDialog.razor.cs diff --git a/GameDatabase/GameDatabase.csproj b/GameDatabase/GameDatabase.csproj index 61d0934..15f82f7 100644 --- a/GameDatabase/GameDatabase.csproj +++ b/GameDatabase/GameDatabase.csproj @@ -8,12 +8,12 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/LocalSaveModScoreMigrator/LocalSaveModScoreMigrator.csproj b/LocalSaveModScoreMigrator/LocalSaveModScoreMigrator.csproj index 23c8a5e..e11aede 100644 --- a/LocalSaveModScoreMigrator/LocalSaveModScoreMigrator.csproj +++ b/LocalSaveModScoreMigrator/LocalSaveModScoreMigrator.csproj @@ -10,19 +10,19 @@ - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + - + diff --git a/SharedProject/Models/Requests/BindAccessCodeRequest.cs b/SharedProject/Models/Requests/BindAccessCodeRequest.cs deleted file mode 100644 index ec8676b..0000000 --- a/SharedProject/Models/Requests/BindAccessCodeRequest.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SharedProject.Models.Requests; - -public class BindAccessCodeRequest -{ - public string AccessCode { get; set; } = string.Empty; - - public uint Baid { get; set; } -} \ No newline at end of file diff --git a/SharedProject/SharedProject.csproj b/SharedProject/SharedProject.csproj index 96c9663..426878f 100644 --- a/SharedProject/SharedProject.csproj +++ b/SharedProject/SharedProject.csproj @@ -8,7 +8,7 @@ - + diff --git a/TaikoLocalServer/Configurations/DataSettings.json b/TaikoLocalServer/Configurations/DataSettings.json index 06fc7cc..52eabe4 100644 --- a/TaikoLocalServer/Configurations/DataSettings.json +++ b/TaikoLocalServer/Configurations/DataSettings.json @@ -1,13 +1,13 @@ { - "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", "LockedSongsDataFileName": "locked_songs_data.json", "QRCodeDataFileName": "qrcode_data.json" - } + } } \ No newline at end of file diff --git a/TaikoLocalServer/Configurations/Database.json b/TaikoLocalServer/Configurations/Database.json index 976f625..1dbc08c 100644 --- a/TaikoLocalServer/Configurations/Database.json +++ b/TaikoLocalServer/Configurations/Database.json @@ -1,3 +1,3 @@ { - "DbFileName": "taiko.db3" + "DbFileName" : "taiko.db3" } \ No newline at end of file diff --git a/TaikoLocalServer/Configurations/Logging.json b/TaikoLocalServer/Configurations/Logging.json index 5a8a8b2..5a5b182 100644 --- a/TaikoLocalServer/Configurations/Logging.json +++ b/TaikoLocalServer/Configurations/Logging.json @@ -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" } } ] } diff --git a/TaikoLocalServer/Controllers/Api/CardsController.cs b/TaikoLocalServer/Controllers/Api/CardsController.cs index 0fd5c46..c395a09 100644 --- a/TaikoLocalServer/Controllers/Api/CardsController.cs +++ b/TaikoLocalServer/Controllers/Api/CardsController.cs @@ -1,5 +1,4 @@ -using GameDatabase.Entities; -using SharedProject.Models.Requests; +using SharedProject.Models.Requests; namespace TaikoLocalServer.Controllers.Api; @@ -13,31 +12,12 @@ public class CardsController : BaseController { this.cardService = cardService; } - + [HttpDelete("{accessCode}")] - public async Task DeleteUser(string accessCode) + public async Task DeleteUser(uint baid) { - var result = await cardService.DeleteCard(accessCode); + var result = await cardService.DeleteCard(baid); return result ? NoContent() : NotFound(); } - - [HttpPost] - public async Task 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(); - } } \ No newline at end of file diff --git a/TaikoLocalServer/Controllers/Api/CredentialsController.cs b/TaikoLocalServer/Controllers/Api/CredentialsController.cs index deb1e24..b6ce9c8 100644 --- a/TaikoLocalServer/Controllers/Api/CredentialsController.cs +++ b/TaikoLocalServer/Controllers/Api/CredentialsController.cs @@ -12,6 +12,14 @@ public class CredentialsController : BaseController { this.credentialService = credentialService; } + + [HttpDelete("{baid}")] + public async Task DeleteUser(uint baid) + { + var result = await credentialService.DeleteCredential(baid); + + return result ? NoContent() : NotFound(); + } [HttpPost] public async Task UpdatePassword(SetPasswordRequest request) diff --git a/TaikoLocalServer/Controllers/Api/UsersController.cs b/TaikoLocalServer/Controllers/Api/UsersController.cs deleted file mode 100644 index c4d4bea..0000000 --- a/TaikoLocalServer/Controllers/Api/UsersController.cs +++ /dev/null @@ -1,23 +0,0 @@ -using SharedProject.Models.Requests; - -namespace TaikoLocalServer.Controllers.Api; - -[ApiController] -[Route("api/[controller]")] -public class UsersController : BaseController -{ - private readonly IUserDatumService userDatumService; - - public UsersController(IUserDatumService userDatumService) - { - this.userDatumService = userDatumService; - } - - [HttpDelete("{baid}")] - public async Task DeleteUser(uint baid) - { - var result = await userDatumService.DeleteUser(baid); - - return result ? NoContent() : NotFound(); - } -} \ No newline at end of file diff --git a/TaikoLocalServer/README.md b/TaikoLocalServer/README.md index 3bcf338..1cd9ad9 100644 --- a/TaikoLocalServer/README.md +++ b/TaikoLocalServer/README.md @@ -1,6 +1,6 @@ # Server -This is the solution for server. +This is the solution for server. Server is implemented with ASP.NET Core 6. ORM is Entity Framework Core 6. Database is SQLite for easier setup. diff --git a/TaikoLocalServer/Services/CardService.cs b/TaikoLocalServer/Services/CardService.cs index 58a17de..a5c07ab 100644 --- a/TaikoLocalServer/Services/CardService.cs +++ b/TaikoLocalServer/Services/CardService.cs @@ -58,13 +58,17 @@ public class CardService : ICardService context.Add(card); await context.SaveChangesAsync(); } - - public async Task DeleteCard(string accessCode) + + public async Task 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; } } \ No newline at end of file diff --git a/TaikoLocalServer/Services/Interfaces/ICardService.cs b/TaikoLocalServer/Services/Interfaces/ICardService.cs index e73ab66..e1aacd4 100644 --- a/TaikoLocalServer/Services/Interfaces/ICardService.cs +++ b/TaikoLocalServer/Services/Interfaces/ICardService.cs @@ -12,6 +12,6 @@ public interface ICardService public Task> GetUsersFromCards(); public Task AddCard(Card card); - - public Task DeleteCard(string accessCode); + + public Task DeleteCard(uint baid); } \ No newline at end of file diff --git a/TaikoLocalServer/Services/Interfaces/IUserDatumService.cs b/TaikoLocalServer/Services/Interfaces/IUserDatumService.cs index a1d3939..5019be5 100644 --- a/TaikoLocalServer/Services/Interfaces/IUserDatumService.cs +++ b/TaikoLocalServer/Services/Interfaces/IUserDatumService.cs @@ -16,9 +16,9 @@ public interface IUserDatumService public Task UpdateUserDatum(UserDatum userDatum); - public Task DeleteUser(uint baid); - public Task> GetFavoriteSongIds(ulong baid); public Task UpdateFavoriteSong(ulong baid, uint songId, bool isFavorite); + + } \ No newline at end of file diff --git a/TaikoLocalServer/Services/UserDatumService.cs b/TaikoLocalServer/Services/UserDatumService.cs index 71fe6c5..00a1f43 100644 --- a/TaikoLocalServer/Services/UserDatumService.cs +++ b/TaikoLocalServer/Services/UserDatumService.cs @@ -56,16 +56,6 @@ public class UserDatumService : IUserDatumService context.Update(userDatum); await context.SaveChangesAsync(); } - - public async Task 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> GetFavoriteSongIds(ulong baid) { diff --git a/TaikoLocalServer/TaikoLocalServer.csproj b/TaikoLocalServer/TaikoLocalServer.csproj index edade3a..a0568a6 100644 --- a/TaikoLocalServer/TaikoLocalServer.csproj +++ b/TaikoLocalServer/TaikoLocalServer.csproj @@ -6,154 +6,154 @@ enable 1.0.0-beta 11 - false + false app.manifest - + - - - + + + - all - runtime; build; native; contentfiles; analyzers; buildtransitive + all + runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - + + + + + + + + + + + - - PreserveNewest - - - PreserveNewest - - - - PreserveNewest - - - - PreserveNewest - - - - PreserveNewest - - - - PreserveNewest - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - + + PreserveNewest + + + PreserveNewest + + + + PreserveNewest + + + + PreserveNewest + + + + PreserveNewest + + + + PreserveNewest + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + - - + + - + diff --git a/TaikoLocalServer/app.manifest b/TaikoLocalServer/app.manifest index babe593..3226e83 100644 --- a/TaikoLocalServer/app.manifest +++ b/TaikoLocalServer/app.manifest @@ -16,7 +16,7 @@ 如果你的应用程序需要此虚拟化来实现向后兼容性,则移除此 元素。 --> - + @@ -40,7 +40,7 @@ - + diff --git a/TaikoLocalServer/wwwroot/data/dan_data.json b/TaikoLocalServer/wwwroot/data/dan_data.json index a32505e..d39ed99 100644 --- a/TaikoLocalServer/wwwroot/data/dan_data.json +++ b/TaikoLocalServer/wwwroot/data/dan_data.json @@ -1,937 +1,937 @@ [ { - "danId": 1, - "verupNo": 1, - "title": "5kyuu", - "aryOdaiSong": [ + "danId":1, + "verupNo":1, + "title":"5kyuu", + "aryOdaiSong":[ { - "songNo": 420, - "level": 2, - "isHiddenSongName": false + "songNo":420, + "level":2, + "isHiddenSongName":false }, { - "songNo": 881, - "level": 2, - "isHiddenSongName": false + "songNo":881, + "level":2, + "isHiddenSongName":false }, { - "songNo": 995, - "level": 2, - "isHiddenSongName": false + "songNo":995, + "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": 884, - "goldBorderTotal": 936 + "odaiType":8, + "borderType":1, + "redBorderTotal":884, + "goldBorderTotal":936 } ] }, { - "danId": 2, - "verupNo": 1, - "title": "4kyuu", - "aryOdaiSong": [ + "danId":2, + "verupNo":1, + "title":"4kyuu", + "aryOdaiSong":[ { - "songNo": 828, - "level": 3, - "isHiddenSongName": false + "songNo":828, + "level":3, + "isHiddenSongName":false }, { - "songNo": 882, - "level": 3, - "isHiddenSongName": false + "songNo":882, + "level":3, + "isHiddenSongName":false }, { - "songNo": 284, - "level": 3, - "isHiddenSongName": false + "songNo":284, + "level":3, + "isHiddenSongName":false } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 94, - "goldBorderTotal": 97 + "odaiType":1, + "borderType":1, + "redBorderTotal":94, + "goldBorderTotal":97 }, { - "odaiType": 8, - "borderType": 1, - "redBorderTotal": 1171, - "goldBorderTotal": 1235 + "odaiType":8, + "borderType":1, + "redBorderTotal":1171, + "goldBorderTotal":1235 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 92, - "goldBorderTotal": 78 + "odaiType":4, + "borderType":1, + "redBorderTotal":92, + "goldBorderTotal":78 } ] }, { - "danId": 3, - "verupNo": 1, - "title": "3kyuu", - "aryOdaiSong": [ + "danId":3, + "verupNo":1, + "title":"3kyuu", + "aryOdaiSong":[ { - "songNo": 268, - "level": 3, - "isHiddenSongName": false + "songNo":268, + "level":3, + "isHiddenSongName":false }, { - "songNo": 1035, - "level": 3, - "isHiddenSongName": false + "songNo":1035, + "level":3, + "isHiddenSongName":false }, { - "songNo": 1079, - "level": 3, - "isHiddenSongName": false + "songNo":1079, + "level":3, + "isHiddenSongName":false } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 95, - "goldBorderTotal": 99 + "odaiType":1, + "borderType":1, + "redBorderTotal":95, + "goldBorderTotal":99 }, { - "odaiType": 8, - "borderType": 1, - "redBorderTotal": 1521, - "goldBorderTotal": 1586 + "odaiType":8, + "borderType":1, + "redBorderTotal":1521, + "goldBorderTotal":1586 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 70, - "goldBorderTotal": 47 + "odaiType":4, + "borderType":1, + "redBorderTotal":70, + "goldBorderTotal":47 } ] }, { - "danId": 4, - "verupNo": 1, - "title": "2kyuu", - "aryOdaiSong": [ + "danId":4, + "verupNo":1, + "title":"2kyuu", + "aryOdaiSong":[ { - "songNo": 84, - "level": 3, - "isHiddenSongName": false + "songNo":84, + "level":3, + "isHiddenSongName":false }, { - "songNo": 405, - "level": 3, - "isHiddenSongName": false + "songNo":405, + "level":3, + "isHiddenSongName":false }, { - "songNo": 730, - "level": 3, - "isHiddenSongName": false + "songNo":730, + "level":3, + "isHiddenSongName":false } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 96, - "goldBorderTotal": 100 + "odaiType":1, + "borderType":1, + "redBorderTotal":96, + "goldBorderTotal":100 }, { - "odaiType": 8, - "borderType": 1, - "redBorderTotal": 1287, - "goldBorderTotal": 1328 + "odaiType":8, + "borderType":1, + "redBorderTotal":1287, + "goldBorderTotal":1328 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 47, - "goldBorderTotal": 23 + "odaiType":4, + "borderType":1, + "redBorderTotal":47, + "goldBorderTotal":23 } ] }, { - "danId": 5, - "verupNo": 1, - "title": "1kyuu", - "aryOdaiSong": [ + "danId":5, + "verupNo":1, + "title":"1kyuu", + "aryOdaiSong":[ { - "songNo": 907, - "level": 3, - "isHiddenSongName": false + "songNo":907, + "level":3, + "isHiddenSongName":false }, { - "songNo": 884, - "level": 4, - "isHiddenSongName": false + "songNo":884, + "level":4, + "isHiddenSongName":false }, { - "songNo": 9, - "level": 4, - "isHiddenSongName": false + "songNo":9, + "level":4, + "isHiddenSongName":false } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 96, - "goldBorderTotal": 100 + "odaiType":1, + "borderType":1, + "redBorderTotal":96, + "goldBorderTotal":100 }, { - "odaiType": 8, - "borderType": 1, - "redBorderTotal": 1365, - "goldBorderTotal": 1408 + "odaiType":8, + "borderType":1, + "redBorderTotal":1365, + "goldBorderTotal":1408 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 37, - "goldBorderTotal": 31 + "odaiType":4, + "borderType":1, + "redBorderTotal":37, + "goldBorderTotal":31 } ] }, { - "danId": 6, - "verupNo": 1, - "title": "1dan", - "aryOdaiSong": [ + "danId":6, + "verupNo":1, + "title":"1dan", + "aryOdaiSong":[ { - "songNo": 384, - "level": 4, - "isHiddenSongName": false + "songNo":384, + "level":4, + "isHiddenSongName":false }, { - "songNo": 273, - "level": 4, - "isHiddenSongName": false + "songNo":273, + "level":4, + "isHiddenSongName":false }, { - "songNo": 1100, - "level": 4, - "isHiddenSongName": false + "songNo":1100, + "level":4, + "isHiddenSongName":false } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 97, - "goldBorderTotal": 100 + "odaiType":1, + "borderType":1, + "redBorderTotal":97, + "goldBorderTotal":100 }, { - "odaiType": 2, - "borderType": 1, - "redBorderTotal": 934, - "goldBorderTotal": 980 + "odaiType":2, + "borderType":1, + "redBorderTotal":934, + "goldBorderTotal":980 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 30, - "goldBorderTotal": 15 + "odaiType":4, + "borderType":1, + "redBorderTotal":30, + "goldBorderTotal":15 }, { - "odaiType": 6, - "borderType": 2, - "redBorder_1": 58, - "goldBorder_1": 65, - "redBorder_2": 75, - "goldBorder_2": 84, - "redBorder_3": 29, - "goldBorder_3": 33 + "odaiType":6, + "borderType":2, + "redBorder_1":58, + "goldBorder_1":65, + "redBorder_2":75, + "goldBorder_2":84, + "redBorder_3":29, + "goldBorder_3":33 } ] }, { - "danId": 7, - "verupNo": 1, - "title": "2dan", - "aryOdaiSong": [ + "danId":7, + "verupNo":1, + "title":"2dan", + "aryOdaiSong":[ { - "songNo": 436, - "level": 4, - "isHiddenSongName": false + "songNo":436, + "level":4, + "isHiddenSongName":false }, { - "songNo": 305, - "level": 4, - "isHiddenSongName": false + "songNo":305, + "level":4, + "isHiddenSongName":false }, { - "songNo": 1053, - "level": 4, - "isHiddenSongName": false + "songNo":1053, + "level":4, + "isHiddenSongName":false } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 98, - "goldBorderTotal": 100 + "odaiType":1, + "borderType":1, + "redBorderTotal":98, + "goldBorderTotal":100 }, { - "odaiType": 2, - "borderType": 1, - "redBorderTotal": 976, - "goldBorderTotal": 1021 + "odaiType":2, + "borderType":1, + "redBorderTotal":976, + "goldBorderTotal":1021 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 26, - "goldBorderTotal": 14 + "odaiType":4, + "borderType":1, + "redBorderTotal":26, + "goldBorderTotal":14 }, { - "odaiType": 6, - "borderType": 2, - "redBorder_1": 63, - "goldBorder_1": 71, - "redBorder_2": 80, - "goldBorder_2": 90, - "redBorder_3": 139, - "goldBorder_3": 157 + "odaiType":6, + "borderType":2, + "redBorder_1":63, + "goldBorder_1":71, + "redBorder_2":80, + "goldBorder_2":90, + "redBorder_3":139, + "goldBorder_3":157 } ] }, { - "danId": 8, - "verupNo": 1, - "title": "3dan", - "aryOdaiSong": [ + "danId":8, + "verupNo":1, + "title":"3dan", + "aryOdaiSong":[ { - "songNo": 973, - "level": 4, - "isHiddenSongName": false + "songNo":973, + "level":4, + "isHiddenSongName":false }, { - "songNo": 364, - "level": 4, - "isHiddenSongName": false + "songNo":364, + "level":4, + "isHiddenSongName":false }, { - "songNo": 426, - "level": 4, - "isHiddenSongName": false + "songNo":426, + "level":4, + "isHiddenSongName":false } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 99, - "goldBorderTotal": 100 + "odaiType":1, + "borderType":1, + "redBorderTotal":99, + "goldBorderTotal":100 }, { - "odaiType": 2, - "borderType": 1, - "redBorderTotal": 1254, - "goldBorderTotal": 1308 + "odaiType":2, + "borderType":1, + "redBorderTotal":1254, + "goldBorderTotal":1308 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 28, - "goldBorderTotal": 14 + "odaiType":4, + "borderType":1, + "redBorderTotal":28, + "goldBorderTotal":14 }, { - "odaiType": 6, - "borderType": 2, - "redBorder_1": 29, - "goldBorder_1": 33, - "redBorder_2": 26, - "goldBorder_2": 30, - "redBorder_3": 132, - "goldBorder_3": 148 + "odaiType":6, + "borderType":2, + "redBorder_1":29, + "goldBorder_1":33, + "redBorder_2":26, + "goldBorder_2":30, + "redBorder_3":132, + "goldBorder_3":148 } ] }, { - "danId": 9, - "verupNo": 1, - "title": "4dan", - "aryOdaiSong": [ + "danId":9, + "verupNo":1, + "title":"4dan", + "aryOdaiSong":[ { - "songNo": 212, - "level": 4, - "isHiddenSongName": false + "songNo":212, + "level":4, + "isHiddenSongName":false }, { - "songNo": 184, - "level": 4, - "isHiddenSongName": false + "songNo":184, + "level":4, + "isHiddenSongName":false }, { - "songNo": 137, - "level": 4, - "isHiddenSongName": false + "songNo":137, + "level":4, + "isHiddenSongName":false } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 99, - "goldBorderTotal": 100 + "odaiType":1, + "borderType":1, + "redBorderTotal":99, + "goldBorderTotal":100 }, { - "odaiType": 2, - "borderType": 1, - "redBorderTotal": 1371, - "goldBorderTotal": 1427 + "odaiType":2, + "borderType":1, + "redBorderTotal":1371, + "goldBorderTotal":1427 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 25, - "goldBorderTotal": 12 + "odaiType":4, + "borderType":1, + "redBorderTotal":25, + "goldBorderTotal":12 }, { - "odaiType": 6, - "borderType": 2, - "redBorder_1": 0, - "goldBorder_1": 0, - "redBorder_2": 11, - "goldBorder_2": 13, - "redBorder_3": 106, - "goldBorder_3": 119 + "odaiType":6, + "borderType":2, + "redBorder_1":0, + "goldBorder_1":0, + "redBorder_2":11, + "goldBorder_2":13, + "redBorder_3":106, + "goldBorder_3":119 } ] }, { - "danId": 10, - "verupNo": 1, - "title": "5dan", - "aryOdaiSong": [ + "danId":10, + "verupNo":1, + "title":"5dan", + "aryOdaiSong":[ { - "songNo": 855, - "level": 4, - "isHiddenSongName": false + "songNo":855, + "level":4, + "isHiddenSongName":false }, { - "songNo": 950, - "level": 4, - "isHiddenSongName": false + "songNo":950, + "level":4, + "isHiddenSongName":false }, { - "songNo": 53, - "level": 4, - "isHiddenSongName": false + "songNo":53, + "level":4, + "isHiddenSongName":false } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 99, - "goldBorderTotal": 100 + "odaiType":1, + "borderType":1, + "redBorderTotal":99, + "goldBorderTotal":100 }, { - "odaiType": 2, - "borderType": 1, - "redBorderTotal": 1276, - "goldBorderTotal": 1325 + "odaiType":2, + "borderType":1, + "redBorderTotal":1276, + "goldBorderTotal":1325 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 19, - "goldBorderTotal": 9 + "odaiType":4, + "borderType":1, + "redBorderTotal":19, + "goldBorderTotal":9 }, { - "odaiType": 6, - "borderType": 2, - "redBorder_1": 126, - "goldBorder_1": 141, - "redBorder_2": 199, - "goldBorder_2": 222, - "redBorder_3": 28, - "goldBorder_3": 32 + "odaiType":6, + "borderType":2, + "redBorder_1":126, + "goldBorder_1":141, + "redBorder_2":199, + "goldBorder_2":222, + "redBorder_3":28, + "goldBorder_3":32 } ] }, { - "danId": 11, - "verupNo": 1, - "title": "6dan", - "aryOdaiSong": [ + "danId":11, + "verupNo":1, + "title":"6dan", + "aryOdaiSong":[ { - "songNo": 963, - "level": 4, - "isHiddenSongName": false + "songNo":963, + "level":4, + "isHiddenSongName":false }, { - "songNo": 918, - "level": 4, - "isHiddenSongName": false + "songNo":918, + "level":4, + "isHiddenSongName":false }, { - "songNo": 270, - "level": 5, - "isHiddenSongName": false + "songNo":270, + "level":5, + "isHiddenSongName":false } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 100, - "goldBorderTotal": 100 + "odaiType":1, + "borderType":1, + "redBorderTotal":100, + "goldBorderTotal":100 }, { - "odaiType": 2, - "borderType": 1, - "redBorderTotal": 1745, - "goldBorderTotal": 1809 + "odaiType":2, + "borderType":1, + "redBorderTotal":1745, + "goldBorderTotal":1809 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 21, - "goldBorderTotal": 10 + "odaiType":4, + "borderType":1, + "redBorderTotal":21, + "goldBorderTotal":10 }, { - "odaiType": 6, - "borderType": 2, - "redBorder_1": 154, - "goldBorder_1": 165, - "redBorder_2": 28, - "goldBorder_2": 30, - "redBorder_3": 0, - "goldBorder_3": 0 + "odaiType":6, + "borderType":2, + "redBorder_1":154, + "goldBorder_1":165, + "redBorder_2":28, + "goldBorder_2":30, + "redBorder_3":0, + "goldBorder_3":0 } ] }, { - "danId": 12, - "verupNo": 1, - "title": "7dan", - "aryOdaiSong": [ + "danId":12, + "verupNo":1, + "title":"7dan", + "aryOdaiSong":[ { - "songNo": 919, - "level": 4, - "isHiddenSongName": false + "songNo":919, + "level":4, + "isHiddenSongName":false }, { - "songNo": 445, - "level": 4, - "isHiddenSongName": false + "songNo":445, + "level":4, + "isHiddenSongName":false }, { - "songNo": 202, - "level": 4, - "isHiddenSongName": false + "songNo":202, + "level":4, + "isHiddenSongName":false } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 100, - "goldBorderTotal": 100 + "odaiType":1, + "borderType":1, + "redBorderTotal":100, + "goldBorderTotal":100 }, { - "odaiType": 2, - "borderType": 1, - "redBorderTotal": 1764, - "goldBorderTotal": 1826 + "odaiType":2, + "borderType":1, + "redBorderTotal":1764, + "goldBorderTotal":1826 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 16, - "goldBorderTotal": 8 + "odaiType":4, + "borderType":1, + "redBorderTotal":16, + "goldBorderTotal":8 }, { - "odaiType": 6, - "borderType": 2, - "redBorder_1": 135, - "goldBorder_1": 148, - "redBorder_2": 68, - "goldBorder_2": 74, - "redBorder_3": 288, - "goldBorder_3": 317 + "odaiType":6, + "borderType":2, + "redBorder_1":135, + "goldBorder_1":148, + "redBorder_2":68, + "goldBorder_2":74, + "redBorder_3":288, + "goldBorder_3":317 } ] }, { - "danId": 13, - "verupNo": 1, - "title": "8dan", - "aryOdaiSong": [ + "danId":13, + "verupNo":1, + "title":"8dan", + "aryOdaiSong":[ { - "songNo": 684, - "level": 4, - "isHiddenSongName": false + "songNo":684, + "level":4, + "isHiddenSongName":false }, { - "songNo": 164, - "level": 4, - "isHiddenSongName": false + "songNo":164, + "level":4, + "isHiddenSongName":false }, { - "songNo": 1015, - "level": 4, - "isHiddenSongName": false + "songNo":1015, + "level":4, + "isHiddenSongName":false } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 100, - "goldBorderTotal": 100 + "odaiType":1, + "borderType":1, + "redBorderTotal":100, + "goldBorderTotal":100 }, { - "odaiType": 2, - "borderType": 1, - "redBorderTotal": 1892, - "goldBorderTotal": 1955 + "odaiType":2, + "borderType":1, + "redBorderTotal":1892, + "goldBorderTotal":1955 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 12, - "goldBorderTotal": 6 + "odaiType":4, + "borderType":1, + "redBorderTotal":12, + "goldBorderTotal":6 }, { - "odaiType": 6, - "borderType": 2, - "redBorder_1": 85, - "goldBorder_1": 92, - "redBorder_2": 72, - "goldBorder_2": 76, - "redBorder_3": 115, - "goldBorder_3": 123 + "odaiType":6, + "borderType":2, + "redBorder_1":85, + "goldBorder_1":92, + "redBorder_2":72, + "goldBorder_2":76, + "redBorder_3":115, + "goldBorder_3":123 } ] }, { - "danId": 14, - "verupNo": 1, - "title": "9dan", - "aryOdaiSong": [ + "danId":14, + "verupNo":1, + "title":"9dan", + "aryOdaiSong":[ { - "songNo": 568, - "level": 4, - "isHiddenSongName": false + "songNo":568, + "level":4, + "isHiddenSongName":false }, { - "songNo": 117, - "level": 4, - "isHiddenSongName": false + "songNo":117, + "level":4, + "isHiddenSongName":false }, { - "songNo": 21, - "level": 4, - "isHiddenSongName": false + "songNo":21, + "level":4, + "isHiddenSongName":false } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 100, - "goldBorderTotal": 100 + "odaiType":1, + "borderType":1, + "redBorderTotal":100, + "goldBorderTotal":100 }, { - "odaiType": 2, - "borderType": 1, - "redBorderTotal": 2045, - "goldBorderTotal": 2100 + "odaiType":2, + "borderType":1, + "redBorderTotal":2045, + "goldBorderTotal":2100 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 10, - "goldBorderTotal": 5 + "odaiType":4, + "borderType":1, + "redBorderTotal":10, + "goldBorderTotal":5 }, { - "odaiType": 6, - "borderType": 2, - "redBorder_1": 107, - "goldBorder_1": 114, - "redBorder_2": 74, - "goldBorder_2": 79, - "redBorder_3": 54, - "goldBorder_3": 59 + "odaiType":6, + "borderType":2, + "redBorder_1":107, + "goldBorder_1":114, + "redBorder_2":74, + "goldBorder_2":79, + "redBorder_3":54, + "goldBorder_3":59 } ] }, { - "danId": 15, - "verupNo": 1, - "title": "10dan", - "aryOdaiSong": [ + "danId":15, + "verupNo":1, + "title":"10dan", + "aryOdaiSong":[ { - "songNo": 502, - "level": 4, - "isHiddenSongName": false + "songNo":502, + "level":4, + "isHiddenSongName":false }, { - "songNo": 360, - "level": 4, - "isHiddenSongName": false + "songNo":360, + "level":4, + "isHiddenSongName":false }, { - "songNo": 1104, - "level": 4, - "isHiddenSongName": false + "songNo":1104, + "level":4, + "isHiddenSongName":false } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 100, - "goldBorderTotal": 100 + "odaiType":1, + "borderType":1, + "redBorderTotal":100, + "goldBorderTotal":100 }, { - "odaiType": 3, - "borderType": 2, - "redBorder_1": 20, - "goldBorder_1": 11, - "redBorder_2": 25, - "goldBorder_2": 13, - "redBorder_3": 30, - "goldBorder_3": 16 + "odaiType":3, + "borderType":2, + "redBorder_1":20, + "goldBorder_1":11, + "redBorder_2":25, + "goldBorder_2":13, + "redBorder_3":30, + "goldBorder_3":16 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 7, - "goldBorderTotal": 3 + "odaiType":4, + "borderType":1, + "redBorderTotal":7, + "goldBorderTotal":3 }, { - "odaiType": 6, - "borderType": 2, - "redBorder_1": 127, - "goldBorder_1": 137, - "redBorder_2": 16, - "goldBorder_2": 17, - "redBorder_3": 45, - "goldBorder_3": 49 + "odaiType":6, + "borderType":2, + "redBorder_1":127, + "goldBorder_1":137, + "redBorder_2":16, + "goldBorder_2":17, + "redBorder_3":45, + "goldBorder_3":49 } ] }, { - "danId": 16, - "verupNo": 1, - "title": "11dan", - "aryOdaiSong": [ + "danId":16, + "verupNo":1, + "title":"11dan", + "aryOdaiSong":[ { - "songNo": 774, - "level": 4, - "isHiddenSongName": false + "songNo":774, + "level":4, + "isHiddenSongName":false }, { - "songNo": 954, - "level": 4, - "isHiddenSongName": false + "songNo":954, + "level":4, + "isHiddenSongName":false }, { - "songNo": 1121, - "level": 5, - "isHiddenSongName": true + "songNo":1121, + "level":5, + "isHiddenSongName":true } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 100, - "goldBorderTotal": 100 + "odaiType":1, + "borderType":1, + "redBorderTotal":100, + "goldBorderTotal":100 }, { - "odaiType": 3, - "borderType": 1, - "redBorderTotal": 50, - "goldBorderTotal": 25 + "odaiType":3, + "borderType":1, + "redBorderTotal":50, + "goldBorderTotal":25 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 6, - "goldBorderTotal": 4 + "odaiType":4, + "borderType":1, + "redBorderTotal":6, + "goldBorderTotal":4 }, { - "odaiType": 6, - "borderType": 2, - "redBorder_1": 155, - "goldBorder_1": 171, - "redBorder_2": 54, - "goldBorder_2": 62, - "redBorder_3": 70, - "goldBorder_3": 72 + "odaiType":6, + "borderType":2, + "redBorder_1":155, + "goldBorder_1":171, + "redBorder_2":54, + "goldBorder_2":62, + "redBorder_3":70, + "goldBorder_3":72 } ] }, { - "danId": 17, - "verupNo": 1, - "title": "12dan", - "aryOdaiSong": [ + "danId":17, + "verupNo":1, + "title":"12dan", + "aryOdaiSong":[ { - "songNo": 736, - "level": 5, - "isHiddenSongName": false + "songNo":736, + "level":5, + "isHiddenSongName":false }, { - "songNo": 748, - "level": 4, - "isHiddenSongName": false + "songNo":748, + "level":4, + "isHiddenSongName":false }, { - "songNo": 1120, - "level": 5, - "isHiddenSongName": true + "songNo":1120, + "level":5, + "isHiddenSongName":true } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 100, - "goldBorderTotal": 100 + "odaiType":1, + "borderType":1, + "redBorderTotal":100, + "goldBorderTotal":100 }, { - "odaiType": 3, - "borderType": 1, - "redBorderTotal": 30, - "goldBorderTotal": 15 + "odaiType":3, + "borderType":1, + "redBorderTotal":30, + "goldBorderTotal":15 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 5, - "goldBorderTotal": 2 + "odaiType":4, + "borderType":1, + "redBorderTotal":5, + "goldBorderTotal":2 }, { - "odaiType": 6, - "borderType": 2, - "redBorder_1": 139, - "goldBorder_1": 163, - "redBorder_2": 58, - "goldBorder_2": 69, - "redBorder_3": 132, - "goldBorder_3": 139 + "odaiType":6, + "borderType":2, + "redBorder_1":139, + "goldBorder_1":163, + "redBorder_2":58, + "goldBorder_2":69, + "redBorder_3":132, + "goldBorder_3":139 } ] }, { - "danId": 18, - "verupNo": 1, - "title": "13dan", - "aryOdaiSong": [ + "danId":18, + "verupNo":1, + "title":"13dan", + "aryOdaiSong":[ { - "songNo": 982, - "level": 4, - "isHiddenSongName": false + "songNo":982, + "level":4, + "isHiddenSongName":false }, { - "songNo": 990, - "level": 4, - "isHiddenSongName": false + "songNo":990, + "level":4, + "isHiddenSongName":false }, { - "songNo": 1122, - "level": 5, - "isHiddenSongName": true + "songNo":1122, + "level":5, + "isHiddenSongName":true } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 100, - "goldBorderTotal": 100 + "odaiType":1, + "borderType":1, + "redBorderTotal":100, + "goldBorderTotal":100 }, { - "odaiType": 3, - "borderType": 1, - "redBorderTotal": 15, - "goldBorderTotal": 6 + "odaiType":3, + "borderType":1, + "redBorderTotal":15, + "goldBorderTotal":6 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 4, - "goldBorderTotal": 2 + "odaiType":4, + "borderType":1, + "redBorderTotal":4, + "goldBorderTotal":2 }, { - "odaiType": 6, - "borderType": 2, - "redBorder_1": 86, - "goldBorder_1": 96, - "redBorder_2": 0, - "goldBorder_2": 0, - "redBorder_3": 232, - "goldBorder_3": 273 + "odaiType":6, + "borderType":2, + "redBorder_1":86, + "goldBorder_1":96, + "redBorder_2":0, + "goldBorder_2":0, + "redBorder_3":232, + "goldBorder_3":273 } ] }, { - "danId": 19, - "verupNo": 1, - "title": "14dan", - "aryOdaiSong": [ + "danId":19, + "verupNo":1, + "title":"14dan", + "aryOdaiSong":[ { - "songNo": 555, - "level": 4, - "isHiddenSongName": true + "songNo":555, + "level":4, + "isHiddenSongName":true }, { - "songNo": 721, - "level": 5, - "isHiddenSongName": true + "songNo":721, + "level":5, + "isHiddenSongName":true }, { - "songNo": 1129, - "level": 5, - "isHiddenSongName": true + "songNo":1129, + "level":5, + "isHiddenSongName":true } ], - "aryOdaiBorder": [ + "aryOdaiBorder":[ { - "odaiType": 1, - "borderType": 1, - "redBorderTotal": 100, - "goldBorderTotal": 100 + "odaiType":1, + "borderType":1, + "redBorderTotal":100, + "goldBorderTotal":100 }, { - "odaiType": 3, - "borderType": 1, - "redBorderTotal": 8, - "goldBorderTotal": 1 + "odaiType":3, + "borderType":1, + "redBorderTotal":8, + "goldBorderTotal":1 }, { - "odaiType": 4, - "borderType": 1, - "redBorderTotal": 3, - "goldBorderTotal": 1 + "odaiType":4, + "borderType":1, + "redBorderTotal":3, + "goldBorderTotal":1 }, { - "odaiType": 6, - "borderType": 2, - "redBorder_1": 34, - "goldBorder_1": 35, - "redBorder_2": 17, - "goldBorder_2": 22, - "redBorder_3": 40, - "goldBorder_3": 50 + "odaiType":6, + "borderType":2, + "redBorder_1":34, + "goldBorder_1":35, + "redBorder_2":17, + "goldBorder_2":22, + "redBorder_3":40, + "goldBorder_3":50 } ] } diff --git a/TaikoLocalServer/wwwroot/data/event_folder_data.json b/TaikoLocalServer/wwwroot/data/event_folder_data.json index 518590b..9e5dd84 100644 --- a/TaikoLocalServer/wwwroot/data/event_folder_data.json +++ b/TaikoLocalServer/wwwroot/data/event_folder_data.json @@ -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": [] + } ] diff --git a/TaikoLocalServer/wwwroot/data/gaiden_data.json b/TaikoLocalServer/wwwroot/data/gaiden_data.json index f4b7e70..d732bb2 100644 --- a/TaikoLocalServer/wwwroot/data/gaiden_data.json +++ b/TaikoLocalServer/wwwroot/data/gaiden_data.json @@ -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 } ] } diff --git a/TaikoLocalServer/wwwroot/data/intro_data.json b/TaikoLocalServer/wwwroot/data/intro_data.json index 085e04a..e5941d2 100644 --- a/TaikoLocalServer/wwwroot/data/intro_data.json +++ b/TaikoLocalServer/wwwroot/data/intro_data.json @@ -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] } ] \ No newline at end of file diff --git a/TaikoWebUI/Pages/AccessCode.razor b/TaikoWebUI/Pages/AccessCode.razor deleted file mode 100644 index e13c917..0000000 --- a/TaikoWebUI/Pages/AccessCode.razor +++ /dev/null @@ -1,87 +0,0 @@ -@page "/Users/{baid:int}/AccessCode" -@inject HttpClient Client -@inject IDialogService DialogService -@inject LoginService LoginService -@inject NavigationManager NavigationManager - - - -

Access Code Management

-User: @Baid - -@if (response is null) - { - @for (uint i = 0; i < 3; i++) - { - - - - - - - - - - - - - - - - } - } -else - { - @if ((LoginService.LoginRequired && (!LoginService.IsLoggedIn || (LoginService.GetLoggedInUser().Baid != Baid && !LoginService.IsAdmin))) || User is null) - { - - - Please log in by clicking on "Users" tab first. - - - } - else - { - - - - - - Bind New Access Code - - Bind - - - - - - @for (var idx = 0; idx < User.AccessCodes.Count; idx++) - { - var accessCode = User.AccessCodes[idx]; - var localIdx = idx + 1; - - - - - User Access Code @localIdx - - - - @accessCode - - - - Delete Access Code - - - - - - } - - } - } \ No newline at end of file diff --git a/TaikoWebUI/Pages/AccessCode.razor.cs b/TaikoWebUI/Pages/AccessCode.razor.cs deleted file mode 100644 index 27e631d..0000000 --- a/TaikoWebUI/Pages/AccessCode.razor.cs +++ /dev/null @@ -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 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("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 - { - { x => x.User, User }, - { x => x.AccessCode, accessCode } - }; - - var dialog = DialogService.Show("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.
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.
Please delete one access code first.", - "Ok"); - break; - case 3: - await DialogService.ShowMessageBox( - "Error", - (MarkupString) - "Access code already bound.
Please delete it from the bound user first.", - "Ok"); - break; - } - } - } -} \ No newline at end of file diff --git a/TaikoWebUI/Pages/DaniDojo.razor.cs b/TaikoWebUI/Pages/DaniDojo.razor.cs index 221a9ef..8c14f4e 100644 --- a/TaikoWebUI/Pages/DaniDojo.razor.cs +++ b/TaikoWebUI/Pages/DaniDojo.razor.cs @@ -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)); } diff --git a/TaikoWebUI/Pages/Dialogs/AccessCodeDeleteConfirmDialog.razor b/TaikoWebUI/Pages/Dialogs/AccessCodeDeleteConfirmDialog.razor deleted file mode 100644 index 3685245..0000000 --- a/TaikoWebUI/Pages/Dialogs/AccessCodeDeleteConfirmDialog.razor +++ /dev/null @@ -1,23 +0,0 @@ -@inject HttpClient Client -@inject ISnackbar Snackbar - - - - - - Delete user? - - - - - Do you really want to delete the access code @AccessCode? - This process cannot be undone! - - - - CANCEL - - DELETE - - - \ No newline at end of file diff --git a/TaikoWebUI/Pages/Dialogs/AccessCodeDeleteConfirmDialog.razor.cs b/TaikoWebUI/Pages/Dialogs/AccessCodeDeleteConfirmDialog.razor.cs deleted file mode 100644 index c2a42e2..0000000 --- a/TaikoWebUI/Pages/Dialogs/AccessCodeDeleteConfirmDialog.razor.cs +++ /dev/null @@ -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)); - } -} \ No newline at end of file diff --git a/TaikoWebUI/Pages/Dialogs/UserDeleteConfirmDialog.razor b/TaikoWebUI/Pages/Dialogs/UserDeleteConfirmDialog.razor index c7e9f3d..042a818 100644 --- a/TaikoWebUI/Pages/Dialogs/UserDeleteConfirmDialog.razor +++ b/TaikoWebUI/Pages/Dialogs/UserDeleteConfirmDialog.razor @@ -15,9 +15,9 @@ - CANCEL + Cancel - DELETE + Delete User \ No newline at end of file diff --git a/TaikoWebUI/Pages/Dialogs/UserDeleteConfirmDialog.razor.cs b/TaikoWebUI/Pages/Dialogs/UserDeleteConfirmDialog.razor.cs index 84e0677..293176d 100644 --- a/TaikoWebUI/Pages/Dialogs/UserDeleteConfirmDialog.razor.cs +++ b/TaikoWebUI/Pages/Dialogs/UserDeleteConfirmDialog.razor.cs @@ -13,15 +13,24 @@ 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)); return; } - + Snackbar.Add("Delete success!", Severity.Success); MudDialog.Close(DialogResult.Ok(true)); } diff --git a/TaikoWebUI/Pages/HighScores.razor.cs b/TaikoWebUI/Pages/HighScores.razor.cs index b1738c1..5d10f83 100644 --- a/TaikoWebUI/Pages/HighScores.razor.cs +++ b/TaikoWebUI/Pages/HighScores.razor.cs @@ -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)); } diff --git a/TaikoWebUI/Pages/Profile.razor.cs b/TaikoWebUI/Pages/Profile.razor.cs index c9fc558..41696a7 100644 --- a/TaikoWebUI/Pages/Profile.razor.cs +++ b/TaikoWebUI/Pages/Profile.razor.cs @@ -177,7 +177,7 @@ public partial class Profile isSavingOptions = false; response = await Client.GetFromJsonAsync($"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(); diff --git a/TaikoWebUI/Pages/Register.razor b/TaikoWebUI/Pages/Register.razor index fcb614c..098e6de 100644 --- a/TaikoWebUI/Pages/Register.razor +++ b/TaikoWebUI/Pages/Register.razor @@ -20,9 +20,9 @@ else Register - + Please play one game with this access code to register it.", + "Card number not found.
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; diff --git a/TaikoWebUI/Pages/Users.razor b/TaikoWebUI/Pages/Users.razor index 0819a80..4f3db9c 100644 --- a/TaikoWebUI/Pages/Users.razor +++ b/TaikoWebUI/Pages/Users.razor @@ -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 @@ - User: @user.Baid + @user.Baid - - Manage Access Codes - - @@ -65,11 +59,14 @@ Access Code - @user.AccessCodes[0] - @if (user.AccessCodes.Count > 1) - { - ... and @(user.AccessCodes.Count-1) other access code(s) - } + + @foreach (var accessCode in user.AccessCodes) + { + + @accessCode + + } + @@ -98,7 +95,7 @@ } else { - @if (!LoginService.IsLoggedIn) // Not logged in, show login form + @if (!LoginService.IsLoggedIn) { @@ -107,10 +104,10 @@ Login - - + @@ -131,13 +128,13 @@ } else { - var user = LoginService.GetLoggedInUser(); // Logged in, show only own user + var user = LoginService.GetLoggedInUser(); - User: @user.Baid + @user.Baid - - Manage Access Codes - - @@ -164,11 +155,14 @@ Access Code - @user.AccessCodes[0] - @if (user.AccessCodes.Count > 1) - { - ... and @(user.AccessCodes.Count-1) other access code(s) - } + + @foreach (var accessCode in user.AccessCodes) + { + + @accessCode + + } + @@ -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 + { No data. diff --git a/TaikoWebUI/Pages/Users.razor.cs b/TaikoWebUI/Pages/Users.razor.cs index 681cfa1..33f4c81 100644 --- a/TaikoWebUI/Pages/Users.razor.cs +++ b/TaikoWebUI/Pages/Users.razor.cs @@ -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.
Please play one game with this access code to register it.", + "Card number not found.
Please play one game with this card number to register it.", "Ok"); break; case 4: await DialogService.ShowMessageBox( "Error", (MarkupString) - "Access code not registered.
Please use register button to create a password first.", + "Card number not registered.
Please use register button to create a password first.", "Ok"); break; } diff --git a/TaikoWebUI/Services/LoginService.cs b/TaikoWebUI/Services/LoginService.cs index 7cdbefc..bbd8429 100644 --- a/TaikoWebUI/Services/LoginService.cs +++ b/TaikoWebUI/Services/LoginService.cs @@ -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 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 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; - } } \ No newline at end of file diff --git a/TaikoWebUI/Settings/WebUiSettings.cs b/TaikoWebUI/Settings/WebUiSettings.cs index 7cf651c..8778613 100644 --- a/TaikoWebUI/Settings/WebUiSettings.cs +++ b/TaikoWebUI/Settings/WebUiSettings.cs @@ -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; } } \ No newline at end of file diff --git a/TaikoWebUI/TaikoWebUI.csproj b/TaikoWebUI/TaikoWebUI.csproj index df265d0..86f513d 100644 --- a/TaikoWebUI/TaikoWebUI.csproj +++ b/TaikoWebUI/TaikoWebUI.csproj @@ -8,42 +8,42 @@ - - - - - - - - + + + + + + + + - + - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + diff --git a/TaikoWebUI/wwwroot/appsettings.json b/TaikoWebUI/wwwroot/appsettings.json index 8b01379..4e9b78d 100644 --- a/TaikoWebUI/wwwroot/appsettings.json +++ b/TaikoWebUI/wwwroot/appsettings.json @@ -3,7 +3,6 @@ "LoginRequired": "false", "AdminUserName": "admin", "AdminPassword": "admin", - "OnlyAdmin": "false", - "BoundAccessCodeUpperLimit": "3" + "OnlyAdmin": "false" } } \ No newline at end of file diff --git a/TaikoWebUI/wwwroot/css/app.css b/TaikoWebUI/wwwroot/css/app.css index 2c2b950..b1daabe 100644 --- a/TaikoWebUI/wwwroot/css/app.css +++ b/TaikoWebUI/wwwroot/css/app.css @@ -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"); + } diff --git a/TaikoWebUI/wwwroot/css/open-iconic/README.md b/TaikoWebUI/wwwroot/css/open-iconic/README.md index 514017d..8cd8560 100644 --- a/TaikoWebUI/wwwroot/css/open-iconic/README.md +++ b/TaikoWebUI/wwwroot/css/open-iconic/README.md @@ -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). ``` 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* `` *tag and a unique class name for -each different icon in the* `` *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* `` *tag and a unique class name for each different icon in the* `` *tag.* ``` @@ -42,8 +41,7 @@ each different icon in the* `` *tag.* ``` -Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` 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 `` 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}` + ``` ``` + ``` ``` @@ -84,6 +85,7 @@ You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css ``` + ``` ``` @@ -100,6 +102,7 @@ You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, ``` + ## License ### Icons diff --git a/TaikoWebUI/wwwroot/css/open-iconic/font/fonts/open-iconic.svg b/TaikoWebUI/wwwroot/css/open-iconic/font/fonts/open-iconic.svg index aec644c..6ca001a 100644 --- a/TaikoWebUI/wwwroot/css/open-iconic/font/fonts/open-iconic.svg +++ b/TaikoWebUI/wwwroot/css/open-iconic/font/fonts/open-iconic.svg @@ -4,541 +4,540 @@ 2014-7-1: Created. --> - - Created by FontForge 20120731 at Tue Jul 1 20:39:22 2014 - By P.J. Onori - Created by P.J. Onori with FontForge 2.0 (http://fontforge.sf.net) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +s22 50 50 50zM650 200c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM400 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TaikoWebUI/wwwroot/index.html b/TaikoWebUI/wwwroot/index.html index 817ac93..de7cf5a 100644 --- a/TaikoWebUI/wwwroot/index.html +++ b/TaikoWebUI/wwwroot/index.html @@ -2,35 +2,35 @@ - - + + TaikoWebUI - - + + - - + + -
- - - - -
-
+
+ + + + +
+
-
- An unhandled error has occurred. - Reload - 🗙 -
- - - - +
+ An unhandled error has occurred. + Reload + 🗙 +
+ + + + \ No newline at end of file diff --git a/TaikoWebUI/wwwroot/js/updateTextFit.js b/TaikoWebUI/wwwroot/js/updateTextFit.js index 034b16d..24d5adc 100644 --- a/TaikoWebUI/wwwroot/js/updateTextFit.js +++ b/TaikoWebUI/wwwroot/js/updateTextFit.js @@ -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 diff --git a/TaikoWebUI/wwwroot/style.overrides.css b/TaikoWebUI/wwwroot/style.overrides.css index 1b075ed..2db0f6d 100644 --- a/TaikoWebUI/wwwroot/style.overrides.css +++ b/TaikoWebUI/wwwroot/style.overrides.css @@ -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 {