mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-24 12:35:31 +00:00
refactor: filesize
This commit is contained in:
parent
b7a63afba8
commit
09a0329d1d
4 changed files with 6 additions and 6 deletions
|
|
@ -17,7 +17,7 @@
|
|||
on:filedrop={e => onFileDrop(e.detail)}
|
||||
title="Motivační dopis"
|
||||
filetype="PDF"
|
||||
filesize="10 MB"
|
||||
filesize={10}
|
||||
fileType={1}
|
||||
>
|
||||
</DashboardUploadCard>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
export let title: string;
|
||||
export let filetype: 'PDF' | 'ZIP';
|
||||
export let filesize: string;
|
||||
export let filesize: number;
|
||||
export let fileType: number;
|
||||
|
||||
let fileDropped: boolean = false;
|
||||
|
|
@ -91,7 +91,7 @@
|
|||
<div class="flex flex-col sm:flex-row justify-between sm:items-center">
|
||||
<h3 class="mb-4 sm:mb-0">{title}</h3>
|
||||
<div class="mb-4 sm:mb-0 mt-1 sm:mt-0">
|
||||
<FileType {filetype} {filesize} />
|
||||
<FileType {filetype} filesize={filesize + " MB"} />
|
||||
</div>
|
||||
<div class="absolute px-7 right-0 top-4">
|
||||
<StatusNotificationDot {status} />
|
||||
|
|
@ -141,7 +141,7 @@
|
|||
<div class="flex-1 mt-6">
|
||||
<FileDrop
|
||||
multiple={false}
|
||||
maxSize={filetype == 'PDF' ? 10_000_000 : 100_000_000}
|
||||
maxSize={filesize * 1_000_000}
|
||||
accept={filetype == 'PDF' ? 'application/pdf' : 'application/zip'}
|
||||
on:filedrop={(e) => onFileDrop(e.detail.files)}
|
||||
on:filedragenter={dashAnimationStart}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@
|
|||
on:filedrop={e => onFileDrop(e.detail)}
|
||||
title="Portfolio"
|
||||
filetype="PDF"
|
||||
filesize="10 MB"
|
||||
filesize={10}
|
||||
fileType={2}>
|
||||
</DashboardUploadCard>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@
|
|||
on:filedrop={e => onFileDrop(e.detail)}
|
||||
title="Další data"
|
||||
filetype="ZIP"
|
||||
filesize="100 MB"
|
||||
filesize={100}
|
||||
fileType={3}>
|
||||
</DashboardUploadCard>
|
||||
|
|
|
|||
Loading…
Reference in a new issue