mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-08-17 05:34:37 +00:00
Make patterns puchasable with stripe (#1313)
## Description: Patterns now show how much each skin costs and can be purchased * Refactored logic out of TerritoryPatternsModal and into Cosmetics.ts * Role gated cosmetics are not shown if you don't have the role. This is to prevent people trying to get roles just for the cosmetics. * Added purchasable cosmetics. * On purchase the backend adds the flare to the player account <img width="1197" alt="Screenshot 2025-07-01 at 11 45 52 AM" src="https://github.com/user-attachments/assets/b4b4b7ea-f5f4-4c61-9ced-b608f75aa9d7" /> ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: evan
This commit is contained in:
+3
-1
@@ -207,6 +207,7 @@ class Client {
|
||||
loginDiscordButton.translationKey = "main.login_discord";
|
||||
loginDiscordButton.addEventListener("click", discordLogin);
|
||||
logoutDiscordButton.hidden = true;
|
||||
territoryModal.onUserMe(null);
|
||||
} else {
|
||||
// JWT appears to be valid
|
||||
loginDiscordButton.disable = true;
|
||||
@@ -215,12 +216,12 @@ class Client {
|
||||
logoutDiscordButton.addEventListener("click", () => {
|
||||
// Log out
|
||||
logOut();
|
||||
territoryModal.onUserMe(null);
|
||||
loginDiscordButton.disable = false;
|
||||
loginDiscordButton.translationKey = "main.login_discord";
|
||||
loginDiscordButton.hidden = false;
|
||||
loginDiscordButton.addEventListener("click", discordLogin);
|
||||
logoutDiscordButton.hidden = true;
|
||||
territoryModal.onLogout();
|
||||
});
|
||||
// Look up the discord user object.
|
||||
// TODO: Add caching
|
||||
@@ -231,6 +232,7 @@ class Client {
|
||||
loginDiscordButton.translationKey = "main.login_discord";
|
||||
loginDiscordButton.addEventListener("click", discordLogin);
|
||||
logoutDiscordButton.hidden = true;
|
||||
territoryModal.onUserMe(null);
|
||||
return;
|
||||
}
|
||||
console.log(
|
||||
|
||||
Reference in New Issue
Block a user