forked from open-webui/open-webui
		
	feat: changelog.md
This commit is contained in:
		
							parent
							
								
									9b27d952f8
								
							
						
					
					
						commit
						9f950aea9c
					
				
					 13 changed files with 237 additions and 154 deletions
				
			
		| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
<script lang="ts">
 | 
			
		||||
	import { getBackendConfig } from '$lib/apis';
 | 
			
		||||
	import { setDefaultPromptSuggestions } from '$lib/apis/configs';
 | 
			
		||||
	import { config, models, user, showWhatsChanged } from '$lib/stores';
 | 
			
		||||
	import { config, models, user } from '$lib/stores';
 | 
			
		||||
	import { createEventDispatcher, onMount } from 'svelte';
 | 
			
		||||
	import toast from 'svelte-french-toast';
 | 
			
		||||
	const dispatch = createEventDispatcher();
 | 
			
		||||
| 
						 | 
				
			
			@ -18,7 +18,6 @@
 | 
			
		|||
	// Interface
 | 
			
		||||
	let promptSuggestions = [];
 | 
			
		||||
	let showUsername = false;
 | 
			
		||||
	let enableWhatsChanged = true;
 | 
			
		||||
 | 
			
		||||
	const toggleFullScreenMode = async () => {
 | 
			
		||||
		fullScreenMode = !fullScreenMode;
 | 
			
		||||
| 
						 | 
				
			
			@ -30,14 +29,6 @@
 | 
			
		|||
		saveSettings({ showUsername: showUsername });
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	const toggleenableWhatsChanged = async () => {
 | 
			
		||||
		enableWhatsChanged = !enableWhatsChanged;
 | 
			
		||||
		if (enableWhatsChanged) {
 | 
			
		||||
			showWhatsChanged.update((value) => true);
 | 
			
		||||
		}
 | 
			
		||||
		saveSettings({ enableWhatsChanged: enableWhatsChanged });
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	const toggleTitleAutoGenerate = async () => {
 | 
			
		||||
		titleAutoGenerate = !titleAutoGenerate;
 | 
			
		||||
		saveSettings({ titleAutoGenerate: titleAutoGenerate });
 | 
			
		||||
| 
						 | 
				
			
			@ -86,7 +77,6 @@
 | 
			
		|||
		titleAutoGenerate = settings.titleAutoGenerate ?? true;
 | 
			
		||||
		responseAutoCopy = settings.responseAutoCopy ?? false;
 | 
			
		||||
		showUsername = settings.showUsername ?? false;
 | 
			
		||||
		enableWhatsChanged = settings.enableWhatsChanged ?? true;
 | 
			
		||||
		fullScreenMode = settings.fullScreenMode ?? false;
 | 
			
		||||
		titleAutoGenerateModel = settings.titleAutoGenerateModel ?? '';
 | 
			
		||||
		titleGenerationPrompt =
 | 
			
		||||
| 
						 | 
				
			
			@ -187,25 +177,6 @@
 | 
			
		|||
					</button>
 | 
			
		||||
				</div>
 | 
			
		||||
			</div>
 | 
			
		||||
			<div>
 | 
			
		||||
				<div class=" py-0.5 flex w-full justify-between">
 | 
			
		||||
					<div class=" self-center text-xs font-medium">Show "WhatsChanged" Modal on Startup</div>
 | 
			
		||||
 | 
			
		||||
					<button
 | 
			
		||||
						class="p-1 px-3 text-xs flex rounded transition"
 | 
			
		||||
						on:click={() => {
 | 
			
		||||
							toggleenableWhatsChanged();
 | 
			
		||||
						}}
 | 
			
		||||
						type="button"
 | 
			
		||||
					>
 | 
			
		||||
						{#if enableWhatsChanged === true}
 | 
			
		||||
							<span class="ml-2 self-center">On</span>
 | 
			
		||||
						{:else}
 | 
			
		||||
							<span class="ml-2 self-center">Off</span>
 | 
			
		||||
						{/if}
 | 
			
		||||
					</button>
 | 
			
		||||
				</div>
 | 
			
		||||
			</div>
 | 
			
		||||
		</div>
 | 
			
		||||
 | 
			
		||||
		<hr class=" dark:border-gray-700" />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,79 +0,0 @@
 | 
			
		|||
<script lang="ts">
 | 
			
		||||
	import Modal from '../common/Modal.svelte';
 | 
			
		||||
	import { Confetti } from 'svelte-confetti';
 | 
			
		||||
	import { WEBUI_NAME, WEB_UI_VERSION, RELEASE_NOTES } from '$lib/constants';
 | 
			
		||||
	import { config, showWhatsChanged } from '$lib/stores';
 | 
			
		||||
 | 
			
		||||
	export let show = false;
 | 
			
		||||
 | 
			
		||||
	function toggleVisibility() {
 | 
			
		||||
		showWhatsChanged.update((value) => !value);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	function handleClick() {
 | 
			
		||||
		toggleVisibility();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	let hasValidNotes = Array.isArray(RELEASE_NOTES) && RELEASE_NOTES.length > 0;
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<Modal bind:show>
 | 
			
		||||
	<div class="px-5 py-4 dark:text-gray-300">
 | 
			
		||||
		<div class="flex justify-between items-start">
 | 
			
		||||
			<div class="text-xl font-bold">
 | 
			
		||||
				{WEBUI_NAME}
 | 
			
		||||
				<Confetti x={[-1, -0.25]} y={[0, 0.5]} />
 | 
			
		||||
			</div>
 | 
			
		||||
			<button class="self-center" on:click={handleClick}>
 | 
			
		||||
				<svg
 | 
			
		||||
					xmlns="http://www.w3.org/2000/svg"
 | 
			
		||||
					viewBox="0 0 20 20"
 | 
			
		||||
					fill="currentColor"
 | 
			
		||||
					class="w-5 h-5"
 | 
			
		||||
				>
 | 
			
		||||
					<path
 | 
			
		||||
						d="M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"
 | 
			
		||||
					/>
 | 
			
		||||
				</svg>
 | 
			
		||||
			</button>
 | 
			
		||||
		</div>
 | 
			
		||||
		<div class=" pb-3 flex items-center mt-2">
 | 
			
		||||
			<div class="text-sm dark:text-gray-200">Release Notes</div>
 | 
			
		||||
			<div class="flex self-center w-[1px] h-6 mx-2.5 bg-gray-200 dark:bg-gray-700" />
 | 
			
		||||
			<div class="text-sm dark:text-gray-200">
 | 
			
		||||
				{$config && $config.version ? $config.version : WEB_UI_VERSION}
 | 
			
		||||
			</div>
 | 
			
		||||
		</div>
 | 
			
		||||
		<hr class=" dark:border-gray-800" />
 | 
			
		||||
		<div class="p-4 overflow-y-scroll max-h-80">
 | 
			
		||||
			{#if !hasValidNotes}
 | 
			
		||||
				<div class="pt-10 text-center font-bold">There are no notes given.</div>
 | 
			
		||||
 | 
			
		||||
				<div class="pb-10 text-center">
 | 
			
		||||
					Check
 | 
			
		||||
					<a class="text-blue-500" href="https://github.com/open-webui/open-webui" target="_blank">
 | 
			
		||||
						Open WebUI on GitHub</a
 | 
			
		||||
					> for more information.
 | 
			
		||||
				</div>
 | 
			
		||||
			{:else}
 | 
			
		||||
				{#each RELEASE_NOTES as { title, description }}
 | 
			
		||||
					<div class="mt-4">
 | 
			
		||||
						<div class="font-bold">{title}</div>
 | 
			
		||||
						<div>{description}</div>
 | 
			
		||||
					</div>
 | 
			
		||||
				{/each}
 | 
			
		||||
			{/if}
 | 
			
		||||
		</div>
 | 
			
		||||
		<div class="m-4 flex justify-end pt-3 text-sm font-medium">
 | 
			
		||||
			<button
 | 
			
		||||
				on:click={handleClick}
 | 
			
		||||
				class=" rounded px-4 py-2 overflow-hidden group bg-green-600 relative hover:bg-gradient-to-r hover:from-green-600 hover:to-green-500 text-white hover:ring-2 hover:ring-offset-2 hover:ring-green-500 transition-all ease-out duration-300"
 | 
			
		||||
			>
 | 
			
		||||
				<span
 | 
			
		||||
					class="absolute right-0 w-8 h-32 -mt-12 transition-all duration-1000 transform translate-x-12 bg-white opacity-10 rotate-12 group-hover:-translate-x-40 ease"
 | 
			
		||||
				/>
 | 
			
		||||
				<span class="relative">Ok, let's go!</span>
 | 
			
		||||
			</button>
 | 
			
		||||
		</div>
 | 
			
		||||
	</div>
 | 
			
		||||
</Modal>
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue