feat: token expired page

This commit is contained in:
afn 2023-03-18 23:03:32 -04:00
parent f56a3af382
commit 40a6c96cb1
3 changed files with 27 additions and 1 deletions

View File

@ -102,7 +102,7 @@
display: flex;
flex-direction: column;
gap: 2px;
z-index: 1001;
z-index: 999;
padding: 1.5rem;
box-shadow: 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12),
0px 2px 4px -1px rgba(0, 0, 0, 0.2);

View File

@ -57,6 +57,15 @@
// will refactor later maybe idk
// Reply: don't think we need to refactor because nobody cares if this code is shit lol
onMount(async () => {
setTimeout(async() => {
await goto('/poll/token-expired/');
localStorage.setItem("expired-token", token)
}, 300000)
if (localStorage.getItem("expired-token") === token) {
await goto('/poll/token-expired/');
}
window.use_token = exchange_token;
window.submit_poll = submitBallot;

View File

@ -0,0 +1,17 @@
<svelte:head>
<title>ReVanced · Token Expired</title>
<meta content="ReVanced · Token Expired" name="og:title" />
<meta content="ReVanced · Token Expired" name="twitter:title" />
</svelte:head>
<main>
<h1>Token expired</h1>
<h2>Your access token has been revoked for inactivity. Please regenerate it.</h2>
</main>
<style>
main {
text-align: center;
padding-top: 10rem;
}
</style>