mirror of
https://github.com/morgan9e/chatgpt-web
synced 2026-04-14 00:14:04 +09:00
Add ability to hide summarized messages
This commit is contained in:
@@ -12,9 +12,11 @@
|
||||
faSquarePlus,
|
||||
faKey,
|
||||
faFileExport,
|
||||
faTrashCan
|
||||
faTrashCan,
|
||||
faEye,
|
||||
faEyeSlash
|
||||
} from '@fortawesome/free-solid-svg-icons/index'
|
||||
import { addChatFromJSON, chatsStorage, checkStateChange, clearChats, clearMessages, copyChat, showSetChatSettings } from './Storage.svelte'
|
||||
import { addChatFromJSON, chatsStorage, checkStateChange, clearChats, clearMessages, copyChat, globalStorage, setGlobalSettingValueByKey, showSetChatSettings } from './Storage.svelte'
|
||||
import { exportAsMarkdown, exportChatAsJSON } from './Export.svelte'
|
||||
import { applyProfile } from './Profiles.svelte'
|
||||
import { replace } from 'svelte-spa-router'
|
||||
@@ -65,6 +67,11 @@
|
||||
$checkStateChange++ // signal chat page to start profile
|
||||
}
|
||||
|
||||
const toggleHideSummarized = () => {
|
||||
close()
|
||||
setGlobalSettingValueByKey('hideSummarized', !$globalStorage.hideSummarized)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div class="dropdown is-right" class:is-active={showChatMenu} use:clickOutside={() => { showChatMenu = false }}>
|
||||
@@ -113,6 +120,14 @@
|
||||
<span class="menu-icon"><Fa icon={faTrashCan}/></span> Delete ALL Chats
|
||||
</a>
|
||||
<hr class="dropdown-divider">
|
||||
<a href={'#'} class="dropdown-item" on:click|preventDefault={() => { if (chatId) toggleHideSummarized() }}>
|
||||
{#if $globalStorage.hideSummarized}
|
||||
<span class="menu-icon"><Fa icon={faEye}/></span> Show Summarized Messages
|
||||
{:else}
|
||||
<span class="menu-icon"><Fa icon={faEyeSlash}/></span> Hide Summarized Messages
|
||||
{/if}
|
||||
</a>
|
||||
<hr class="dropdown-divider">
|
||||
<a href={'#/'} class="dropdown-item">
|
||||
<span><Fa icon={faKey}/></span> API Key
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user