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
This commit is contained in:
cam 2024-09-02 20:37:53 -04:00 committed by GitHub
parent b0360123e0
commit 672bc77c58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 13 additions and 19 deletions

View File

@ -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;

View File

@ -39,7 +39,6 @@
</style>
<link rel="stylesheet" type="text/css" href="./index.css" />
<link rel="manifest" href="./manifest.webmanifest">
<script type="text/javascript" src="https://app.termly.io/resource-blocker/c5dbfa2f-9723-4c0f-a84b-2895124e851f?autoBlock=on"></script>
<script>
if ("serviceWorker" in navigator) {
window.addEventListener("load", function () {
@ -144,13 +143,6 @@
</div>
</div>
<div id="tnc-links">
<a href="#" class="termly-display-preferences" style="display: none;" target="_blank" rel="noreferrer noopener">Consent Preferences</a>
<a href="https://app.termly.io/policy-viewer/policy.html?policyUUID=bc96778b-3f04-4d25-bafc-0deba53e8bec" target="_blank" rel="noreferrer noopener">Privacy Policy</a>
<a href="https://app.termly.io/policy-viewer/policy.html?policyUUID=8b523c05-7ec2-4646-9534-5bd61b386e2a" target="_blank" rel="noreferrer noopener">Cookie Disclaimer</a>
<a href="https://app.termly.io/policy-viewer/policy.html?policyUUID=b01e092a-9721-477f-8356-45576702ff9e" target="_blank" rel="noreferrer noopener">Terms & Conditions</a>
<a href="https://app.termly.io/policy-viewer/policy.html?policyUUID=3b5d1928-3f5b-4ee1-b8df-2d6c276b0bcc" target="_blank" rel="noreferrer noopener">Acceptable Use Policy</a>
</div>
<script type="module" src="./src/main.ts"></script>
<script src="./src/touch-controls.ts" type="module"></script>
<script src="./src/debug.js" type="module"></script>

View File

@ -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!"
}

View File

@ -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",