enh: manage shared chats
This commit is contained in:
1 parent
26a5d8f75d
commit
a10ac774ab
7 files changed
+362
-18
No files matched your search
@@ -24,6 +24,7 @@
|
||||
import { goto } from '$app/navigation';
|
||||
import { toast } from 'svelte-sonner';
|
||||
import ArchivedChatsModal from '$lib/components/layout/ArchivedChatsModal.svelte';
|
||||
import SharedChatsModal from '$lib/components/layout/SharedChatsModal.svelte';
|
||||
import ConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
@@ -36,6 +37,7 @@
|
||||
let showArchiveConfirmDialog = false;
|
||||
let showDeleteConfirmDialog = false;
|
||||
let showArchivedChatsModal = false;
|
||||
let showSharedChatsModal = false;
|
||||
|
||||
let chatImportInputElement: HTMLInputElement;
|
||||
|
||||
@@ -136,6 +138,7 @@
|
||||
</script>
|
||||
|
||||
<ArchivedChatsModal bind:show={showArchivedChatsModal} onUpdate={handleArchivedChatsChange} />
|
||||
<SharedChatsModal bind:show={showSharedChatsModal} />
|
||||
|
||||
<ConfirmDialog
|
||||
title={$i18n.t('Archive All Chats')}
|
||||
@@ -169,7 +172,7 @@
|
||||
/>
|
||||
|
||||
<div>
|
||||
<div class="mb-1 text-sm font-medium">{$i18n.t('Chat Management')}</div>
|
||||
<div class="mb-1 text-sm font-medium">{$i18n.t('Chats')}</div>
|
||||
|
||||
<div>
|
||||
<div class="py-0.5 flex w-full justify-between">
|
||||
@@ -218,6 +221,21 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="py-0.5 flex w-full justify-between">
|
||||
<div class="self-center text-xs">{$i18n.t('Shared Chats')}</div>
|
||||
<button
|
||||
class="p-1 px-3 text-xs flex rounded-sm transition"
|
||||
on:click={() => {
|
||||
showSharedChatsModal = true;
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
<span class="self-center">{$i18n.t('Manage')}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="py-0.5 flex w-full justify-between">
|
||||
<div class="self-center text-xs">{$i18n.t('Archive All Chats')}</div>
|
||||
|
||||
Reference in new issue
Block a user