aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-05-15 17:54:11 -0700
committerFuwn <[email protected]>2024-05-15 17:54:11 -0700
commitf243cb4f692bc89d074b534a43ba0ed5fbe20f6d (patch)
treed1862b9f08d2100186b3862f0746b3cb4aa8ffcc /src
parentfix(AWC): add preferences (diff)
downloaddue.moe-f243cb4f692bc89d074b534a43ba0ed5fbe20f6d.tar.xz
due.moe-f243cb4f692bc89d074b534a43ba0ed5fbe20f6d.zip
feat(badges): allow dismiss notice
Diffstat (limited to 'src')
-rw-r--r--src/routes/user/[user]/badges/+page.svelte15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/routes/user/[user]/badges/+page.svelte b/src/routes/user/[user]/badges/+page.svelte
index 2614cb13..565cb73b 100644
--- a/src/routes/user/[user]/badges/+page.svelte
+++ b/src/routes/user/[user]/badges/+page.svelte
@@ -59,6 +59,7 @@
let hideMode = false;
let preferences: UserPreferences;
const authorised = authorisedJson.includes($identity.id);
+ let noticeDismissed = false;
$: categoryFilter = new URLSearchParams($page.url.searchParams).get('category');
@@ -76,6 +77,8 @@
onMount(async () => {
// socket.on('badges', (message) => (badges = message));
+ if (browser && localStorage.getItem('badgeWallNoticeDismissed')) noticeDismissed = true;
+
badger = isId
? {
id: parseInt(data.username),
@@ -515,7 +518,7 @@
will be required to use the hide feature to hide these badges from the public, while
allowing them to stay visible to you as the account holder.
</div>
- {:else}
+ {:else if !noticeDismissed}
<div class="card">
<b>Notice:</b> AniList has begun purging outbound links which contain
AI-generated material, this includes Badge Wall. If you have collected badges
@@ -525,6 +528,16 @@
<p />
Failure to comply with this request at your earliest convenience will result in the
hiding of all badges from your Badge Wall.
+ <p />
+ <button
+ on:click={() => {
+ noticeDismissed = true;
+
+ localStorage.setItem('badgeWallNoticeDismissed', 'true');
+ }}
+ >
+ Dismiss
+ </button>
</div>
{/if}