-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement configurable banners (#674)
Part 1 of the summoning rework. Allows the app to load up banners from `bannerConfig.json` and display these in the summoning list. Loads up the number of summons and daily summons available based on banner data. Does _not_ make these banners functional. Also: - Tidy up Program.cs - Sync namespaces
- Loading branch information
1 parent
0aff896
commit c48c2a9
Showing
46 changed files
with
553 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace DragaliaAPI.Blazor.Authentication; | ||
namespace DragaliaAPI.Authentication; | ||
|
||
public class Constants | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
DragaliaAPI/DragaliaAPI/Authentication/IBlazorIdentityService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
DragaliaAPI/DragaliaAPI/Controllers/Dragalia/RedoableSummonController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
DragaliaAPI/DragaliaAPI/Features/Summoning/FeatureExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using DragaliaAPI.Features.Summoning; | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace Microsoft.Extensions.DependencyInjection; | ||
|
||
public static partial class FeatureExtensions | ||
{ | ||
public static IServiceCollection AddSummoningFeature( | ||
this IServiceCollection serviceCollection | ||
) => | ||
serviceCollection.AddScoped<ISummonService, SummonService>().AddScoped<SummonListService>(); | ||
} |
2 changes: 1 addition & 1 deletion
2
...PI/DragaliaAPI/Services/ISummonService.cs → ...aAPI/Features/Summoning/ISummonService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
DragaliaAPI/DragaliaAPI/Features/Summoning/SummonBannerOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using DragaliaAPI.Shared.Definitions.Enums; | ||
|
||
namespace DragaliaAPI.Features.Summoning; | ||
|
||
public class SummonBannerOptions | ||
{ | ||
public required IReadOnlyList<Banner> Banners { get; init; } | ||
} | ||
|
||
public class Banner | ||
{ | ||
public int Id { get; init; } | ||
|
||
public DateTime Start { get; init; } | ||
|
||
public DateTime End { get; init; } | ||
|
||
public bool IsGala { get; init; } | ||
|
||
public bool IsPrizeShowcase { get; init; } | ||
|
||
public required IReadOnlyList<Charas> FeaturedAdventurers { get; init; } | ||
|
||
public required IReadOnlyList<Dragons> FeaturedDragons { get; init; } | ||
|
||
public required IReadOnlyList<Charas> LimitedAdventurers { get; init; } | ||
|
||
public required IReadOnlyList<Dragons> LimitedDragons { get; init; } | ||
|
||
public required IReadOnlyList<Charas> TradeAdventurers { get; init; } | ||
|
||
public required IReadOnlyList<Dragons> TradeDragons { get; init; } | ||
} |
Oops, something went wrong.