refac
This commit is contained in:
1 parent
1457f2dec8
commit
35f8bf97e3
4 files changed
+40
-14
No files matched your search
@@ -48,7 +48,12 @@
|
|||||||
deleteAllChats,
|
deleteAllChats,
|
||||||
getChatListBySearchText
|
getChatListBySearchText
|
||||||
} from '$lib/apis/chats';
|
} from '$lib/apis/chats';
|
||||||
import { createNewFolder, getFolders, getSharedFolders, updateFolderParentIdById } from '$lib/apis/folders';
|
import {
|
||||||
|
createNewFolder,
|
||||||
|
getFolders,
|
||||||
|
getSharedFolders,
|
||||||
|
updateFolderParentIdById
|
||||||
|
} from '$lib/apis/folders';
|
||||||
import { createNewNote, getPinnedNoteList, toggleNotePinnedStatusById } from '$lib/apis/notes';
|
import { createNewNote, getPinnedNoteList, toggleNotePinnedStatusById } from '$lib/apis/notes';
|
||||||
import { updateUserSettings } from '$lib/apis/users';
|
import { updateUserSettings } from '$lib/apis/users';
|
||||||
import { checkActiveChats } from '$lib/apis/tasks';
|
import { checkActiveChats } from '$lib/apis/tasks';
|
||||||
|
|||||||
@@ -83,8 +83,19 @@
|
|||||||
onShare();
|
onShare();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
<svg
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.935-2.186 2.25 2.25 0 0 0-3.935 2.186Z" />
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
fill="none"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
stroke-width="1.5"
|
||||||
|
stroke="currentColor"
|
||||||
|
class="size-4"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
d="M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.935-2.186 2.25 2.25 0 0 0-3.935 2.186Z"
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
<div class="flex items-center">{$i18n.t('Share')}</div>
|
<div class="flex items-center">{$i18n.t('Share')}</div>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -511,7 +511,7 @@
|
|||||||
</DragGhost>
|
</DragGhost>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div bind:this={folderElement} class="relative {className}" draggable="{!folders[folderId]?.shared}">
|
<div bind:this={folderElement} class="relative {className}" draggable={!folders[folderId]?.shared}>
|
||||||
{#if draggedOver}
|
{#if draggedOver}
|
||||||
<div
|
<div
|
||||||
class="absolute top-0 left-0 w-full h-full rounded-xs bg-gray-100/50 dark:bg-gray-700/20 bg-opacity-50 dark:bg-opacity-10 z-50 pointer-events-none touch-none"
|
class="absolute top-0 left-0 w-full h-full rounded-xs bg-gray-100/50 dark:bg-gray-700/20 bg-opacity-50 dark:bg-opacity-10 z-50 pointer-events-none touch-none"
|
||||||
|
|||||||
@@ -53,9 +53,7 @@
|
|||||||
|
|
||||||
<div class={className}>
|
<div class={className}>
|
||||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||||
<div
|
<div class="w-full group">
|
||||||
class="w-full group"
|
|
||||||
>
|
|
||||||
<button
|
<button
|
||||||
class="w-full py-1 flex items-center gap-1 text-xs text-left font-medium
|
class="w-full py-1 flex items-center gap-1 text-xs text-left font-medium
|
||||||
text-gray-600 dark:text-gray-400
|
text-gray-600 dark:text-gray-400
|
||||||
@@ -85,9 +83,24 @@
|
|||||||
|
|
||||||
{#if !isWritable}
|
{#if !isWritable}
|
||||||
<div class="shrink-0 text-[10px] text-gray-400 dark:text-gray-600" title="Read only">
|
<div class="shrink-0 text-[10px] text-gray-400 dark:text-gray-600" title="Read only">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-3">
|
<svg
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" />
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
fill="none"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
stroke-width="1.5"
|
||||||
|
stroke="currentColor"
|
||||||
|
class="size-3"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -115,10 +128,7 @@
|
|||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
{#each children as child (child.id)}
|
{#each children as child (child.id)}
|
||||||
<svelte:self
|
<svelte:self folder={child} {allSharedFolders} />
|
||||||
folder={child}
|
|
||||||
{allSharedFolders}
|
|
||||||
/>
|
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
{#if chats.length === 0 && children.length === 0}
|
{#if chats.length === 0 && children.length === 0}
|
||||||
|
|||||||
Reference in new issue
Block a user