refac
This commit is contained in:
@@ -51,13 +51,16 @@
|
||||
import FilesOverlay from '$lib/components/chat/MessageInput/FilesOverlay.svelte';
|
||||
import DropdownOptions from '$lib/components/common/DropdownOptions.svelte';
|
||||
import Pagination from '$lib/components/common/Pagination.svelte';
|
||||
import AttachWebpageModal from '$lib/components/chat/MessageInput/AttachWebpageModal.svelte';
|
||||
|
||||
let largeScreen = true;
|
||||
|
||||
let pane;
|
||||
let showSidepanel = true;
|
||||
|
||||
let showAddWebpageModal = false;
|
||||
let showAddTextContentModal = false;
|
||||
|
||||
let showSyncConfirmModal = false;
|
||||
let showAccessControlModal = false;
|
||||
|
||||
@@ -696,6 +699,13 @@
|
||||
}}
|
||||
/>
|
||||
|
||||
<AttachWebpageModal
|
||||
bind:show={showAddWebpageModal}
|
||||
onSubmit={async (data) => {
|
||||
console.log(data);
|
||||
}}
|
||||
/>
|
||||
|
||||
<AddTextContentModal
|
||||
bind:show={showAddTextContentModal}
|
||||
on:submit={(e) => {
|
||||
@@ -829,6 +839,8 @@
|
||||
onUpload={(data) => {
|
||||
if (data.type === 'directory') {
|
||||
uploadDirectoryHandler();
|
||||
} else if (data.type === 'web') {
|
||||
showAddWebpageModal = true;
|
||||
} else if (data.type === 'text') {
|
||||
showAddTextContentModal = true;
|
||||
} else {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
import BarsArrowUp from '$lib/components/icons/BarsArrowUp.svelte';
|
||||
import FolderOpen from '$lib/components/icons/FolderOpen.svelte';
|
||||
import ArrowPath from '$lib/components/icons/ArrowPath.svelte';
|
||||
import GlobeAlt from '$lib/components/icons/GlobeAlt.svelte';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
@@ -96,6 +97,16 @@
|
||||
</DropdownMenu.Item>
|
||||
</Tooltip>
|
||||
|
||||
<DropdownMenu.Item
|
||||
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||
on:click={() => {
|
||||
onUpload({ type: 'web' });
|
||||
}}
|
||||
>
|
||||
<GlobeAlt strokeWidth="2" />
|
||||
<div class="flex items-center">{$i18n.t('Add webpage')}</div>
|
||||
</DropdownMenu.Item>
|
||||
|
||||
<DropdownMenu.Item
|
||||
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||
on:click={() => {
|
||||
|
||||
Reference in New Issue
Block a user