change frontpage image and toast animation
This commit is contained in:
@ -7,6 +7,9 @@
|
||||
import ErrorAlert from '../ui/ErrorAlert.svelte';
|
||||
import { Setting, ToggleSetting, NumericSetting } from '../ui/settings';
|
||||
|
||||
import { fly } from 'svelte/transition';
|
||||
import { backInOut } from 'svelte/easing';
|
||||
|
||||
|
||||
let error = null;
|
||||
async function save() {
|
||||
@ -21,11 +24,13 @@
|
||||
</script>
|
||||
|
||||
|
||||
<Nav />
|
||||
<Nav>
|
||||
<h2 slot="title" class="text-2xl font-bold">Settings</h2>
|
||||
</Nav>
|
||||
|
||||
{#await invoke('get_config') then config}
|
||||
<div class="max-w-md mx-auto mt-1.5 p-4">
|
||||
<h2 class="text-2xl font-bold text-center">Settings</h2>
|
||||
<!-- <h2 class="text-2xl font-bold text-center">Settings</h2> -->
|
||||
|
||||
<ToggleSetting title="Start on login" bind:value={$appState.config.start_on_login} on:update={save}>
|
||||
<svelte:fragment slot="description">
|
||||
@ -66,8 +71,8 @@
|
||||
{/await}
|
||||
|
||||
{#if error}
|
||||
<div class="toast">
|
||||
<div class="alert alert-error">
|
||||
<div transition:fly={{y: 100, easing: backInOut, duration: 400}} class="toast">
|
||||
<div class="alert alert-error no-animation">
|
||||
<div>
|
||||
<span>{error}</span>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user