From 966dc71e5b8b93d48880e7f34a2d5f614e52d038 Mon Sep 17 00:00:00 2001 From: Webifi Date: Mon, 17 Jul 2023 14:09:25 -0500 Subject: [PATCH] disable unsaved profile warning for now --- src/lib/Util.svelte | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/lib/Util.svelte b/src/lib/Util.svelte index c07c50e..3342362 100644 --- a/src/lib/Util.svelte +++ b/src/lib/Util.svelte @@ -4,7 +4,7 @@ import PromptNotice from './PromptNotice.svelte' import { addChat, getChat } from './Storage.svelte' import { replace } from 'svelte-spa-router' - import PromptConfirm from './PromptConfirm.svelte' + // import PromptConfirm from './PromptConfirm.svelte' import type { ChatSettings } from './Types.svelte' export const sizeTextElements = () => { const els = document.querySelectorAll('textarea.auto-size') @@ -131,19 +131,20 @@ const chatId = addChat(profile) replace(`/chat/${chatId}`) } - if (activeChatId && getChat(activeChatId).settings.isDirty) { - openModal(PromptConfirm, { - title: 'Unsaved Profile', - message: '

There are unsaved changes to your current profile that will be lost.

Discard these changes and continue with new chat?

', - asHtml: true, - class: 'is-warning', - onConfirm: () => { - newChat() - } - }) - } else { - newChat() - } + // if (activeChatId && getChat(activeChatId).settings.isDirty) { + // openModal(PromptConfirm, { + // title: 'Unsaved Profile', + // message: '

There are unsaved changes to your current profile that will be lost.

Discard these changes and continue with new chat?

', + // asHtml: true, + // class: 'is-warning', + // onConfirm: () => { + // newChat() + // } + // }) + // } else { + // newChat() + // } + newChat() } \ No newline at end of file