mirror of
https://github.com/morgan9e/chatgpt-web
synced 2026-04-13 16:04:05 +09:00
Fix sizing of textareas in settings modal
This commit is contained in:
@@ -96,6 +96,13 @@
|
||||
<span class="menu-icon"><Fa icon={faClone}/></span> Clone Chat
|
||||
</a>
|
||||
<hr class="dropdown-divider">
|
||||
<a href={'#'} class="dropdown-item" class:is-disabled={!chatId} on:click|preventDefault={() => { if (chatId) restartChatSession() }}>
|
||||
<span class="menu-icon"><Fa icon={faRotateRight}/></span> Restart Chat Session
|
||||
</a>
|
||||
<a href={'#'} class="dropdown-item" class:is-disabled={!chatId} on:click|preventDefault={() => { if (chatId) close(); clearMessages(chatId) }}>
|
||||
<span class="menu-icon"><Fa icon={faEraser}/></span> Clear Chat Messages
|
||||
</a>
|
||||
<hr class="dropdown-divider">
|
||||
<a href={'#'} class="dropdown-item" class:is-disabled={!chatId} on:click|preventDefault={() => { close(); exportChatAsJSON(chatId) }}>
|
||||
<span class="menu-icon"><Fa icon={faDownload}/></span> Backup Chat JSON
|
||||
</a>
|
||||
@@ -106,13 +113,6 @@
|
||||
<span class="menu-icon"><Fa icon={faFileExport}/></span> Export Chat Markdown
|
||||
</a>
|
||||
<hr class="dropdown-divider">
|
||||
<a href={'#'} class="dropdown-item" class:is-disabled={!chatId} on:click|preventDefault={() => { if (chatId) restartChatSession() }}>
|
||||
<span class="menu-icon"><Fa icon={faRotateRight}/></span> Restart Chat Session
|
||||
</a>
|
||||
<a href={'#'} class="dropdown-item" class:is-disabled={!chatId} on:click|preventDefault={() => { if (chatId) close(); clearMessages(chatId) }}>
|
||||
<span class="menu-icon"><Fa icon={faEraser}/></span> Clear Chat Messages
|
||||
</a>
|
||||
<hr class="dropdown-divider">
|
||||
<a href={'#'} class="dropdown-item" class:is-disabled={!chatId} on:click|preventDefault={() => { if (chatId) close(); deleteChat() }}>
|
||||
<span class="menu-icon"><Fa icon={faTrash}/></span> Delete Chat
|
||||
</a>
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
faUpload
|
||||
} from '@fortawesome/free-solid-svg-icons/index'
|
||||
import { exportProfileAsJSON } from './Export.svelte'
|
||||
import { afterUpdate } from 'svelte'
|
||||
|
||||
export let chatId:number
|
||||
export const show = () => { showSettings() }
|
||||
@@ -44,6 +45,10 @@
|
||||
$: chat = $chatsStorage.find((chat) => chat.id === chatId) as Chat
|
||||
$: chatSettings = chat.settings
|
||||
$: globalStore = $globalStorage
|
||||
|
||||
afterUpdate(() => {
|
||||
sizeTextElements()
|
||||
})
|
||||
|
||||
const closeSettings = () => {
|
||||
showProfileMenu = false
|
||||
@@ -164,7 +169,7 @@
|
||||
// Refresh settings modal
|
||||
showSettingsModal++
|
||||
|
||||
setTimeout(() => sizeTextElements, 100)
|
||||
setTimeout(() => sizeTextElements(), 0)
|
||||
}
|
||||
|
||||
const debounce = {}
|
||||
@@ -260,6 +265,10 @@
|
||||
<span class="menu-icon"><Fa icon={faClone}/></span> Clone Profile
|
||||
</a>
|
||||
<hr class="dropdown-divider">
|
||||
<a href={'#'} class="dropdown-item" on:click|preventDefault={pinDefaultProfile}>
|
||||
<span class="menu-icon"><Fa icon={faThumbtack}/></span> Set as Default Profile
|
||||
</a>
|
||||
<hr class="dropdown-divider">
|
||||
<a href={'#'}
|
||||
class="dropdown-item"
|
||||
on:click|preventDefault={() => { showProfileMenu = false; exportProfileAsJSON(chatId) }}
|
||||
@@ -270,10 +279,6 @@
|
||||
<span class="menu-icon"><Fa icon={faUpload}/></span> Restore Profile JSON
|
||||
</a>
|
||||
<hr class="dropdown-divider">
|
||||
<a href={'#'} class="dropdown-item" on:click|preventDefault={pinDefaultProfile}>
|
||||
<span class="menu-icon"><Fa icon={faThumbtack}/></span> Set as Default Profile
|
||||
</a>
|
||||
<hr class="dropdown-divider">
|
||||
<a href={'#'} class="dropdown-item" on:click|preventDefault={deleteProfile}>
|
||||
<span class="menu-icon"><Fa icon={faTrash}/></span> Delete Profile
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user