forked from open-webui/open-webui
feat: changelog modal auto popup
This commit is contained in:
parent
a84070c6d3
commit
05aea9edf9
5 changed files with 25 additions and 17 deletions
|
@ -1,17 +1,18 @@
|
|||
<script lang="ts">
|
||||
import toast from 'svelte-french-toast';
|
||||
import { openDB, deleteDB } from 'idb';
|
||||
import { onMount, tick } from 'svelte';
|
||||
import { goto } from '$app/navigation';
|
||||
|
||||
import fileSaver from 'file-saver';
|
||||
const { saveAs } = fileSaver;
|
||||
|
||||
import { onMount, tick } from 'svelte';
|
||||
import { goto } from '$app/navigation';
|
||||
|
||||
import { getOllamaModels, getOllamaVersion } from '$lib/apis/ollama';
|
||||
import { getModelfiles } from '$lib/apis/modelfiles';
|
||||
import { getPrompts } from '$lib/apis/prompts';
|
||||
|
||||
import { getOpenAIModels } from '$lib/apis/openai';
|
||||
import { getDocs } from '$lib/apis/documents';
|
||||
import { getAllChatTags } from '$lib/apis/chats';
|
||||
|
||||
import {
|
||||
user,
|
||||
|
@ -21,16 +22,16 @@
|
|||
modelfiles,
|
||||
prompts,
|
||||
documents,
|
||||
tags
|
||||
tags,
|
||||
showChangelog,
|
||||
config
|
||||
} from '$lib/stores';
|
||||
import { REQUIRED_OLLAMA_VERSION, WEBUI_API_BASE_URL } from '$lib/constants';
|
||||
import { checkVersion } from '$lib/utils';
|
||||
|
||||
import SettingsModal from '$lib/components/chat/SettingsModal.svelte';
|
||||
import Sidebar from '$lib/components/layout/Sidebar.svelte';
|
||||
import { checkVersion } from '$lib/utils';
|
||||
import ShortcutsModal from '$lib/components/chat/ShortcutsModal.svelte';
|
||||
import { getDocs } from '$lib/apis/documents';
|
||||
import { getAllChatTags } from '$lib/apis/chats';
|
||||
import ChangelogModal from '$lib/components/ChangelogModal.svelte';
|
||||
|
||||
let ollamaVersion = '';
|
||||
|
@ -183,6 +184,8 @@
|
|||
}
|
||||
});
|
||||
|
||||
showChangelog.set(localStorage.version !== $config.version);
|
||||
|
||||
await tick();
|
||||
}
|
||||
|
||||
|
@ -349,8 +352,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
<ChangelogModal show={true} />
|
||||
{/if}
|
||||
|
||||
<div
|
||||
|
@ -358,6 +359,7 @@
|
|||
>
|
||||
<Sidebar />
|
||||
<SettingsModal bind:show={$showSettings} />
|
||||
<ChangelogModal bind:show={$showChangelog} />
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue