feat: changelog modal auto popup

This commit is contained in:
Timothy J. Baek 2024-02-23 00:47:54 -08:00
parent a84070c6d3
commit 05aea9edf9
5 changed files with 25 additions and 17 deletions

View file

@ -1,10 +1,14 @@
<script lang="ts">
import Modal from './common/Modal.svelte';
import { Confetti } from 'svelte-confetti';
import { WEBUI_NAME, WEB_UI_VERSION } from '$lib/constants';
import { onMount } from 'svelte';
import { Confetti } from 'svelte-confetti';
import { config } from '$lib/stores';
import { WEBUI_NAME, WEB_UI_VERSION } from '$lib/constants';
import { getChangelog } from '$lib/apis';
import Modal from './common/Modal.svelte';
export let show = false;
let changelog = null;
@ -79,11 +83,12 @@
<div class="flex justify-end pt-3 text-sm font-medium">
<button
on:click={() => {
localStorage.version = $config.version;
show = false;
}}
class=" px-4 py-2 bg-emerald-600 hover:bg-emerald-700 text-gray-100 transition rounded"
>
<span class="relative">Ok, let's go!</span>
<span class="relative">Okay, Let's Go!</span>
</button>
</div>
</div>