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,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> | ||||
|  |  | |||
|  | @ -35,13 +35,13 @@ | |||
| 	<!-- svelte-ignore a11y-no-static-element-interactions --> | ||||
| 	<div | ||||
| 		class=" fixed top-0 right-0 left-0 bottom-0 bg-black/60 w-full min-h-screen h-screen flex justify-center z-50 overflow-hidden overscroll-contain" | ||||
| 		transition:fade={{ duration: 50 }} | ||||
| 		in:fade={{ duration: 10 }} | ||||
| 	> | ||||
| 		<div | ||||
| 			class=" modal-content m-auto rounded-xl max-w-full {sizeToWidth( | ||||
| 				size | ||||
| 			)} mx-2 bg-gray-50 dark:bg-gray-900 shadow-3xl" | ||||
| 			transition:fade={{ duration: 50 }} | ||||
| 			in:fade={{ duration: 10 }} | ||||
| 			on:click={(e) => { | ||||
| 				e.stopPropagation(); | ||||
| 			}} | ||||
|  |  | |||
|  | @ -563,7 +563,7 @@ | |||
| 						<div | ||||
| 							id="dropdownDots" | ||||
| 							class="absolute z-40 bottom-[70px] 4.5rem rounded-lg shadow w-[240px] bg-gray-900" | ||||
| 							transition:slide={{ duration: 300 }} | ||||
| 							in:slide={{ duration: 150 }} | ||||
| 						> | ||||
| 							<div class="py-2 w-full"> | ||||
| 								{#if $user.role === 'admin'} | ||||
|  |  | |||
|  | @ -32,3 +32,4 @@ export const documents = writable([ | |||
| 
 | ||||
| export const settings = writable({}); | ||||
| export const showSettings = writable(false); | ||||
| export const showChangelog = writable(false); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek