Attachments cleanup

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov 2021-10-24 12:43:42 +02:00
parent c41a3222bd
commit 89844039bc
No known key found for this signature in database
GPG Key ID: C8787EFEB4B64AF0
5 changed files with 945 additions and 938 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -57,6 +57,7 @@ export class TBacklink extends TComment implements Backlink {
} }
@Model(chunter.class.Attachment, core.class.Doc, DOMAIN_ATTACHMENT) @Model(chunter.class.Attachment, core.class.Doc, DOMAIN_ATTACHMENT)
@UX('File' as IntlString)
export class TAttachment extends TDoc implements Attachment { export class TAttachment extends TDoc implements Attachment {
attachedTo!: Ref<Doc> attachedTo!: Ref<Doc>
attachedToClass!: Ref<Class<Doc>> attachedToClass!: Ref<Class<Doc>>

View File

@ -38,9 +38,9 @@
<div class="flex-center icon">{iconLabel(value.name)}</div> <div class="flex-center icon">{iconLabel(value.name)}</div>
<div class="flex-col"> <div class="flex-col">
{#if value.type === 'application/pdf'} {#if value.type === 'application/pdf'}
<div class="caption-color" on:click={()=> { closeTooltip(); showPopup(PDFViewer, { file: value.file }, 'right') }}>{trimFilename(value.name)}</div> <div class="caption-color name" on:click={()=> { closeTooltip(); showPopup(PDFViewer, { file: value.file }, 'right') }}>{trimFilename(value.name)}</div>
{:else} {:else}
<div class="caption-color"><a href={getFileUrl(value.file)} download={value.name}>{trimFilename(value.name)}</a></div> <div class="caption-color name"><a href={getFileUrl(value.file)} download={value.name}>{trimFilename(value.name)}</a></div>
{/if} {/if}
<div class="type">{filesize(value.size)}</div> <div class="type">{filesize(value.size)}</div>
</div> </div>
@ -59,6 +59,9 @@
border: 1px solid rgba(0, 0, 0, .1); border: 1px solid rgba(0, 0, 0, .1);
border-radius: .5rem; border-radius: .5rem;
} }
.name {
white-space: nowrap;
}
.type { .type {
font-size: .75rem; font-size: .75rem;
color: var(--theme-content-dark-color); color: var(--theme-content-dark-color);

File diff suppressed because it is too large Load Diff