aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Tools
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-09-28 15:12:25 -0700
committerFuwn <[email protected]>2023-09-28 15:12:25 -0700
commit04ed59b45099938c1b2cc4a7aa1efeeefde4871a (patch)
tree027d1e6a8e2415d7055f49f9630d3d5679ce60f7 /src/lib/Tools
parentchore(typescript): add types (diff)
downloaddue.moe-04ed59b45099938c1b2cc4a7aa1efeeefde4871a.tar.xz
due.moe-04ed59b45099938c1b2cc4a7aa1efeeefde4871a.zip
fix(wrapped): restrict ratings to year
Diffstat (limited to 'src/lib/Tools')
-rw-r--r--src/lib/Tools/Wrapped.svelte52
1 files changed, 25 insertions, 27 deletions
diff --git a/src/lib/Tools/Wrapped.svelte b/src/lib/Tools/Wrapped.svelte
index d8c28914..ea17fefc 100644
--- a/src/lib/Tools/Wrapped.svelte
+++ b/src/lib/Tools/Wrapped.svelte
@@ -30,24 +30,28 @@
currentUserIdentity = JSON.parse($userIdentity);
currentUserIdentity.name = currentUserIdentity.name;
- animeList = await mediaListCollection(
- user,
- currentUserIdentity,
- Type.Anime,
- $anime,
- $lastPruneTimes.anime,
- true,
- true
- );
- mangaList = await mediaListCollection(
- user,
- currentUserIdentity,
- Type.Manga,
- $manga,
- $lastPruneTimes.manga,
- true,
- true
- );
+ animeList = (
+ await mediaListCollection(
+ user,
+ currentUserIdentity,
+ Type.Anime,
+ $anime,
+ $lastPruneTimes.anime,
+ true,
+ true
+ )
+ ).filter((m) => m.mediaListEntry?.status === 'COMPLETED');
+ mangaList = (
+ await mediaListCollection(
+ user,
+ currentUserIdentity,
+ Type.Manga,
+ $manga,
+ $lastPruneTimes.manga,
+ true,
+ true
+ )
+ ).filter((m) => m.mediaListEntry?.status === 'COMPLETED');
animeList = animeList.sort((a, b) => {
if (a.mediaListEntry?.score === undefined) {
return 1;
@@ -249,7 +253,7 @@
display: flex;
flex-wrap: wrap;
row-gap: 1.5em;
- column-gap: 1em;
+ column-gap: 1.5em;
padding: 1%;
justify-content: center;
}
@@ -259,9 +263,9 @@
}
.image-grid {
- display: grid;
+ display: flex;
column-gap: 1em;
- grid-template-columns: 1fr 2fr;
+ flex-wrap: wrap;
}
.image-grid img {
@@ -272,12 +276,6 @@
height: 8.75em !important;
}
- .grid-item {
- min-width: 300px;
- flex: 1 1 300px;
- /* text-align: center; */
- }
-
.categories-grid a {
text-decoration: none;
color: unset;