From 672bc77c58d1f51964aa4cf98add7ea6840eeded Mon Sep 17 00:00:00 2001 From: cam Date: Mon, 2 Sep 2024 20:37:53 -0400 Subject: [PATCH] Added Donate Link to Community Page (#3989) * Added Donate Link to Community Page Removed the cookies from the html and added a Donations link on the community page (with guidance from Walker) * Added Translation Key --- index.css | 11 +---------- index.html | 8 -------- src/locales/en/menu-ui-handler.json | 1 + src/ui/menu-ui-handler.ts | 12 +++++++++++- 4 files changed, 13 insertions(+), 19 deletions(-) diff --git a/index.css b/index.css index abf4f9f708c..1274f2fcead 100644 --- a/index.css +++ b/index.css @@ -23,15 +23,6 @@ body { } } -#links { - width: 90%; - text-align: center; - position: fixed; - bottom: 0; - display: flex; - justify-content: space-around; -} - #app { display: flex; justify-content: center; @@ -93,7 +84,7 @@ input:-internal-autofill-selected { @media (orientation: landscape) { #touchControls { - --controls-size: 20vh; + --controls-size: 20vh; --text-shadow-size: 1.3vh; --small-button-offset: 4vh; } diff --git a/index.html b/index.html index 29b4c0d1a6e..390a29fb365 100644 --- a/index.html +++ b/index.html @@ -39,7 +39,6 @@ - diff --git a/src/locales/en/menu-ui-handler.json b/src/locales/en/menu-ui-handler.json index fccf9cd3002..0536fa12c2e 100644 --- a/src/locales/en/menu-ui-handler.json +++ b/src/locales/en/menu-ui-handler.json @@ -24,6 +24,7 @@ "linkGoogle": "Link Google", "unlinkGoogle": "Unlink Google", "cancel": "Cancel", + "donate": "Donate", "losingProgressionWarning": "You will lose any progress since the beginning of the battle. Proceed?", "noEggs": "You are not hatching\nany eggs at the moment!" } \ No newline at end of file diff --git a/src/ui/menu-ui-handler.ts b/src/ui/menu-ui-handler.ts index 6349d219827..adbb3089e5c 100644 --- a/src/ui/menu-ui-handler.ts +++ b/src/ui/menu-ui-handler.ts @@ -31,6 +31,7 @@ let wikiUrl = "https://wiki.pokerogue.net/start"; const discordUrl = "https://discord.gg/uWpTfdKG49"; const githubUrl = "https://github.com/pagefaultgames/pokerogue"; const redditUrl = "https://www.reddit.com/r/pokerogue"; +const donateUrl = "https://github.com/sponsors/patapancakes"; export default class MenuUiHandler extends MessageUiHandler { private readonly textPadding = 8; @@ -369,7 +370,16 @@ export default class MenuUiHandler extends MessageUiHandler { return true; }, keepOpen: true - }]; + }, + { + label: i18next.t("menuUiHandler:donate"), + handler: () => { + window.open(donateUrl, "_blank")?.focus(); + return true; + }, + keepOpen: true + } + ]; if (!bypassLogin && loggedInUser?.hasAdminRole) { communityOptions.push({ label: "Admin",