svelte-sonner migration

This commit is contained in:
Jannik Streidl 2024-03-01 10:18:07 +01:00
parent 5745b9c5db
commit 705f5aecd7
38 changed files with 51 additions and 73 deletions

View file

@ -1,5 +1,5 @@
<script lang="ts">
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import { openDB, deleteDB } from 'idb';
import fileSaver from 'file-saver';
const { saveAs } = fileSaver;

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { v4 as uuidv4 } from 'uuid';
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import { onMount, tick } from 'svelte';
import { goto } from '$app/navigation';

View file

@ -4,7 +4,7 @@
import { goto } from '$app/navigation';
import { onMount } from 'svelte';
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import { updateUserRole, getUsers, deleteUserById } from '$lib/apis/users';
import { getSignUpEnabledStatus, toggleSignUpEnabledStatus } from '$lib/apis/auths';

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { v4 as uuidv4 } from 'uuid';
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import { onMount, tick } from 'svelte';
import { goto } from '$app/navigation';

View file

@ -1,5 +1,5 @@
<script lang="ts">
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import fileSaver from 'file-saver';
const { saveAs } = fileSaver;

View file

@ -1,5 +1,5 @@
<script lang="ts">
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import fileSaver from 'file-saver';
const { saveAs } = fileSaver;

View file

@ -1,6 +1,6 @@
<script>
import { v4 as uuidv4 } from 'uuid';
import { toast } from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import { goto } from '$app/navigation';
import { settings, user, config, modelfiles, models } from '$lib/stores';

View file

@ -1,6 +1,6 @@
<script>
import { v4 as uuidv4 } from 'uuid';
import { toast } from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import { goto } from '$app/navigation';
import { onMount } from 'svelte';

View file

@ -1,5 +1,5 @@
<script lang="ts">
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import fileSaver from 'file-saver';
const { saveAs } = fileSaver;

View file

@ -1,5 +1,5 @@
<script>
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import { goto } from '$app/navigation';
import { prompts } from '$lib/stores';

View file

@ -1,5 +1,5 @@
<script>
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import { goto } from '$app/navigation';
import { prompts } from '$lib/stores';

View file

@ -2,7 +2,7 @@
import { onMount, tick } from 'svelte';
import { config, user, theme, WEBUI_NAME } from '$lib/stores';
import { goto } from '$app/navigation';
import toast, { Toaster } from 'svelte-french-toast';
import { Toaster, toast } from 'svelte-sonner';
import { getBackendConfig } from '$lib/apis';
import { getSessionUser } from '$lib/apis/auths';
@ -68,4 +68,4 @@
<slot />
{/if}
<Toaster />
<Toaster richColors position="top-right" />

View file

@ -4,7 +4,7 @@
import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
import { WEBUI_NAME, config, user } from '$lib/stores';
import { onMount } from 'svelte';
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
let loaded = false;
let mode = 'signin';