From 90b567eea1033c326ab718aaf22922e74e08d626 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 2 Dec 2023 17:09:10 -0800 Subject: feat(wrapped): simplify options --- src/lib/Tools/Wrapped.svelte | 57 ++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 34 deletions(-) (limited to 'src/lib/Tools/Wrapped.svelte') diff --git a/src/lib/Tools/Wrapped.svelte b/src/lib/Tools/Wrapped.svelte index b1d75b68..dc0e51fa 100644 --- a/src/lib/Tools/Wrapped.svelte +++ b/src/lib/Tools/Wrapped.svelte @@ -22,8 +22,6 @@ let minutesWatched = 0; let animeList: Media[] | undefined = undefined; let mangaList: Media[] | undefined = undefined; - let abbreviateTitles = true; - let maxAbbreviateLength = 40; let transparency = false; let lightTheme = true; let watermark = false; @@ -245,17 +243,17 @@ } }; - const abbreviate = (string: string, maxLength = 40, enabled = true) => { - if (!enabled) { - return string; - } + // const abbreviate = (string: string, maxLength = 40, enabled = true) => { + // if (!enabled) { + // return string; + // } - if (string.length <= maxLength) { - return string; - } + // if (string.length <= maxLength) { + // return string; + // } - return string.slice(0, maxLength - 3) + ' …'; - }; + // return string.slice(0, maxLength - 3) + ' …'; + // }; const proxy = (url: string) => `/api/proxy?url=${encodeURIComponent(url)}`; @@ -345,11 +343,7 @@ {#each animeList?.slice(0, highestRatedCount) as anime}
  • - {abbreviate( - anime.title.english || anime.title.romaji || anime.title.native, - maxAbbreviateLength, - abbreviateTitles - )} + {anime.title.english || anime.title.romaji || anime.title.native}
  • {/each} @@ -376,11 +370,7 @@ {#each mangaList?.slice(0, highestRatedCount) as manga}
  • - {abbreviate( - manga.title.english || manga.title.romaji || manga.title.native, - maxAbbreviateLength, - abbreviateTitles - )} + {manga.title.english || manga.title.romaji || manga.title.native}
  • {/each} @@ -403,6 +393,12 @@ properly. +

    + + + +

    +

    screenshot(!forceDark)}>Generate image

    @@ -417,19 +413,12 @@ Include music
    Include rewatches & rereads
    Include specials and OVAs
    - Highest rated media - count
    - - Manual width override (Auto-calculate) -
    - Fit long titles - {#if abbreviateTitles} -       Maximum title length
    - {/if} + + Highest rated media count -- cgit v1.2.3