aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Error
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-02-08 00:09:32 -0800
committerFuwn <[email protected]>2024-02-08 00:09:32 -0800
commit9ec5b7205d909e1f1b1d9d128c8c47750cc17f54 (patch)
tree8a785aafbfa707da735e573ea9d43b8fdf957a86 /src/lib/Error
parentfeat(settings): use popup style login alert (diff)
downloaddue.moe-9ec5b7205d909e1f1b1d9d128c8c47750cc17f54.tar.xz
due.moe-9ec5b7205d909e1f1b1d9d128c8c47750cc17f54.zip
feat: use global login restriction warning
Diffstat (limited to 'src/lib/Error')
-rw-r--r--src/lib/Error/LogInRestricted.svelte18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/Error/LogInRestricted.svelte b/src/lib/Error/LogInRestricted.svelte
new file mode 100644
index 00000000..353a941d
--- /dev/null
+++ b/src/lib/Error/LogInRestricted.svelte
@@ -0,0 +1,18 @@
+<script>
+ import Popup from '$lib/Popup.svelte';
+ import { env } from '$env/dynamic/public';
+</script>
+
+<Popup fullscreen locked>
+ <div class="message">
+ Please <a
+ href={`https://anilist.co/api/v2/oauth/authorize?client_id=${env.PUBLIC_ANILIST_CLIENT_ID}&redirect_uri=${env.PUBLIC_ANILIST_REDIRECT_URI}&response_type=code`}
+ on:click={() => {
+ localStorage.setItem(
+ 'redirect',
+ window.location.origin + window.location.pathname + window.location.search
+ );
+ }}>log in</a
+ > to view this page.
+ </div>
+</Popup>