diff options
| author | Fuwn <[email protected]> | 2026-03-01 16:04:11 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-03-01 16:04:11 -0800 |
| commit | 48f0c30d47d62e4f35706edb93a1bb2f97eba14c (patch) | |
| tree | 44866d7a61adfdf01a780e0108c370294d3db78b /src/lib/Tools/ActivityHistory/Grid.svelte | |
| parent | chore(biome): re-enable useAltText rule (diff) | |
| download | due.moe-48f0c30d47d62e4f35706edb93a1bb2f97eba14c.tar.xz due.moe-48f0c30d47d62e4f35706edb93a1bb2f97eba14c.zip | |
chore(biome): enable svelte formatting
Diffstat (limited to 'src/lib/Tools/ActivityHistory/Grid.svelte')
| -rw-r--r-- | src/lib/Tools/ActivityHistory/Grid.svelte | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/lib/Tools/ActivityHistory/Grid.svelte b/src/lib/Tools/ActivityHistory/Grid.svelte index b693f912..84c182fa 100644 --- a/src/lib/Tools/ActivityHistory/Grid.svelte +++ b/src/lib/Tools/ActivityHistory/Grid.svelte @@ -1,35 +1,35 @@ <script lang="ts"> - import { - fillMissingDays, - type ActivityHistoryEntry, - activityHistory - } from '$lib/Data/AniList/activity'; - import { onMount } from 'svelte'; - import userIdentity from '$stores/identity'; - import type { AniListAuthorisation } from '$lib/Data/AniList/identity'; - import { clearAllParameters } from '../../Utility/parameters'; - import Skeleton from '$lib/Loading/Skeleton.svelte'; - import tooltip from '$lib/Tooltip/tooltip'; - import LogInRestricted from '$lib/Error/LogInRestricted.svelte'; +import { + fillMissingDays, + type ActivityHistoryEntry, + activityHistory +} from '$lib/Data/AniList/activity'; +import { onMount } from 'svelte'; +import userIdentity from '$stores/identity'; +import type { AniListAuthorisation } from '$lib/Data/AniList/identity'; +import { clearAllParameters } from '../../Utility/parameters'; +import Skeleton from '$lib/Loading/Skeleton.svelte'; +import tooltip from '$lib/Tooltip/tooltip'; +import LogInRestricted from '$lib/Error/LogInRestricted.svelte'; - export let user: AniListAuthorisation; - export let activityData: ActivityHistoryEntry[] | null = null; - export let currentYear = new Date().getFullYear(); +export let user: AniListAuthorisation; +export let activityData: ActivityHistoryEntry[] | null = null; +export let currentYear = new Date().getFullYear(); - let activityHistoryData: ActivityHistoryEntry[]; - let baseHue = Math.floor(Math.random() * 360); +let activityHistoryData: ActivityHistoryEntry[]; +let baseHue = Math.floor(Math.random() * 360); - onMount(async () => { - clearAllParameters(); +onMount(async () => { + clearAllParameters(); - activityHistoryData = activityData || (await activityHistory($userIdentity)); - }); + activityHistoryData = activityData || (await activityHistory($userIdentity)); +}); - const gradientColour = (amount: number, maxAmount: number, baseHue: number) => { - const lightness = 100 - Math.round((amount / maxAmount) * 50); +const gradientColour = (amount: number, maxAmount: number, baseHue: number) => { + const lightness = 100 - Math.round((amount / maxAmount) * 50); - return `hsl(${baseHue}, 100%, ${lightness}%)`; - }; + return `hsl(${baseHue}, 100%, ${lightness}%)`; +}; </script> {#if user === undefined} |