feat(web): Update to latest version of SvelteKit (#705)

This commit is contained in:
Alex 2022-09-16 23:13:22 -05:00 committed by GitHub
parent 75c2067836
commit 0d13b25f56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 5522 additions and 2273 deletions

View file

@ -3,7 +3,7 @@
import { quintOut } from 'svelte/easing';
import Close from 'svelte-material-icons/Close.svelte';
import { createEventDispatcher, onMount, onDestroy } from 'svelte';
import { browser } from '$app/env';
import { browser } from '$app/environment';
import CircleIconButton from './circle-icon-button.svelte';
import { clickOutside } from '$lib/utils/click-outside';

View file

@ -1,5 +1,5 @@
<script lang="ts">
import { browser } from '$app/env';
import { browser } from '$app/environment';
import { createEventDispatcher, onDestroy, onMount } from 'svelte';
import Close from 'svelte-material-icons/Close.svelte';

View file

@ -44,7 +44,11 @@
<section id="dashboard-navbar" class="fixed w-screen z-[100] bg-immich-bg text-sm">
<div class="flex border-b place-items-center px-6 py-2 ">
<a sveltekit:prefetch class="flex gap-2 place-items-center hover:cursor-pointer" href="/photos">
<a
data-sveltekit-prefetch
class="flex gap-2 place-items-center hover:cursor-pointer"
href="/photos"
>
<img src="/immich-logo.svg" alt="immich logo" height="35" width="35" />
<h1 class="font-immich-title text-2xl text-immich-primary">IMMICH</h1>
</a>
@ -67,7 +71,7 @@
{/if}
{#if user.isAdmin}
<a sveltekit:prefetch href={`admin`}>
<a data-sveltekit-prefetch href={`admin`}>
<button
class={`flex place-items-center place-content-center gap-2 hover:bg-immich-primary/5 p-2 rounded-lg font-medium ${
$page.url.pathname == '/admin' && 'text-immich-primary underline'

View file

@ -55,8 +55,8 @@
<section id="sidebar" class="flex flex-col gap-1 pt-8 pr-6">
<!-- {domCount} -->
<a
sveltekit:prefetch
sveltekit:noscroll
data-sveltekit-prefetch
data-sveltekit-noscroll
href={$page.routeId !== 'photos' ? `/photos` : null}
class="relative"
>
@ -92,7 +92,11 @@
</div>
</a>
<a sveltekit:prefetch href={$page.routeId !== 'sharing' ? `/sharing` : null} class="relative">
<a
data-sveltekit-prefetch
href={$page.routeId !== 'sharing' ? `/sharing` : null}
class="relative"
>
<SideBarButton
title="Sharing"
logo={AccountMultipleOutline}
@ -126,7 +130,7 @@
<div class="text-xs ml-5 my-4">
<p>LIBRARY</p>
</div>
<a sveltekit:prefetch href={$page.routeId !== 'albums' ? `/albums` : null} class="relative">
<a data-sveltekit-prefetch href={$page.routeId !== 'albums' ? `/albums` : null} class="relative">
<SideBarButton
title="Albums"
logo={ImageAlbum}