aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-01-11 22:09:04 -0800
committerFuwn <[email protected]>2024-01-11 22:09:04 -0800
commita3efff2b507515daf4ff120b2068c87c44e33bae (patch)
tree975dec8a05c286f7361871d6a6ae4d92a7bebbe9 /src
parentfeat(list): recache notifications (diff)
downloaddue.moe-a3efff2b507515daf4ff120b2068c87c44e33bae.tar.xz
due.moe-a3efff2b507515daf4ff120b2068c87c44e33bae.zip
feat(settings): copy rss notification
Diffstat (limited to 'src')
-rw-r--r--src/routes/settings/+page.svelte14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte
index 749a4fe9..7ddeb68e 100644
--- a/src/routes/settings/+page.svelte
+++ b/src/routes/settings/+page.svelte
@@ -10,9 +10,13 @@
import Debug from '$lib/Settings/Categories/Debug.svelte';
import Cache from '$lib/Settings/Categories/Cache.svelte';
import Category from '$lib/Settings/Category.svelte';
+ import { getNotificationsContext } from 'svelte-notifications';
+ import { options } from '$lib/Notification/options.js';
export let data;
+ const { addNotification } = getNotificationsContext();
+
// const pruneUnresolved = async () => {
// const unresolved = await chapterDatabase.chapters.where('chapters').equals(-1).toArray();
// const ids = unresolved.map((m) => m.id);
@@ -35,14 +39,20 @@
{:else}
<Category title="RSS Feeds" id="feeds">
<button
- on:click={() =>
+ on:click={() => {
+ addNotification(
+ options({
+ heading: 'RSS feed URL copied to clipboard'
+ })
+ );
navigator.clipboard.writeText(
`https://${
env.PUBLIC_ANILIST_REDIRECT_URI?.includes('192.168') ? '192.168.1.60:5173' : 'due.moe'
}/feeds/activity-notifications?token=${data.user.accessToken}&refresh=${
data.user.refreshToken
}`
- )}
+ );
+ }}
>
Copy to clipboard
</button>