refac
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
|
||||
import DocumentPage from '../icons/DocumentPage.svelte';
|
||||
import Database from '../icons/Database.svelte';
|
||||
import PageEdit from '../icons/PageEdit.svelte';
|
||||
import ChatBubble from '../icons/ChatBubble.svelte';
|
||||
let showModal = false;
|
||||
|
||||
const decodeString = (str: string) => {
|
||||
@@ -96,11 +98,23 @@
|
||||
<div class="pl-1">
|
||||
{#if !loading}
|
||||
<Tooltip
|
||||
content={type === 'collection' ? $i18n.t('Collection') : $i18n.t('Document')}
|
||||
content={type === 'collection'
|
||||
? $i18n.t('Collection')
|
||||
: type === 'note'
|
||||
? $i18n.t('Note')
|
||||
: type === 'chat'
|
||||
? $i18n.t('Chat')
|
||||
: type === 'file'
|
||||
? $i18n.t('File')
|
||||
: $i18n.t('Document')}
|
||||
placement="top"
|
||||
>
|
||||
{#if type === 'collection'}
|
||||
<Database />
|
||||
{:else if type === 'note'}
|
||||
<PageEdit />
|
||||
{:else if type === 'chat'}
|
||||
<ChatBubble />
|
||||
{:else}
|
||||
<DocumentPage />
|
||||
{/if}
|
||||
@@ -124,6 +138,8 @@
|
||||
>
|
||||
{#if type === 'file'}
|
||||
{$i18n.t('File')}
|
||||
{:else if type === 'note'}
|
||||
{$i18n.t('Note')}
|
||||
{:else if type === 'doc'}
|
||||
{$i18n.t('Document')}
|
||||
{:else if type === 'collection'}
|
||||
|
||||
Reference in New Issue
Block a user