Merge pull request #982 from jannikstdl/svelte-sonner

ui: svelte-french-toast -> svelte-sonner
This commit is contained in:
Timothy Jaeryang Baek 2024-03-02 01:41:49 -05:00 committed by GitHub
commit a7ae141301
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 51 additions and 73 deletions

46
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "open-webui",
"version": "v1.0.0-alpha.101",
"version": "0.1.106",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "open-webui",
"version": "v1.0.0-alpha.101",
"version": "0.1.106",
"dependencies": {
"@sveltejs/adapter-node": "^1.3.1",
"async": "^3.2.5",
@ -17,7 +17,7 @@
"js-sha256": "^0.10.1",
"katex": "^0.16.9",
"marked": "^9.1.0",
"svelte-french-toast": "^1.2.0",
"svelte-sonner": "^0.3.19",
"tippy.js": "^6.3.7",
"uuid": "^9.0.1"
},
@ -3211,17 +3211,6 @@
}
}
},
"node_modules/svelte-french-toast": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/svelte-french-toast/-/svelte-french-toast-1.2.0.tgz",
"integrity": "sha512-5PW+6RFX3xQPbR44CngYAP1Sd9oCq9P2FOox4FZffzJuZI2mHOB7q5gJBVnOiLF5y3moVGZ7u2bYt7+yPAgcEQ==",
"dependencies": {
"svelte-writable-derived": "^3.1.0"
},
"peerDependencies": {
"svelte": "^3.57.0 || ^4.0.0"
}
},
"node_modules/svelte-hmr": {
"version": "0.15.3",
"resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.15.3.tgz",
@ -3307,15 +3296,12 @@
"node": ">=12"
}
},
"node_modules/svelte-writable-derived": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-3.1.0.tgz",
"integrity": "sha512-cTvaVFNIJ036vSDIyPxJYivKC7ZLtcFOPm1Iq6qWBDo1fOHzfk6ZSbwaKrxhjgy52Rbl5IHzRcWgos6Zqn9/rg==",
"funding": {
"url": "https://ko-fi.com/pixievoltno1"
},
"node_modules/svelte-sonner": {
"version": "0.3.19",
"resolved": "https://registry.npmjs.org/svelte-sonner/-/svelte-sonner-0.3.19.tgz",
"integrity": "sha512-jpPOgLtHwRaB6Vqo2dUQMv15/yUV/BQWTjKpEqQ11uqRSHKjAYUKZyGrHB2cQsGmyjR0JUzBD58btpgNqINQ/Q==",
"peerDependencies": {
"svelte": "^3.2.1 || ^4.0.0-next.1"
"svelte": ">=3 <5"
}
},
"node_modules/tailwindcss": {
@ -5882,14 +5868,6 @@
"postcss-scss": "^4.0.8"
}
},
"svelte-french-toast": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/svelte-french-toast/-/svelte-french-toast-1.2.0.tgz",
"integrity": "sha512-5PW+6RFX3xQPbR44CngYAP1Sd9oCq9P2FOox4FZffzJuZI2mHOB7q5gJBVnOiLF5y3moVGZ7u2bYt7+yPAgcEQ==",
"requires": {
"svelte-writable-derived": "^3.1.0"
}
},
"svelte-hmr": {
"version": "0.15.3",
"resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.15.3.tgz",
@ -5920,10 +5898,10 @@
}
}
},
"svelte-writable-derived": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-3.1.0.tgz",
"integrity": "sha512-cTvaVFNIJ036vSDIyPxJYivKC7ZLtcFOPm1Iq6qWBDo1fOHzfk6ZSbwaKrxhjgy52Rbl5IHzRcWgos6Zqn9/rg==",
"svelte-sonner": {
"version": "0.3.19",
"resolved": "https://registry.npmjs.org/svelte-sonner/-/svelte-sonner-0.3.19.tgz",
"integrity": "sha512-jpPOgLtHwRaB6Vqo2dUQMv15/yUV/BQWTjKpEqQ11uqRSHKjAYUKZyGrHB2cQsGmyjR0JUzBD58btpgNqINQ/Q==",
"requires": {}
},
"tailwindcss": {

View file

@ -49,8 +49,8 @@
"js-sha256": "^0.10.1",
"katex": "^0.16.9",
"marked": "^9.1.0",
"svelte-french-toast": "^1.2.0",
"svelte-sonner": "^0.3.19",
"tippy.js": "^6.3.7",
"uuid": "^9.0.1"
}
}
}

View file

@ -1,5 +1,5 @@
<script lang="ts">
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import dayjs from 'dayjs';
import { createEventDispatcher } from 'svelte';
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 { onMount, tick } from 'svelte';
import { settings } from '$lib/stores';
import { blobToFile, calculateSHA256, findWordIndices } from '$lib/utils';

View file

@ -4,7 +4,7 @@
import { documents } from '$lib/stores';
import { removeFirstHashWord, isValidHttpUrl } from '$lib/utils';
import { tick } from 'svelte';
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
export let prompt = '';

View file

@ -3,7 +3,7 @@
import { models } from '$lib/stores';
import { splitStream } from '$lib/utils';
import { tick } from 'svelte';
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
export let prompt = '';
export let user = null;

View file

@ -2,7 +2,7 @@
import { prompts } from '$lib/stores';
import { findWordIndices } from '$lib/utils';
import { tick } from 'svelte';
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
export let prompt = '';
let selectedCommandIdx = 0;

View file

@ -4,7 +4,7 @@
import { chats, config, modelfiles, settings, user } from '$lib/stores';
import { tick } from 'svelte';
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import { getChatList, updateChatById } from '$lib/apis/chats';
import UserMessage from './Messages/UserMessage.svelte';

View file

@ -1,5 +1,5 @@
<script lang="ts">
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import dayjs from 'dayjs';
import { marked } from 'marked';
import tippy from 'tippy.js';

View file

@ -2,7 +2,7 @@
import { setDefaultModels } from '$lib/apis/configs';
import { models, showSettings, settings, user } from '$lib/stores';
import { onMount, tick } from 'svelte';
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
export let selectedModels = [''];
export let disabled = false;

View file

@ -1,5 +1,5 @@
<script lang="ts">
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import { onMount } from 'svelte';
import { user } from '$lib/stores';

View file

@ -1,5 +1,5 @@
<script lang="ts">
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import { updateUserPassword } from '$lib/apis/auths';
let show = false;

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { createEventDispatcher, onMount } from 'svelte';
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
const dispatch = createEventDispatcher();
export let saveSettings: Function;

View file

@ -15,7 +15,7 @@
import { getImportOrigin, convertOpenAIChats } from '$lib/utils';
import { onMount } from 'svelte';
import { goto } from '$app/navigation';
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
export let saveSettings: Function;
// Chats

View file

@ -5,7 +5,7 @@
import { getOllamaAPIUrl, getOllamaVersion, updateOllamaAPIUrl } from '$lib/apis/ollama';
import { getOpenAIKey, getOpenAIUrl, updateOpenAIKey, updateOpenAIUrl } from '$lib/apis/openai';
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
export let getModels: Function;

View file

@ -1,5 +1,5 @@
<script lang="ts">
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import { createEventDispatcher, onMount } from 'svelte';
const dispatch = createEventDispatcher();

View file

@ -1,5 +1,5 @@
<script lang="ts">
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import { createEventDispatcher, onMount } from 'svelte';
import { config, user } from '$lib/stores';

View file

@ -3,7 +3,7 @@
import { setDefaultPromptSuggestions } from '$lib/apis/configs';
import { config, models, user } from '$lib/stores';
import { createEventDispatcher, onMount } from 'svelte';
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
const dispatch = createEventDispatcher();
export let saveSettings: Function;

View file

@ -1,6 +1,6 @@
<script lang="ts">
import queue from 'async/queue';
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import { createModel, deleteModel, getOllamaVersion, pullModel } from '$lib/apis/ollama';
import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';

View file

@ -1,5 +1,5 @@
<script lang="ts">
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import { models, settings, user } from '$lib/stores';
import { getOllamaModels } from '$lib/apis/ollama';

View file

@ -1,5 +1,5 @@
<script lang="ts">
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import dayjs from 'dayjs';
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 dayjs from 'dayjs';
import { onMount } from 'svelte';

View file

@ -9,7 +9,7 @@
} from '$lib/apis/rag';
import { documents } from '$lib/stores';
import { onMount } from 'svelte';
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
export let saveHandler: Function;

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

@ -16,7 +16,7 @@
updateChatById,
getAllChatTags
} from '$lib/apis/chats';
import toast from 'svelte-french-toast';
import { toast } from 'svelte-sonner';
import { slide } from 'svelte/transition';
import { WEBUI_BASE_URL } from '$lib/constants';

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-center" />

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';