mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-23 05:53:09 +03:00
Fix preview attachment (#584)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
b926118e84
commit
cee5bbf9b7
@ -21,8 +21,12 @@
|
|||||||
import ExpandDown from './icons/ExpandDown.svelte'
|
import ExpandDown from './icons/ExpandDown.svelte'
|
||||||
|
|
||||||
import { getFileUrl } from '../utils'
|
import { getFileUrl } from '../utils'
|
||||||
|
import { createEventDispatcher } from 'svelte'
|
||||||
|
|
||||||
export let file: string
|
export let file: string
|
||||||
|
export let name: string
|
||||||
|
|
||||||
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -35,12 +39,12 @@
|
|||||||
<div class="flex-row-center flex-grow">
|
<div class="flex-row-center flex-grow">
|
||||||
<Avatar size={'medium'} />
|
<Avatar size={'medium'} />
|
||||||
<div class="flex-col user">
|
<div class="flex-col user">
|
||||||
<div class="overflow-label name">Grace Osaka</div>
|
<div class="overflow-label name">{name}</div>
|
||||||
<div class="overflow-label description">Candidate</div>
|
<!-- <div class="overflow-label description">Candidate</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-row-center">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -40,13 +40,13 @@
|
|||||||
|
|
||||||
<div class="flex-row-center">
|
<div class="flex-row-center">
|
||||||
{#if openEmbedded(value.type)}
|
{#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}
|
{:else}
|
||||||
<a class="no-line" href={getFileUrl(value.file)} download={value.name}><div class="flex-center icon">{iconLabel(value.name)}</div></a>
|
<a class="no-line" href={getFileUrl(value.file)} download={value.name}><div class="flex-center icon">{iconLabel(value.name)}</div></a>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="flex-col info">
|
<div class="flex-col info">
|
||||||
{#if openEmbedded(value.type)}
|
{#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}
|
{:else}
|
||||||
<div class="name"><a href={getFileUrl(value.file)} download={value.name}>{trimFilename(value.name)}</a></div>
|
<div class="name"><a href={getFileUrl(value.file)} download={value.name}>{trimFilename(value.name)}</a></div>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -162,7 +162,7 @@
|
|||||||
on:dragleave={ () => { dragover = false } }
|
on:dragleave={ () => { dragover = false } }
|
||||||
on:drop|preventDefault|stopPropagation={drop}>
|
on:drop|preventDefault|stopPropagation={drop}>
|
||||||
{#if resume.uuid}
|
{#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}
|
{:else}
|
||||||
{#if loading}
|
{#if loading}
|
||||||
<Link label={'Uploading...'} href={'#'} icon={Spinner} disabled />
|
<Link label={'Uploading...'} href={'#'} icon={Spinner} disabled />
|
||||||
|
Loading…
Reference in New Issue
Block a user