aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-06-11 23:52:43 -0700
committerFuwn <[email protected]>2025-06-11 23:52:43 -0700
commit1bc4488a06db88597327ecc855c5b70a7ddc55ce (patch)
treeded544d953d4b62fc4365c2758d75f02efe7d625 /src
parentfix: Migrate localStorage.removeItem to localforage for anime and manga stores (diff)
downloaddue.moe-1bc4488a06db88597327ecc855c5b70a7ddc55ce.tar.xz
due.moe-1bc4488a06db88597327ecc855c5b70a7ddc55ce.zip
style: Reformat using latest formatting
Diffstat (limited to 'src')
-rw-r--r--src/app.html2
-rw-r--r--src/lib/Data/AniList/activity.ts4
-rw-r--r--src/lib/Data/AniList/wrapped.ts11
-rw-r--r--src/lib/Layout/Dropdown.svelte5
-rw-r--r--src/lib/Layout/NumberTicker.svelte4
-rw-r--r--src/lib/List/Anime/CleanAnimeList.svelte8
-rw-r--r--src/lib/List/Anime/DueAnimeList.svelte19
-rw-r--r--src/lib/List/Manga/MangaListTemplate.svelte17
-rw-r--r--src/lib/List/covers.css8
-rw-r--r--src/lib/Media/Cover/HoverCover.svelte5
-rw-r--r--src/lib/Media/links.ts8
-rw-r--r--src/lib/Notification/Notification.svelte4
-rw-r--r--src/lib/Schedule/Days.svelte5
-rw-r--r--src/lib/Settings/SettingToggle.svelte4
-rw-r--r--src/lib/Tools/Likes.svelte4
-rw-r--r--src/lib/Tools/SequelCatcher/List.svelte4
-rw-r--r--src/lib/Tools/Wrapped/Tool.svelte8
-rw-r--r--src/lib/Tools/Wrapped/wrapped.css28
-rw-r--r--src/routes/user/[user]/+page.svelte9
-rw-r--r--src/stores/identity.ts2
-rw-r--r--src/stores/lastPruneTimes.ts2
-rw-r--r--src/stores/settings.ts2
-rw-r--r--src/styles/card.css8
-rw-r--r--src/styles/colours.css7
-rw-r--r--src/styles/input.css12
-rw-r--r--src/styles/typography.css15
-rw-r--r--src/trigger/notifications.ts8
27 files changed, 139 insertions, 74 deletions
diff --git a/src/app.html b/src/app.html
index 26b3a70d..498e3f9c 100644
--- a/src/app.html
+++ b/src/app.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<!-- HTML -->
diff --git a/src/lib/Data/AniList/activity.ts b/src/lib/Data/AniList/activity.ts
index d10a5da7..2c16fb1f 100644
--- a/src/lib/Data/AniList/activity.ts
+++ b/src/lib/Data/AniList/activity.ts
@@ -169,8 +169,8 @@ const activitiesPage = async (
Page(page: ${page}) {
pageInfo { hasNextPage }
activities(userId: ${userIdentity.id}, createdAt_greater: ${Math.floor(
- new Date(year, 0, 1).getTime() / 1000
- )}, createdAt_lesser: ${Math.floor(new Date(year, 7, 1).getTime() / 1000)}) {
+ new Date(year, 0, 1).getTime() / 1000
+ )}, createdAt_lesser: ${Math.floor(new Date(year, 7, 1).getTime() / 1000)}) {
... on TextActivity { createdAt }
... on ListActivity { createdAt }
... on MessageActivity { createdAt }
diff --git a/src/lib/Data/AniList/wrapped.ts b/src/lib/Data/AniList/wrapped.ts
index f9302b90..62aff010 100644
--- a/src/lib/Data/AniList/wrapped.ts
+++ b/src/lib/Data/AniList/wrapped.ts
@@ -64,10 +64,8 @@ const profileActivities = async (
query: `{
Page(page: ${page}) {
activities(userId: ${identity.id}, type_in: [ TEXT, MESSAGE ], createdAt_greater: ${Math.floor(
- new Date(date.getFullYear(), 0, 1).getTime() / 1000
- )}, createdAt_lesser: ${Math.floor(
- new Date(date.getFullYear(), 7, 1).getTime() / 1000
- )}) {
+ new Date(date.getFullYear(), 0, 1).getTime() / 1000
+ )}, createdAt_lesser: ${Math.floor(new Date(date.getFullYear(), 7, 1).getTime() / 1000)}) {
... on TextActivity {
type
createdAt
@@ -131,9 +129,8 @@ export const wrapped = async (
};
if (anilistAuthorisation) {
- headers[
- 'Authorization'
- ] = `${anilistAuthorisation.tokenType} ${anilistAuthorisation.accessToken}`;
+ headers['Authorization'] =
+ `${anilistAuthorisation.tokenType} ${anilistAuthorisation.accessToken}`;
}
const wrappedResponse = await (
diff --git a/src/lib/Layout/Dropdown.svelte b/src/lib/Layout/Dropdown.svelte
index fb270dfe..0cbf2f6f 100644
--- a/src/lib/Layout/Dropdown.svelte
+++ b/src/lib/Layout/Dropdown.svelte
@@ -89,7 +89,10 @@
transform: translateY(-20px);
visibility: hidden;
$delay: 0.25s;
- transition: opacity $delay ease, transform $delay ease, visibility 0s linear $delay;
+ transition:
+ opacity $delay ease,
+ transform $delay ease,
+ visibility 0s linear $delay;
left: var(--dropdown-left);
transform: var(--dropdown-transform);
z-index: 1;
diff --git a/src/lib/Layout/NumberTicker.svelte b/src/lib/Layout/NumberTicker.svelte
index b5e2f49c..226e89c9 100644
--- a/src/lib/Layout/NumberTicker.svelte
+++ b/src/lib/Layout/NumberTicker.svelte
@@ -27,7 +27,9 @@
$duration: 0.2s;
opacity: 0;
- transition: opacity $duration ease-out, transform $duration ease-out;
+ transition:
+ opacity $duration ease-out,
+ transform $duration ease-out;
}
.counter.visible {
diff --git a/src/lib/List/Anime/CleanAnimeList.svelte b/src/lib/List/Anime/CleanAnimeList.svelte
index 1586385c..d31cad55 100644
--- a/src/lib/List/Anime/CleanAnimeList.svelte
+++ b/src/lib/List/Anime/CleanAnimeList.svelte
@@ -61,10 +61,10 @@
let filterKind = upcoming
? 'Upcoming'
: notYetReleased
- ? 'NotYetReleased'
- : completed
- ? 'Completed'
- : 'Due';
+ ? 'NotYetReleased'
+ : completed
+ ? 'Completed'
+ : 'Due';
const filterKey = `${filterKind}AnimeListFilter`;
let selectedList = stateBin.get()[filterKey] || 'All';
diff --git a/src/lib/List/Anime/DueAnimeList.svelte b/src/lib/List/Anime/DueAnimeList.svelte
index 8650590b..95be3b6c 100644
--- a/src/lib/List/Anime/DueAnimeList.svelte
+++ b/src/lib/List/Anime/DueAnimeList.svelte
@@ -19,14 +19,17 @@
let startTime: number;
let endTime: number;
- const keyCacher = setInterval(() => {
- startTime = performance.now();
- endTime = -1;
- animeLists = mediaListCollection(user, $identity, Type.Anime, $anime, $lastPruneTimes.anime, {
- forcePrune: true,
- addNotification
- });
- }, $settings.cacheMinutes * 1000 * 60);
+ const keyCacher = setInterval(
+ () => {
+ startTime = performance.now();
+ endTime = -1;
+ animeLists = mediaListCollection(user, $identity, Type.Anime, $anime, $lastPruneTimes.anime, {
+ forcePrune: true,
+ addNotification
+ });
+ },
+ $settings.cacheMinutes * 1000 * 60
+ );
onMount(async () => {
startTime = performance.now();
diff --git a/src/lib/List/Manga/MangaListTemplate.svelte b/src/lib/List/Manga/MangaListTemplate.svelte
index d1a6a944..0b38158b 100644
--- a/src/lib/List/Manga/MangaListTemplate.svelte
+++ b/src/lib/List/Manga/MangaListTemplate.svelte
@@ -44,13 +44,16 @@
let forceFlag = false;
let lastListSize = 5;
- const keyCacher = setInterval(() => {
- startTime = performance.now();
- endTime = -1;
- mangaLists = mediaListCollection(user, $identity, Type.Manga, $manga, $lastPruneTimes.manga, {
- addNotification
- });
- }, $settings.cacheMinutes * 1000 * 60);
+ const keyCacher = setInterval(
+ () => {
+ startTime = performance.now();
+ endTime = -1;
+ mangaLists = mediaListCollection(user, $identity, Type.Manga, $manga, $lastPruneTimes.manga, {
+ addNotification
+ });
+ },
+ $settings.cacheMinutes * 1000 * 60
+ );
onMount(async () => {
if (browser) {
diff --git a/src/lib/List/covers.css b/src/lib/List/covers.css
index e0b69c78..c83b984e 100644
--- a/src/lib/List/covers.css
+++ b/src/lib/List/covers.css
@@ -22,14 +22,18 @@
.cover-card-image {
border-radius: 8px;
- transition: transform 0.45s ease, box-shadow 0.45s ease;
+ transition:
+ transform 0.45s ease,
+ box-shadow 0.45s ease;
margin-bottom: 0.5em;
}
.cover-card-image:hover {
transform: scale(1.1);
position: relative;
- transition: transform 0.45s ease, box-shadow 0.45s ease;
+ transition:
+ transform 0.45s ease,
+ box-shadow 0.45s ease;
}
.entry::after {
diff --git a/src/lib/Media/Cover/HoverCover.svelte b/src/lib/Media/Cover/HoverCover.svelte
index 51cbf5d2..81d6d3fc 100644
--- a/src/lib/Media/Cover/HoverCover.svelte
+++ b/src/lib/Media/Cover/HoverCover.svelte
@@ -28,7 +28,10 @@
height: auto;
display: none;
border-radius: 8px;
- transition: opacity $coverTransitionTime ease-in-out, top 0.3s ease, left 0.3s ease;
+ transition:
+ opacity $coverTransitionTime ease-in-out,
+ top 0.3s ease,
+ left 0.3s ease;
}
.show {
diff --git a/src/lib/Media/links.ts b/src/lib/Media/links.ts
index 626e892a..209afb28 100644
--- a/src/lib/Media/links.ts
+++ b/src/lib/Media/links.ts
@@ -42,10 +42,10 @@ export const outboundLink = (
return search
? `https://myanimelist.net/anime.php?q=${title}&cat=anime`
: media.idMal
- ? `https://myanimelist.net/anime/${media.idMal}`
- : `https://myanimelist.net/anime.php?q=${encodeURIComponent(
- media.title.native || media.title.english || media.title.romaji
- )}&cat=anime`;
+ ? `https://myanimelist.net/anime/${media.idMal}`
+ : `https://myanimelist.net/anime.php?q=${encodeURIComponent(
+ media.title.native || media.title.english || media.title.romaji
+ )}&cat=anime`;
}
}
};
diff --git a/src/lib/Notification/Notification.svelte b/src/lib/Notification/Notification.svelte
index 6764f46e..c4232ced 100644
--- a/src/lib/Notification/Notification.svelte
+++ b/src/lib/Notification/Notification.svelte
@@ -59,7 +59,9 @@
#notification {
background-color: var(--base001);
- box-shadow: rgba(0, 0, 11, 0.2) 0px 7px 29px 0px, 0 0 0 4px var(--base0E);
+ box-shadow:
+ rgba(0, 0, 11, 0.2) 0px 7px 29px 0px,
+ 0 0 0 4px var(--base0E);
widows: 100%;
}
diff --git a/src/lib/Schedule/Days.svelte b/src/lib/Schedule/Days.svelte
index f7a49029..99955897 100644
--- a/src/lib/Schedule/Days.svelte
+++ b/src/lib/Schedule/Days.svelte
@@ -207,7 +207,10 @@
}
.today {
- box-shadow: 0 2.5px 10px var(--base01), 0 0 0 5px var(--base0E), 0 4px 30px var(--base01);
+ box-shadow:
+ 0 2.5px 10px var(--base01),
+ 0 0 0 5px var(--base0E),
+ 0 4px 30px var(--base01);
}
.list {
diff --git a/src/lib/Settings/SettingToggle.svelte b/src/lib/Settings/SettingToggle.svelte
index 0d177b50..bacb43c3 100644
--- a/src/lib/Settings/SettingToggle.svelte
+++ b/src/lib/Settings/SettingToggle.svelte
@@ -14,8 +14,8 @@
disabled
? {}
: $settings[setting]
- ? settings.setKey(setting, false)
- : settings.setKey(setting, true)}
+ ? settings.setKey(setting, false)
+ : settings.setKey(setting, true)}
>
{#if disabled}
<strike>
diff --git a/src/lib/Tools/Likes.svelte b/src/lib/Tools/Likes.svelte
index 7b626c94..46d1edaf 100644
--- a/src/lib/Tools/Likes.svelte
+++ b/src/lib/Tools/Likes.svelte
@@ -15,8 +15,8 @@
submissionType === 'activity'
? activityLikes(Number(normalisedSubmission))
: submissionType === 'thread'
- ? threadLikes(Number(normalisedSubmission))
- : Promise.resolve(null);
+ ? threadLikes(Number(normalisedSubmission))
+ : Promise.resolve(null);
</script>
<InputTemplate
diff --git a/src/lib/Tools/SequelCatcher/List.svelte b/src/lib/Tools/SequelCatcher/List.svelte
index 009df219..0bf087ea 100644
--- a/src/lib/Tools/SequelCatcher/List.svelte
+++ b/src/lib/Tools/SequelCatcher/List.svelte
@@ -20,8 +20,8 @@
? undefined
: media
: swap
- ? media
- : undefined;
+ ? media
+ : undefined;
</script>
<input type="checkbox" bind:checked={includeCurrent} /> Include current (watching, rewatching,
diff --git a/src/lib/Tools/Wrapped/Tool.svelte b/src/lib/Tools/Wrapped/Tool.svelte
index 4ae2b9c6..b4f0f9bd 100644
--- a/src/lib/Tools/Wrapped/Tool.svelte
+++ b/src/lib/Tools/Wrapped/Tool.svelte
@@ -300,8 +300,8 @@
(includeRepeats
? true
: item.startDate.year === selectedYear || item.endDate.year === selectedYear
- ? true
- : item.mediaListEntry?.repeat === 0) &&
+ ? true
+ : item.mediaListEntry?.repeat === 0) &&
(item.mediaListEntry?.startedAt.year === selectedYear ||
item.mediaListEntry?.completedAt.year === selectedYear ||
((item.mediaListEntry?.createdAt
@@ -355,8 +355,8 @@
(includeRepeats
? true
: item.startDate.year === selectedYear || item.endDate.year === selectedYear
- ? true
- : item.mediaListEntry?.repeat === 0) &&
+ ? true
+ : item.mediaListEntry?.repeat === 0) &&
(item.mediaListEntry?.startedAt.year === selectedYear ||
item.mediaListEntry?.completedAt.year === selectedYear ||
((item.mediaListEntry?.createdAt
diff --git a/src/lib/Tools/Wrapped/wrapped.css b/src/lib/Tools/Wrapped/wrapped.css
index 978d22d4..e44fb130 100644
--- a/src/lib/Tools/Wrapped/wrapped.css
+++ b/src/lib/Tools/Wrapped/wrapped.css
@@ -8,14 +8,34 @@
column-gap: 1.5em;
padding: 2%;
justify-content: center;
- font-family: Roboto, -apple-system, BlinkMacSystemFont, Segoe UI, Oxygen, Ubuntu, Cantarell,
- Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
+ font-family:
+ Roboto,
+ -apple-system,
+ BlinkMacSystemFont,
+ Segoe UI,
+ Oxygen,
+ Ubuntu,
+ Cantarell,
+ Fira Sans,
+ Droid Sans,
+ Helvetica Neue,
+ sans-serif;
background-color: #0b1622;
}
.categories-grid b {
- font-family: Overpass, -apple-system, BlinkMacSystemFont, Segoe UI, Oxygen, Ubuntu, Cantarell,
- Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
+ font-family:
+ Overpass,
+ -apple-system,
+ BlinkMacSystemFont,
+ Segoe UI,
+ Oxygen,
+ Ubuntu,
+ Cantarell,
+ Fira Sans,
+ Droid Sans,
+ Helvetica Neue,
+ sans-serif;
font-weight: 600;
}
diff --git a/src/routes/user/[user]/+page.svelte b/src/routes/user/[user]/+page.svelte
index d60ea8e5..f86660fd 100644
--- a/src/routes/user/[user]/+page.svelte
+++ b/src/routes/user/[user]/+page.svelte
@@ -498,7 +498,9 @@
.user-grid-hololive-badges {
$transitionDuration: 0.45s;
- $transition: transform $transitionDuration ease, box-shadow $transitionDuration ease;
+ $transition:
+ transform $transitionDuration ease,
+ box-shadow $transitionDuration ease;
$size: 5.25em;
border-radius: 8px;
@@ -513,7 +515,10 @@
z-index: 2;
transition: $transition;
transform: scale(1.15);
- box-shadow: 0 1.5px 9px var(--base01), 0 0 0 4px var(--base02), 0 4px 30px var(--base01);
+ box-shadow:
+ 0 1.5px 9px var(--base01),
+ 0 0 0 4px var(--base02),
+ 0 4px 30px var(--base01);
}
}
diff --git a/src/stores/identity.ts b/src/stores/identity.ts
index 1b0aee90..2618d744 100644
--- a/src/stores/identity.ts
+++ b/src/stores/identity.ts
@@ -12,7 +12,7 @@ const createStore = () => {
const { subscribe, set, update } = writable<UserIdentity>(
JSON.parse(
browser
- ? localStorage.getItem('identity') ?? JSON.stringify(defaultIdentity)
+ ? (localStorage.getItem('identity') ?? JSON.stringify(defaultIdentity))
: JSON.stringify(defaultIdentity)
)
);
diff --git a/src/stores/lastPruneTimes.ts b/src/stores/lastPruneTimes.ts
index 802ad86e..9c4afc5b 100644
--- a/src/stores/lastPruneTimes.ts
+++ b/src/stores/lastPruneTimes.ts
@@ -17,7 +17,7 @@ const createStore = () => {
const { subscribe, set, update } = writable<LastPruneTimes>(
JSON.parse(
browser
- ? localStorage.getItem('lastPruneTimes') ?? JSON.stringify(defaultTimes)
+ ? (localStorage.getItem('lastPruneTimes') ?? JSON.stringify(defaultTimes))
: JSON.stringify(defaultTimes)
)
);
diff --git a/src/stores/settings.ts b/src/stores/settings.ts
index d250e1c1..fef0debf 100644
--- a/src/stores/settings.ts
+++ b/src/stores/settings.ts
@@ -138,7 +138,7 @@ const createStore = () => {
const { subscribe, set, update } = writable<Settings>(
JSON.parse(
browser
- ? localStorage.getItem('settings') ?? JSON.stringify(defaultSettings)
+ ? (localStorage.getItem('settings') ?? JSON.stringify(defaultSettings))
: JSON.stringify(defaultSettings)
)
);
diff --git a/src/styles/card.css b/src/styles/card.css
index 218f00df..aca9e4e4 100644
--- a/src/styles/card.css
+++ b/src/styles/card.css
@@ -13,12 +13,16 @@ details,
}
.header {
- box-shadow: rgba(0, 0, 11, 0.2) 0px 7px 29px 0px, 0 0 0 5px var(--base02);
+ box-shadow:
+ rgba(0, 0, 11, 0.2) 0px 7px 29px 0px,
+ 0 0 0 5px var(--base02);
}
@media (prefers-color-scheme: light) {
.header {
- box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px, 0 0 0 5px var(--base02);
+ box-shadow:
+ rgba(100, 100, 111, 0.2) 0px 7px 29px 0px,
+ 0 0 0 5px var(--base02);
}
}
diff --git a/src/styles/colours.css b/src/styles/colours.css
index b7fc885d..2c55aa81 100644
--- a/src/styles/colours.css
+++ b/src/styles/colours.css
@@ -43,6 +43,9 @@
}
* {
- transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
- border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+ transition:
+ color 0.15s ease-in-out,
+ background-color 0.15s ease-in-out,
+ border-color 0.15s ease-in-out,
+ box-shadow 0.15s ease-in-out;
}
diff --git a/src/styles/input.css b/src/styles/input.css
index 125f214f..b8ae7574 100644
--- a/src/styles/input.css
+++ b/src/styles/input.css
@@ -11,7 +11,9 @@ textarea {
border: none;
border-radius: 4px;
place-content: center;
- transition: background-color 0.15s ease-in-out, transform 0.15s ease-in-out;
+ transition:
+ background-color 0.15s ease-in-out,
+ transform 0.15s ease-in-out;
/* box-shadow: 0 4px 30px var(--base01); */
box-shadow: rgba(0, 0, 11, 0.1) 0px 7px 29px 0px;
}
@@ -73,7 +75,9 @@ input[type='checkbox'] {
margin: 0;
width: 1.15em;
height: 1.15em;
- transition: background-color 0.15s ease-in-out, transform 0.15s ease-in-out;
+ transition:
+ background-color 0.15s ease-in-out,
+ transform 0.15s ease-in-out;
}
input[type='checkbox']:checked {
@@ -103,7 +107,9 @@ button {
color: var(--base00);
border: none;
border-radius: 4px;
- transition: background-color 0.15s ease-in-out, transform 0.15s ease-in-out;
+ transition:
+ background-color 0.15s ease-in-out,
+ transform 0.15s ease-in-out;
/* box-shadow: 0 4px 30px var(--base01); */
box-shadow: rgba(0, 0, 11, 0.1) 0px 7px 29px 0px;
}
diff --git a/src/styles/typography.css b/src/styles/typography.css
index 70ee377b..f33fdc92 100644
--- a/src/styles/typography.css
+++ b/src/styles/typography.css
@@ -3,8 +3,19 @@
@import url('https://proxy.due.moe/?q=https://fonts.googleapis.com/css?family=DM+Sans:400,500,600,700&display=swap');
body {
- font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
- Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
+ font-family:
+ 'DM Sans',
+ system-ui,
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ Roboto,
+ Oxygen,
+ Ubuntu,
+ Cantarell,
+ 'Open Sans',
+ 'Helvetica Neue',
+ sans-serif;
font-size: 1em;
line-height: 1.5;
/* font-weight: 300; */
diff --git a/src/trigger/notifications.ts b/src/trigger/notifications.ts
index ba0e6a27..e801e07d 100644
--- a/src/trigger/notifications.ts
+++ b/src/trigger/notifications.ts
@@ -9,12 +9,8 @@ export const notificationsTask = schedules.task({
const triggerProjectReference = ctx.project.ref;
const getUserSubscriptions = async () => {
const { data, error } = await createClient(
- (
- await envvars.retrieve(triggerProjectReference, environment, 'SUPABASE_URL')
- ).value,
- (
- await envvars.retrieve(triggerProjectReference, environment, 'SUPABASE_ANON_KEY')
- ).value
+ (await envvars.retrieve(triggerProjectReference, environment, 'SUPABASE_URL')).value,
+ (await envvars.retrieve(triggerProjectReference, environment, 'SUPABASE_ANON_KEY')).value
)
.from('user_notifications')
.select('*');