Fix preview attachment (#584)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2021-12-08 16:23:12 +07:00 committed by GitHub
parent b926118e84
commit cee5bbf9b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View File

@ -21,8 +21,12 @@
import ExpandDown from './icons/ExpandDown.svelte'
import { getFileUrl } from '../utils'
import { createEventDispatcher } from 'svelte'
export let file: string
export let name: string
const dispatch = createEventDispatcher()
</script>
@ -35,12 +39,12 @@
<div class="flex-row-center flex-grow">
<Avatar size={'medium'} />
<div class="flex-col user">
<div class="overflow-label name">Grace Osaka</div>
<div class="overflow-label description">Candidate</div>
<div class="overflow-label name">{name}</div>
<!-- <div class="overflow-label description">Candidate</div> -->
</div>
</div>
<div class="flex-row-center">
<div class="tool"><IconClose size={'small'} /></div>
<div class="tool" on:click={() => dispatch('close')}><IconClose size={'small'} /></div>
</div>
</div>

View File

@ -40,13 +40,13 @@
<div class="flex-row-center">
{#if openEmbedded(value.type)}
<div class="flex-center icon" on:click={()=> { closeTooltip(); showPopup(PDFViewer, { file: value.file }, 'right') }}>{iconLabel(value.name)}</div>
<div class="flex-center icon" on:click={()=> { closeTooltip(); showPopup(PDFViewer, { file: value.file, name: value.name }, 'right') }}>{iconLabel(value.name)}</div>
{:else}
<a class="no-line" href={getFileUrl(value.file)} download={value.name}><div class="flex-center icon">{iconLabel(value.name)}</div></a>
{/if}
<div class="flex-col info">
{#if openEmbedded(value.type)}
<div class="name" on:click={()=> { closeTooltip(); showPopup(PDFViewer, { file: value.file }, 'right') }}>{trimFilename(value.name)}</div>
<div class="name" on:click={()=> { closeTooltip(); showPopup(PDFViewer, { file: value.file, name: value.name }, 'right') }}>{trimFilename(value.name)}</div>
{:else}
<div class="name"><a href={getFileUrl(value.file)} download={value.name}>{trimFilename(value.name)}</a></div>
{/if}

View File

@ -162,7 +162,7 @@
on:dragleave={ () => { dragover = false } }
on:drop|preventDefault|stopPropagation={drop}>
{#if resume.uuid}
<Link label={resume.name} href={'#'} icon={FileIcon} maxLenght={16} on:click={ () => { showPopup(PDFViewer, { file: resume.uuid }, 'right') } }/>
<Link label={resume.name} href={'#'} icon={FileIcon} maxLenght={16} on:click={ () => { showPopup(PDFViewer, { file: resume.uuid, name: resume.name }, 'right') } }/>
{:else}
{#if loading}
<Link label={'Uploading...'} href={'#'} icon={Spinner} disabled />