Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASM #1024

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open

WASM #1024

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
8b1865a
Remove reading of 'developmentSettings.json' at boot
calledude Mar 31, 2024
7163a2f
Migrate to new blazor conventions
calledude Apr 1, 2024
81b24d2
Add WASM client project
calledude Jun 28, 2024
3d8d968
Add Modix.Web.Shared project
calledude Jun 28, 2024
c1cf8d6
Parse selected guild closer to the actual usage in ClaimsMiddleware
calledude Jun 28, 2024
145ffc1
Read data from API
calledude Jun 28, 2024
328b3a9
Reimplement the MudBlazor stuff in Wasm MainLayout
calledude Jun 28, 2024
ec2f29d
WIP possibly working auth
calledude Aug 17, 2024
ef9d0e3
Flow claims to wasm client as well
calledude Aug 17, 2024
a6e8981
Move navbar related components over to the wasm project
calledude Aug 17, 2024
f80d557
Stop using CascadingAuthenticationState
calledude Aug 17, 2024
a50eaca
Move Commands page over to the wasm project
calledude Aug 17, 2024
29d30ad
Remove Newtonsoft serializer
calledude Aug 17, 2024
caa4001
Include AvatarHash claim
calledude Aug 17, 2024
3389899
Move Stats page over to the wasm project
calledude Aug 17, 2024
ed0a9ff
Return user to the page they were trying to visit before getting chal…
calledude Aug 17, 2024
3bc8194
Move UserLookup page over to the wasm project
calledude Aug 17, 2024
db00804
Move new projects into the src folder to conform to the new repositor…
calledude Aug 17, 2024
12201b8
Replace the old Error page with the new blazor page variant
calledude Aug 17, 2024
926772a
Move Tags page over to the wasm project (pending auth fix)
calledude Aug 20, 2024
f4028fc
Reintroduce ModixController to get rid of redundant code, also fixes …
calledude Aug 20, 2024
ee2f8d8
Remove default pages
calledude Aug 20, 2024
64ee8f4
Cache roles for 10 minutes
calledude Aug 20, 2024
b6986c5
Move Promotions page over to the wasm project
calledude Aug 24, 2024
8c55ec6
Move CreatePromotion page over to the wasm project
calledude Aug 24, 2024
dc5c0ea
Move Infractions page over to the wasm project
calledude Aug 29, 2024
853a9fd
Move DeletedMessages page over to the wasm project
calledude Aug 29, 2024
fd8ef15
Implement guild option endpoint to fix guild selection
calledude Aug 31, 2024
23af1d7
Move Configuration/Channels page over to the wasm project
calledude Aug 31, 2024
d2447cb
Move Configuration/Roles page over to the wasm project
calledude Aug 31, 2024
e584bb1
Create common models project
calledude Sep 1, 2024
0034e8d
Switch over to using AuthorizationClaim enum from newly created model…
calledude Sep 1, 2024
d7054f2
Move Configuration/Claims page over to the wasm project
calledude Sep 1, 2024
b280394
Remove/fix TODOs
calledude Sep 1, 2024
c7475f4
Remove SelectedGuild from Routes params in favor of using user claim
calledude Sep 1, 2024
f316322
Disable SSR for now
calledude Sep 1, 2024
3812d54
Fixup authorization in controllers
calledude Sep 1, 2024
2d7c628
Move DesignatedChannelType to Modix.Models project
calledude Sep 1, 2024
8339951
Move PromotionCampaignOutcome/PromotionSentiment to Modix.Models project
calledude Sep 1, 2024
73bb395
Move DesignatedRoleType to Modix.Models project
calledude Sep 1, 2024
a5b33aa
Move InfractionType to Modix.Models project
calledude Sep 1, 2024
d852a9e
Move PromotionCampaignEntityExtensions to Modix.Models project
calledude Sep 1, 2024
882fb4b
Refactor table query models in Infractions/DeletedMessages
calledude Sep 1, 2024
ceaae6a
Dispose HttpResponseMessage
calledude Sep 1, 2024
83ce852
Stop using CascadingAuthenticationState (components will use Authenti…
calledude Sep 1, 2024
9c421fd
Fix paging in DeletedMessages/Infractions
calledude Sep 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
<PackageReference Update="Nito.AsyncEx.Coordination" Version="5.1.2" />

<PackageReference Update="AspNet.Security.OAuth.Discord" Version="8.0.0" />

<PackageReference Update="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.3" />

<PackageReference Update="Microsoft.AspNetCore.SpaServices.Extensions" Version="8.0.3" />
<PackageReference Update="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
<PackageReference Update="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.1" />
Expand Down
50 changes: 46 additions & 4 deletions Modix.sln
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Modix.Web", "src\Modix.Web\
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{E74ADFBD-55F3-4E28-885B-2270670294EF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Modix.Web.Wasm", "src\Modix.Web.Wasm\Modix.Web.Wasm.csproj", "{F0DFE404-B6A9-495C-A41C-92FD25138619}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Modix.Web.Shared", "src\Modix.Web.Shared\Modix.Web.Shared.csproj", "{A603AE22-F588-466E-A7B1-298989E76890}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Modix.Models", "src\Modix.Models\Modix.Models.csproj", "{A7FCE49E-5579-4E37-81E0-6AADEA0FBEA1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -218,17 +224,53 @@ Global
{2280A9D0-358E-4668-8855-6832725C740A}.Release|x64.Build.0 = Release|Any CPU
{2280A9D0-358E-4668-8855-6832725C740A}.Release|x86.ActiveCfg = Release|Any CPU
{2280A9D0-358E-4668-8855-6832725C740A}.Release|x86.Build.0 = Release|Any CPU
{F0DFE404-B6A9-495C-A41C-92FD25138619}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0DFE404-B6A9-495C-A41C-92FD25138619}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0DFE404-B6A9-495C-A41C-92FD25138619}.Debug|x64.ActiveCfg = Debug|Any CPU
{F0DFE404-B6A9-495C-A41C-92FD25138619}.Debug|x64.Build.0 = Debug|Any CPU
{F0DFE404-B6A9-495C-A41C-92FD25138619}.Debug|x86.ActiveCfg = Debug|Any CPU
{F0DFE404-B6A9-495C-A41C-92FD25138619}.Debug|x86.Build.0 = Debug|Any CPU
{F0DFE404-B6A9-495C-A41C-92FD25138619}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F0DFE404-B6A9-495C-A41C-92FD25138619}.Release|Any CPU.Build.0 = Release|Any CPU
{F0DFE404-B6A9-495C-A41C-92FD25138619}.Release|x64.ActiveCfg = Release|Any CPU
{F0DFE404-B6A9-495C-A41C-92FD25138619}.Release|x64.Build.0 = Release|Any CPU
{F0DFE404-B6A9-495C-A41C-92FD25138619}.Release|x86.ActiveCfg = Release|Any CPU
{F0DFE404-B6A9-495C-A41C-92FD25138619}.Release|x86.Build.0 = Release|Any CPU
{A603AE22-F588-466E-A7B1-298989E76890}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A603AE22-F588-466E-A7B1-298989E76890}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A603AE22-F588-466E-A7B1-298989E76890}.Debug|x64.ActiveCfg = Debug|Any CPU
{A603AE22-F588-466E-A7B1-298989E76890}.Debug|x64.Build.0 = Debug|Any CPU
{A603AE22-F588-466E-A7B1-298989E76890}.Debug|x86.ActiveCfg = Debug|Any CPU
{A603AE22-F588-466E-A7B1-298989E76890}.Debug|x86.Build.0 = Debug|Any CPU
{A603AE22-F588-466E-A7B1-298989E76890}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A603AE22-F588-466E-A7B1-298989E76890}.Release|Any CPU.Build.0 = Release|Any CPU
{A603AE22-F588-466E-A7B1-298989E76890}.Release|x64.ActiveCfg = Release|Any CPU
{A603AE22-F588-466E-A7B1-298989E76890}.Release|x64.Build.0 = Release|Any CPU
{A603AE22-F588-466E-A7B1-298989E76890}.Release|x86.ActiveCfg = Release|Any CPU
{A603AE22-F588-466E-A7B1-298989E76890}.Release|x86.Build.0 = Release|Any CPU
{A7FCE49E-5579-4E37-81E0-6AADEA0FBEA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7FCE49E-5579-4E37-81E0-6AADEA0FBEA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7FCE49E-5579-4E37-81E0-6AADEA0FBEA1}.Debug|x64.ActiveCfg = Debug|Any CPU
{A7FCE49E-5579-4E37-81E0-6AADEA0FBEA1}.Debug|x64.Build.0 = Debug|Any CPU
{A7FCE49E-5579-4E37-81E0-6AADEA0FBEA1}.Debug|x86.ActiveCfg = Debug|Any CPU
{A7FCE49E-5579-4E37-81E0-6AADEA0FBEA1}.Debug|x86.Build.0 = Debug|Any CPU
{A7FCE49E-5579-4E37-81E0-6AADEA0FBEA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7FCE49E-5579-4E37-81E0-6AADEA0FBEA1}.Release|Any CPU.Build.0 = Release|Any CPU
{A7FCE49E-5579-4E37-81E0-6AADEA0FBEA1}.Release|x64.ActiveCfg = Release|Any CPU
{A7FCE49E-5579-4E37-81E0-6AADEA0FBEA1}.Release|x64.Build.0 = Release|Any CPU
{A7FCE49E-5579-4E37-81E0-6AADEA0FBEA1}.Release|x86.ActiveCfg = Release|Any CPU
{A7FCE49E-5579-4E37-81E0-6AADEA0FBEA1}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{092916B2-32C6-4ED9-A4EA-DF31D2F91A8F} = {23DA774D-7AE9-48C1-A261-F27D15A07858}
{9A28A475-067B-4CBD-94BC-CA31C0D1555A} = {E74ADFBD-55F3-4E28-885B-2270670294EF}
{4F9BDC85-B8B2-4AC5-99BC-1F2F0CF80016} = {E74ADFBD-55F3-4E28-885B-2270670294EF}
{E8C7267F-5BC3-4A13-B5EF-60DC1B0E919F} = {E74ADFBD-55F3-4E28-885B-2270670294EF}
{D9BFC7C7-10B2-4D61-99EA-79805074CCD7} = {E74ADFBD-55F3-4E28-885B-2270670294EF}
{4F9BDC85-B8B2-4AC5-99BC-1F2F0CF80016} = {E74ADFBD-55F3-4E28-885B-2270670294EF}
{E9D29AA9-1B7D-4A90-839A-2E8665A8714F} = {E74ADFBD-55F3-4E28-885B-2270670294EF}
{E8C7267F-5BC3-4A13-B5EF-60DC1B0E919F} = {E74ADFBD-55F3-4E28-885B-2270670294EF}
{092916B2-32C6-4ED9-A4EA-DF31D2F91A8F} = {23DA774D-7AE9-48C1-A261-F27D15A07858}
{9A28A475-067B-4CBD-94BC-CA31C0D1555A} = {E74ADFBD-55F3-4E28-885B-2270670294EF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {36BDDB86-FBAB-45BF-AA22-DD4509504772}
Expand Down
3 changes: 2 additions & 1 deletion src/Modix.Bot/Behaviors/ModerationLoggingBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
using Modix.Data.Models.Core;
using Modix.Data.Models.Moderation;
using Modix.Data.Repositories;
using Modix.Models.Core;
using Modix.Models.Moderation;
using Modix.Services;
using Modix.Services.Core;
using Modix.Services.Moderation;
using Modix.Services.Utilities;

Expand Down
2 changes: 2 additions & 0 deletions src/Modix.Bot/Behaviors/PromotionLoggingHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
using Modix.Common.Messaging;
using Modix.Data.Models.Core;
using Modix.Data.Models.Promotions;
using Modix.Models.Core;
using Modix.Models.Promotions;
using Modix.Services;
using Modix.Services.Core;
using Modix.Services.Promotions;
Expand Down
2 changes: 1 addition & 1 deletion src/Modix.Bot/DiscordBotSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Threading.Tasks;
using Discord.Commands;
using Discord.WebSocket;
using Modix.Data.Models.Core;
using Modix.Models.Core;
using Modix.Services;

namespace Modix.Bot;
Expand Down
1 change: 1 addition & 0 deletions src/Modix.Bot/Modules/AuthorizationModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Modix.Bot.Extensions;
using Modix.Bot.Preconditions;
using Modix.Data.Models.Core;
using Modix.Models.Core;
using Modix.Services.CommandHelp;
using Modix.Services.Core;

Expand Down
1 change: 1 addition & 0 deletions src/Modix.Bot/Modules/DesignatedChannelsModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Modix.Bot.Preconditions;
using Modix.Common.Extensions;
using Modix.Data.Models.Core;
using Modix.Models.Core;
using Modix.Services;
using Modix.Services.CommandHelp;

Expand Down
1 change: 1 addition & 0 deletions src/Modix.Bot/Modules/DesignatedRoleModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Modix.Bot.Preconditions;
using Modix.Common.Extensions;
using Modix.Data.Models.Core;
using Modix.Models.Core;
using Modix.Services.CommandHelp;
using Modix.Services.Core;

Expand Down
2 changes: 2 additions & 0 deletions src/Modix.Bot/Modules/InfractionModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
using Modix.Data.Models;
using Modix.Data.Models.Core;
using Modix.Data.Models.Moderation;
using Modix.Models.Core;
using Modix.Models.Moderation;
using Modix.Services.CommandHelp;
using Modix.Services.Moderation;
using Modix.Services.Utilities;
Expand Down
2 changes: 1 addition & 1 deletion src/Modix.Bot/Modules/ModerationModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using Modix.Bot.Extensions;
using Modix.Common.Extensions;
using Modix.Data.Models.Core;
using Modix.Data.Models.Moderation;
using Modix.Models.Moderation;
using Modix.Services.CommandHelp;
using Modix.Services.Core;
using Modix.Services.Moderation;
Expand Down
7 changes: 5 additions & 2 deletions src/Modix.Bot/Modules/PromotionsModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
using Modix.Data.Models.Core;
using Modix.Data.Models.Promotions;
using Modix.Data.Utilities;
using Modix.Models.Core;
using Modix.Models.Promotions;
using Modix.Models.Utilities;
using Modix.Services.CommandHelp;
using Modix.Services.Promotions;
using Modix.Services.Utilities;
Expand Down Expand Up @@ -334,7 +337,7 @@ public async Task AcceptAsync(
return;
}

var timeRemaining = campaign.GetTimeUntilCampaignCanBeClosed();
var timeRemaining = campaign.CreateAction.Created.GetTimeUntilCampaignCanBeClosed();

if (timeRemaining.TotalMinutes > 1)
{
Expand Down Expand Up @@ -441,7 +444,7 @@ await message.ModifyAsync(x =>
_ => Color.Red,
};

var expectedCloseTime = campaign.GetExpectedCampaignCloseTimeStamp();
var expectedCloseTime = campaign.CreateAction.Created.GetExpectedCampaignCloseTimeStamp();

var timeRemainingLabel = campaign.Outcome switch
{
Expand Down
1 change: 1 addition & 0 deletions src/Modix.Bot/Modules/TagModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Modix.Common.Extensions;
using Modix.Data.Models.Core;
using Modix.Data.Models.Tags;
using Modix.Models.Core;
using Modix.Services.CommandHelp;
using Modix.Services.Core;
using Modix.Services.Tags;
Expand Down
1 change: 1 addition & 0 deletions src/Modix.Bot/Modules/UserInfoModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using Modix.Data.Models.Emoji;
using Modix.Data.Models.Promotions;
using Modix.Data.Repositories;
using Modix.Models.Core;
using Modix.Services.AutoRemoveMessage;
using Modix.Services.CommandHelp;
using Modix.Services.Core;
Expand Down
3 changes: 1 addition & 2 deletions src/Modix.Bot/Preconditions/RequireAnyClaimAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
using Discord.Interactions;

using Microsoft.Extensions.DependencyInjection;

using Modix.Data.Models.Core;
using Modix.Models.Core;
using Modix.Services.Core;

namespace Modix.Bot.Preconditions
Expand Down
3 changes: 1 addition & 2 deletions src/Modix.Bot/Preconditions/RequireClaimsAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
using Discord.Interactions;

using Microsoft.Extensions.DependencyInjection;

using Modix.Data.Models.Core;
using Modix.Models.Core;
using Modix.Services.Core;

namespace Modix.Bot.Preconditions
Expand Down
2 changes: 1 addition & 1 deletion src/Modix.Bot/Responders/AuditLogCreatedResponder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Discord.WebSocket;
using MediatR;
using Modix.Bot.Notifications;
using Modix.Data.Models.Moderation;
using Modix.Models.Moderation;
using Modix.Services.Core;
using Modix.Services.Moderation;
using Modix.Services.Utilities;
Expand Down
2 changes: 1 addition & 1 deletion src/Modix.Bot/Responders/MutedUserJoinedResponder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Discord.WebSocket;
using MediatR;
using Modix.Bot.Notifications;
using Modix.Data.Models.Moderation;
using Modix.Models.Moderation;
using Modix.Services.Moderation;
using Serilog;

Expand Down
2 changes: 1 addition & 1 deletion src/Modix.Bot/Responders/StarboardReactionResponder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using MediatR;
using Modix.Bot.Notifications;
using Modix.Bot.Responders.MessageQuotes;
using Modix.Data.Models.Core;
using Modix.Models.Core;
using Modix.Services;
using Modix.Services.Starboard;
using Modix.Services.Utilities;
Expand Down
1 change: 1 addition & 0 deletions src/Modix.Data/Extensions/MessageQueryExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Linq;
using System.Linq.Expressions;
using Modix.Data.Models.Core;
using Modix.Models.Core;

namespace Modix.Data.Extensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Linq;
using System.Linq.Expressions;
using Modix.Data.Models.Promotions;
using Modix.Models.Promotions;

namespace Modix.Data.Extensions
{
Expand Down
Loading
Loading