feat: proper logo

fix: setup
fix: actually make sync toggable
This commit is contained in:
ThaUnknown 2025-04-13 20:39:19 +02:00
parent ad4a6f9cbe
commit a6fa96f61e
No known key found for this signature in database
11 changed files with 54 additions and 70 deletions

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/logo.png" />
<link rel="icon" href="%sveltekit.assets%/logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0" />
%sveltekit.head%
</head>

View file

@ -1,15 +1,5 @@
<script lang='ts'>
import { Icon, type Attrs } from 'lucide-svelte'
import type { SvelteHTMLElements } from 'svelte/elements'
const iconNode: Array<[elementName: keyof SvelteHTMLElements, attrs: Attrs]> = [
['path', { d: 'M378.5 234.9c-12.9 3.7-24.9 10.7-49.5 28.9-53 39.4-92.7 50.9-143.5 41.6-1.6-.3 2.2 2 8.5 5.1 57 28.4 92.4 20.5 152.8-34 23.9-21.5 50-33.1 78.2-34.7 4.5-.3 4.5-.3-4-3.5-15-5.8-30.1-7-42.5-3.4' }],
['path', { d: 'M437.6 250.6c-24.6 4.8-49.4 17.6-100.1 51.4-44.4 29.6-66.6 41.8-83.4 46.1-30.1 7.6-84.9-6.8-140-37-12.4-6.7-12.2-6.3 2.2 6 61.4 52.7 82.6 64.2 118.2 64.3 34.7.1 62.5-12.6 119.7-54.7 57.6-42.4 76.7-51.9 106.8-53.3 24-1.2 53 6.8 69.8 19.3 5.3 4 4.7 2.1-2.1-5.8-26.8-31.3-56.6-43.2-91.1-36.3' }],
['path', { d: 'M459 286.4c-41.9 9.8-88.1 45.4-141.4 108.8-4.5 5.4-5.3 8.5-1 3.7 2.7-3 23.9-20.1 37.9-30.6 69.4-51.9 129.5-72.6 164-56.6 3.3 1.5 6.4 2.9 7 3.2 1.6.7-5.7-8-10.8-12.8-14.5-13.8-37-20.1-55.7-15.7' }]
]
</script>
<Icon name='logo' {...$$props} {iconNode} viewBox='0 0 640 640'>
<slot />
</Icon>
<svg name='logo' {...$$props} xml:space='preserve' viewBox='0 0 66.145833 75.273966' fill='currentColor'>
<path d='M66.145833 51.593751v-19.84375c-11.042319-6.141466-22.077514-12.295645-33.072917-18.520833C22.048611 19.402779 11.024305 25.57639 0 31.750001v19.84375c11.024305-6.173611 22.048611-12.347222 33.072916-18.520833 11.024306 6.173611 22.048611 12.347222 33.072917 18.520833ZM0 26.458334c7.849305-4.409722 15.698611-8.819445 23.547916-13.229167C15.698611 8.819445 7.849305 4.409722 0 0v26.458334Z' />
<path d='M0 56.753124c11.024305 6.173613 22.048611 12.347227 33.072916 18.52084 11.024306-6.173613 22.048611-12.347227 33.072917-18.52084L47.625 46.434378c-4.850695 2.734028-9.701389 5.468055-14.552084 8.202083-4.850694-2.734028-9.701389-5.468055-14.552083-8.202083C12.352694 49.88272 6.229007 53.417285 0 56.753124Z' />
<path d='M33.072916 38.364583c3.351389 1.852084 6.70278 3.704166 10.054167 5.556251-3.35139 1.852082-6.702778 3.704167-10.054167 5.55625-3.351388-1.852084-6.702779-3.704166-10.054166-5.556251 3.35139-1.852082 6.702777-3.704167 10.054166-5.55625z' />
</svg>

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -12,6 +12,7 @@
import * as Avatar from '$lib/components/ui/avatar'
import { lockedState, idleState, activityState } from '$lib/modules/idle'
import { page } from '$app/stores'
import Logo from '$lib/components/icons/Logo.svelte'
const auth = client.hasAuth
@ -25,7 +26,7 @@
<svelte:document bind:visibilityState />
<BannerImage class='absolute top-0 left-0 w-14 -z-10 hidden md:block' />
<img src='/logo_cropped.png' alt='logo' class='mb-3 cursor-pointer h-10 object-contain px-1 hidden md:block' loading='lazy' decoding='async' />
<Logo class='mb-3 h-10 object-contain px-2 hidden md:block text-white' />
<SidebarButton href='/app/home/'>
<Home size={18} />
</SidebarButton>

View file

@ -1,4 +1,6 @@
import { readable } from 'simple-store-svelte'
import { persisted } from 'svelte-persisted-store'
import { get } from 'svelte/store'
import { client } from '../anilist'
@ -17,6 +19,7 @@ export default new class AuthAggregator {
return () => unsub.forEach(fn => fn())
})
syncSettings = persisted('syncSettings', { al: true, local: true })
// AUTH
anilist () {
@ -73,14 +76,15 @@ export default new class AuthAggregator {
}
entry (variables: VariablesOf<typeof Entry>) {
const syncSettings = get(this.syncSettings)
variables.lists ??= []
if (!variables.lists.includes('Watched using Hayase')) {
variables.lists.push('Watched using Hayase')
} else {
delete variables.lists
}
if (this.anilist()) client.entry(variables)
local.entry(variables)
if (this.anilist() && syncSettings.al) client.entry(variables)
if (syncSettings.local) local.entry(variables)
}
}()

View file

@ -1,5 +1,5 @@
<script lang='ts'>
import { persisted } from 'svelte-persisted-store'
import { Folder } from 'lucide-svelte'
import Anilist from '$lib/components/icons/Anilist.svelte'
import * as Avatar from '$lib/components/ui/avatar'
@ -7,6 +7,7 @@
import { Label } from '$lib/components/ui/label'
import { Switch } from '$lib/components/ui/switch'
import { client } from '$lib/modules/anilist'
import { authAggregator } from '$lib/modules/auth'
import native from '$lib/modules/native'
import { click } from '$lib/modules/navigate'
@ -14,7 +15,7 @@
$: anilist = $viewer
const syncSettings = persisted('syncSettings', { al: true })
const syncSettings = authAggregator.syncSettings
</script>
<div class='space-y-3 pb-10 lg:max-w-4xl'>
@ -53,4 +54,25 @@
</div>
</div>
</div>
<div>
<div class='bg-neutral-900 px-6 py-4 rounded-t-md flex flex-row gap-3'>
<div class='flex flex-row gap-3'>
<div class='flex flex-col'>
<div class='text-sm'>
Other
</div>
<div class='text-[9px] text-muted-foreground leading-snug'>
Local
</div>
</div>
</div>
<Folder class='size-6 !ml-auto' fill='currentColor' />
</div>
<div class='bg-neutral-950 px-6 py-4 rounded-b-md flex justify-end h-[68px]'>
<div class='flex gap-2 items-center'>
<Switch hideState={true} id='al-sync-switch' bind:checked={$syncSettings.al} />
<Label for='al-sync-switch' class='cursor-pointer'>Enable Sync</Label>
</div>
</div>
</div>
</div>

View file

@ -5,11 +5,12 @@
import { Label } from '$lib/components/ui/label'
import { click } from '$lib/modules/navigate'
import native from '$lib/modules/native'
import Logo from '$lib/components/icons/Logo.svelte'
let checked = false
</script>
<img src='/logo_cropped.png' class='w-52 h-52 object-contain' alt='logo' loading='lazy' decoding='async' />
<Logo class='w-52 h-52 object-contain mb-14' />
<div class='font-bold text-5xl'>Welcome to Hayase</div>
<div class='text-muted-foreground pt-6'>Let's set up your perfect streaming enviorment.</div>
<div class='flex items-center space-x-2 pt-12'>

View file

@ -15,6 +15,7 @@
import { Badge } from '$lib/components/ui/badge'
import { Button } from '$lib/components/ui/button'
import * as Tooltip from '$lib/components/ui/tooltip'
import { goto } from '$app/navigation'
export let step = 0
export let checks: Checks[] = []
@ -24,8 +25,8 @@
$: settled = Promise.allSettled(checks.map(({ promise }) => promise))
function checkNext () {
if (step !== 2) return
localStorage.setItem('setup-finished', '1')
if (step === 2) localStorage.setItem('setup-finished', '1')
goto(`../${NEXT[step]}`)
}
</script>
@ -69,6 +70,6 @@
</Tooltip.Content>
</Tooltip.Root>
{:then _}
<Button class='font-semibold w-24' href='../{NEXT[step]}' on:click={checkNext}>Next</Button>
<Button class='font-semibold w-24' on:click={checkNext}>Next</Button>
{/await}
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View file

@ -1,45 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.0"
viewBox="0 0 640 640"
id="svg8"
sodipodi:docname="logo.svg"
inkscape:export-filename="logo.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs12" />
<sodipodi:namedview
id="namedview10"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="1.565625"
inkscape:cx="214.61078"
inkscape:cy="291.25749"
inkscape:window-width="3440"
inkscape:window-height="1417"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg8" />
<path
d="M378.5 234.9c-12.9 3.7-24.9 10.7-49.5 28.9-53 39.4-92.7 50.9-143.5 41.6-1.6-.3 2.2 2 8.5 5.1 57 28.4 92.4 20.5 152.8-34 23.9-21.5 50-33.1 78.2-34.7 4.5-.3 4.5-.3-4-3.5-15-5.8-30.1-7-42.5-3.4"
id="path2" />
<path
d="M437.6 250.6c-24.6 4.8-49.4 17.6-100.1 51.4-44.4 29.6-66.6 41.8-83.4 46.1-30.1 7.6-84.9-6.8-140-37-12.4-6.7-12.2-6.3 2.2 6 61.4 52.7 82.6 64.2 118.2 64.3 34.7.1 62.5-12.6 119.7-54.7 57.6-42.4 76.7-51.9 106.8-53.3 24-1.2 53 6.8 69.8 19.3 5.3 4 4.7 2.1-2.1-5.8-26.8-31.3-56.6-43.2-91.1-36.3"
id="path4" />
<path
d="M459 286.4c-41.9 9.8-88.1 45.4-141.4 108.8-4.5 5.4-5.3 8.5-1 3.7 2.7-3 23.9-20.1 37.9-30.6 69.4-51.9 129.5-72.6 164-56.6 3.3 1.5 6.4 2.9 7 3.2 1.6.7-5.7-8-10.8-12.8-14.5-13.8-37-20.1-55.7-15.7"
id="path6" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="430" height="430" viewBox="0 0 113.50625 113.50625" fill="currentColor">
<path d="M89.693749 72.830671v-19.84375l-18.520833-10.31875-14.552084-8.202083-33.072916 18.520833v19.84375l33.072916-18.520833ZM23.547916 47.695254l23.547916-13.229167L23.547916 21.23692Z" />
<path d="m23.547916 77.990044 33.072916 18.52084 33.072917-18.52084-18.520833-10.318746-14.552084 8.202083-14.552083-8.202083S23.547916 78.122337 23.547916 77.990044z" />
<path d="m56.620832 59.601503 10.054167 5.55625v.000001l-10.054167 5.55625-10.054166-5.55625v-.000001z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

5
static/logo_cropped.svg Normal file
View file

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="250" height="284.50003" viewBox="0 0 66.145833 75.273966" fill="currentColor">
<path d="M66.145833 51.593751v-19.84375c-11.042319-6.141466-22.077514-12.295645-33.072917-18.520833C22.048611 19.402779 11.024305 25.57639 0 31.750001v19.84375c11.024305-6.173611 22.048611-12.347222 33.072916-18.520833 11.024306 6.173611 22.048611 12.347222 33.072917 18.520833ZM0 26.458334c7.849305-4.409722 15.698611-8.819445 23.547916-13.229167C15.698611 8.819445 7.849305 4.409722 0 0v26.458334Z"/>
<path d="M0 56.753124c11.024305 6.173613 22.048611 12.347227 33.072916 18.52084 11.024306-6.173613 22.048611-12.347227 33.072917-18.52084L47.625 46.434378c-4.850695 2.734028-9.701389 5.468055-14.552084 8.202083-4.850694-2.734028-9.701389-5.468055-14.552083-8.202083C12.352694 49.88272 6.229007 53.417285 0 56.753124Z"/>
<path d="M33.072916 38.364583c3.351389 1.852084 6.70278 3.704166 10.054167 5.556251-3.35139 1.852082-6.702778 3.704167-10.054167 5.55625-3.351388-1.852084-6.702779-3.704166-10.054166-5.556251 3.35139-1.852082 6.702777-3.704167 10.054166-5.55625z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB