mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-26 04:23:58 +03:00
Attachments cleanup
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
c41a3222bd
commit
89844039bc
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -57,6 +57,7 @@ export class TBacklink extends TComment implements Backlink {
|
||||
}
|
||||
|
||||
@Model(chunter.class.Attachment, core.class.Doc, DOMAIN_ATTACHMENT)
|
||||
@UX('File' as IntlString)
|
||||
export class TAttachment extends TDoc implements Attachment {
|
||||
attachedTo!: Ref<Doc>
|
||||
attachedToClass!: Ref<Class<Doc>>
|
||||
|
@ -38,9 +38,9 @@
|
||||
<div class="flex-center icon">{iconLabel(value.name)}</div>
|
||||
<div class="flex-col">
|
||||
{#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}
|
||||
<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}
|
||||
<div class="type">{filesize(value.size)}</div>
|
||||
</div>
|
||||
@ -59,6 +59,9 @@
|
||||
border: 1px solid rgba(0, 0, 0, .1);
|
||||
border-radius: .5rem;
|
||||
}
|
||||
.name {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.type {
|
||||
font-size: .75rem;
|
||||
color: var(--theme-content-dark-color);
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user