diff options
| author | Fuwn <[email protected]> | 2024-12-24 11:13:15 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-12-24 11:13:15 -0800 |
| commit | 2f65c444a5ff402e41c8b2dae431610b02bd2d5f (patch) | |
| tree | 1709db3a55579e5416cb25d8001759b256bf9ffb /src | |
| parent | fix(List): double guard total count setting overlap (diff) | |
| download | due.moe-2f65c444a5ff402e41c8b2dae431610b02bd2d5f.tar.xz due.moe-2f65c444a5ff402e41c8b2dae431610b02bd2d5f.zip | |
fix(wrapped): li::marker consistent colouring
Diffstat (limited to 'src')
| -rw-r--r-- | src/graphql/user/resolvers.ts | 6 | ||||
| -rw-r--r-- | src/lib/Data/AniList/user.ts | 28 | ||||
| -rw-r--r-- | src/lib/Data/Static/authorised.json | 5 | ||||
| -rw-r--r-- | src/lib/Tools/Wrapped/wrapped.css | 4 | ||||
| -rw-r--r-- | src/routes/api/badges/+server.ts | 6 | ||||
| -rw-r--r-- | src/stores/settings.ts | 20 |
6 files changed, 34 insertions, 35 deletions
diff --git a/src/graphql/user/resolvers.ts b/src/graphql/user/resolvers.ts index 30f48cd1..e6575a75 100644 --- a/src/graphql/user/resolvers.ts +++ b/src/graphql/user/resolvers.ts @@ -49,7 +49,7 @@ const authenticatedBadgesOperation = async ( if (identity instanceof Error) return []; - const authorised = privilegedUser(identity.id) + const authorised = privilegedUser(identity.id); await operation(identity, authorised); @@ -71,7 +71,7 @@ const authenticatedPreferencesOperation = async ( if (identity instanceof Error) return []; - const authorised = privilegedUser(identity.id) + const authorised = privilegedUser(identity.id); return { id: identity.id, @@ -129,7 +129,7 @@ export const resolvers: WithIndex<Resolvers> = { allBadges .filter((badge) => badge.category === category) .filter((badge) => badge.hidden).length > - allBadges.filter((badge) => badge.category === category).length / 2 + allBadges.filter((badge) => badge.category === category).length / 2 ? false : true }); diff --git a/src/lib/Data/AniList/user.ts b/src/lib/Data/AniList/user.ts index aaab6e0b..19de8c45 100644 --- a/src/lib/Data/AniList/user.ts +++ b/src/lib/Data/AniList/user.ts @@ -46,16 +46,15 @@ export interface FullUser { } export const user = async (username: string, id = false): Promise<User | null> => { - const response = ( - await ( - await fetch('https://graphql.anilist.co', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - Accept: 'application/json' - }, - body: JSON.stringify({ - query: `{ User(${id ? `id: ${username}` : `name: "${username}"`}) { + const response = await ( + await fetch('https://graphql.anilist.co', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json' + }, + body: JSON.stringify({ + query: `{ User(${id ? `id: ${username}` : `name: "${username}"`}) { name id bannerImage avatar { large medium } statistics { anime { count meanScore minutesWatched episodesWatched @@ -65,13 +64,12 @@ export const user = async (username: string, id = false): Promise<User | null> = } } } }` - }) }) - ).json() - ) + }) + ).json(); - return response["data"]["User"] === null ? null : response["data"]["User"]; -} + return response['data']['User'] === null ? null : response['data']['User']; +}; export const dumpUser = async (username: string): Promise<FullUser> => ( diff --git a/src/lib/Data/Static/authorised.json b/src/lib/Data/Static/authorised.json index 07c4688f..5aa83801 100644 --- a/src/lib/Data/Static/authorised.json +++ b/src/lib/Data/Static/authorised.json @@ -1,4 +1 @@ -[ - 5678223, - 7035177 -]
\ No newline at end of file +[5678223, 7035177] diff --git a/src/lib/Tools/Wrapped/wrapped.css b/src/lib/Tools/Wrapped/wrapped.css index c144a6f0..978d22d4 100644 --- a/src/lib/Tools/Wrapped/wrapped.css +++ b/src/lib/Tools/Wrapped/wrapped.css @@ -26,6 +26,10 @@ color: rgb(159, 173, 189); } +li::marker { + color: rgb(159, 173, 189) !important; +} + .pure-category, .avatar-grid { padding: 1.5%; diff --git a/src/routes/api/badges/+server.ts b/src/routes/api/badges/+server.ts index 9d5cb9a0..35ed4512 100644 --- a/src/routes/api/badges/+server.ts +++ b/src/routes/api/badges/+server.ts @@ -100,9 +100,9 @@ export const PUT = async ({ cookies, url, request }) => { allBadges .filter((badge) => badge.category === (url.searchParams.get('category') || '')) .filter((badge) => badge.hidden).length > - allBadges.filter( - (badge) => badge.category === (url.searchParams.get('category') || '') - ).length / + allBadges.filter( + (badge) => badge.category === (url.searchParams.get('category') || '') + ).length / 2 ? false : true diff --git a/src/stores/settings.ts b/src/stores/settings.ts index 3d663a23..012e5207 100644 --- a/src/stores/settings.ts +++ b/src/stores/settings.ts @@ -30,16 +30,16 @@ export interface Settings { displayPlannedAnime: boolean; displayFurigana: boolean; displayAoButa: - | 'kaede' - | 'mai' - | 'mai_2' - | 'nodoka' - | 'rio' - | 'sakuta' - | 'shouko' - | 'tomoe' - | 'random' - | 'none'; + | 'kaede' + | 'mai' + | 'mai_2' + | 'nodoka' + | 'rio' + | 'sakuta' + | 'shouko' + | 'tomoe' + | 'random' + | 'none'; disableManga: boolean; disableAnime: boolean; disableUpcomingAnime: boolean; |