refac
This commit is contained in:
1 parent
f8c5fda283
commit
17c190bf99
1 file changed
+24
-16
@@ -52,9 +52,9 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<button
|
<button
|
||||||
class="relative group p-1.5 {className} flex items-center gap-1 {colorClassName} {small
|
class="relative group {className} flex items-center {colorClassName} {small
|
||||||
? 'rounded-xl p-2'
|
? 'h-8 gap-1.5 rounded-xl px-2.5 text-[0.8125rem] leading-5'
|
||||||
: 'rounded-2xl'} text-left"
|
: 'gap-1 rounded-2xl p-1.5'} text-left"
|
||||||
type="button"
|
type="button"
|
||||||
on:click={async () => {
|
on:click={async () => {
|
||||||
if (item?.file?.data?.content || item?.type === 'file' || item?.content || modal) {
|
if (item?.file?.data?.content || item?.type === 'file' || item?.content || modal) {
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="pl-1.5">
|
<div class="shrink-0 text-gray-500 dark:text-gray-400">
|
||||||
{#if !loading}
|
{#if !loading}
|
||||||
<Tooltip
|
<Tooltip
|
||||||
content={type === 'collection'
|
content={type === 'collection'
|
||||||
@@ -117,19 +117,19 @@
|
|||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
{#if type === 'collection'}
|
{#if type === 'collection'}
|
||||||
<Database />
|
<Database className="size-3.5" />
|
||||||
{:else if type === 'note'}
|
{:else if type === 'note'}
|
||||||
<PageEdit />
|
<PageEdit className="size-3.5" />
|
||||||
{:else if type === 'chat'}
|
{:else if type === 'chat'}
|
||||||
<ChatBubble />
|
<ChatBubble className="size-3.5" />
|
||||||
{:else if type === 'folder'}
|
{:else if type === 'folder'}
|
||||||
<Folder />
|
<Folder className="size-3.5" />
|
||||||
{:else}
|
{:else}
|
||||||
<DocumentPage />
|
<DocumentPage className="size-3.5" />
|
||||||
{/if}
|
{/if}
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
{:else}
|
{:else}
|
||||||
<Spinner />
|
<Spinner className="size-3.5" />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -162,14 +162,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<Tooltip content={decodeString(name)} className="flex flex-col w-full" placement="top-start">
|
<Tooltip
|
||||||
<div class="flex flex-col justify-center -space-y-0.5 px-1 w-full">
|
content={decodeString(name)}
|
||||||
<div class=" dark:text-gray-100 text-sm flex justify-between items-center">
|
className="flex min-w-0 flex-1 overflow-hidden"
|
||||||
<div class="font-normal line-clamp-1 flex-1 pr-1">{decodeString(name)}</div>
|
placement="top-start"
|
||||||
|
>
|
||||||
|
<div class="flex min-w-0 flex-1 items-center overflow-hidden">
|
||||||
|
<div class="flex min-w-0 flex-1 items-center justify-between dark:text-gray-100">
|
||||||
|
<div class="min-w-0 flex-1 truncate pr-1 font-normal">{decodeString(name)}</div>
|
||||||
{#if size}
|
{#if size}
|
||||||
<div class="text-gray-500 text-xs capitalize shrink-0">{formatFileSize(size)}</div>
|
<div class="max-w-[35%] shrink-0 truncate text-[0.6875rem] capitalize text-gray-500">
|
||||||
|
{formatFileSize(size)}
|
||||||
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="text-gray-500 text-xs capitalize shrink-0">{type}</div>
|
<div class="max-w-[35%] shrink-0 truncate text-[0.6875rem] capitalize text-gray-500">
|
||||||
|
{type}
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user