mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-24 12:35:31 +00:00
feat: remove compact
This commit is contained in:
parent
4be811d3e7
commit
8147eb1f4d
2 changed files with 22 additions and 29 deletions
|
|
@ -4,7 +4,6 @@
|
|||
import DashboardUploadCard from './DashboardUploadCard.svelte';
|
||||
import type { ApiError } from '$lib/@api';
|
||||
|
||||
export let compact: boolean = false;
|
||||
let error: string | null = null;
|
||||
|
||||
const onFileDrop = async (detail: any) => {
|
||||
|
|
@ -27,7 +26,6 @@
|
|||
|
||||
<DashboardUploadCard
|
||||
{error}
|
||||
{compact}
|
||||
on:filedrop={(e) => onFileDrop(e.detail)}
|
||||
on:delete={onDelete}
|
||||
title="Motivační dopis"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
export let filesize: number;
|
||||
export let fileType: number;
|
||||
export let placeholder: string = '';
|
||||
export let compact: boolean = false;
|
||||
|
||||
let fileDropped: boolean = false;
|
||||
let progress: number = 1;
|
||||
|
|
@ -102,11 +101,9 @@
|
|||
<div class="card uploadCard relative">
|
||||
<div class="header">
|
||||
<h3 class="mb-4 sm:mb-0">{title}</h3>
|
||||
{#if !compact}
|
||||
<div class="mb-4 mt-1 sm:mb-0 sm:mt-0">
|
||||
<FileType {filetype} filesize={filesize + ' MB'} />
|
||||
</div>
|
||||
{/if}
|
||||
<div class="mb-4 mt-1 sm:mb-0 sm:mt-0">
|
||||
<FileType {filetype} filesize={filesize + ' MB'} />
|
||||
</div>
|
||||
<div class="absolute right-0 top-4 flex items-center px-7">
|
||||
{#if status === 'uploaded'}
|
||||
<button
|
||||
|
|
@ -117,28 +114,26 @@
|
|||
<StatusNotificationDot {status} />
|
||||
</div>
|
||||
</div>
|
||||
{#if fileDropped && error === null}
|
||||
{#if fileDropped && error === null}
|
||||
<div class="body uploaded flex content-around items-center justify-between">
|
||||
{#if !compact}
|
||||
<div class="w-24">
|
||||
<img
|
||||
class="w-full object-scale-down"
|
||||
src={filetype == 'PDF' ? documentIcon : archiveIcon}
|
||||
alt="Icon"
|
||||
/>
|
||||
</div>
|
||||
<svg class="h-25 hidden xl:block" viewBox="0 0 2 40" xmlns="http://www.w3.org/2000/svg"
|
||||
><line
|
||||
x1="0"
|
||||
y="0"
|
||||
x2="0"
|
||||
y2="40"
|
||||
stroke="#406280ff"
|
||||
stroke-width="2"
|
||||
stroke-dasharray="3"
|
||||
/></svg
|
||||
>
|
||||
{/if}
|
||||
<div class="w-24">
|
||||
<img
|
||||
class="w-full object-scale-down"
|
||||
src={filetype == 'PDF' ? documentIcon : archiveIcon}
|
||||
alt="Icon"
|
||||
/>
|
||||
</div>
|
||||
<svg class="h-25 hidden xl:block" viewBox="0 0 2 40" xmlns="http://www.w3.org/2000/svg"
|
||||
><line
|
||||
x1="0"
|
||||
y="0"
|
||||
x2="0"
|
||||
y2="40"
|
||||
stroke="#406280ff"
|
||||
stroke-width="2"
|
||||
stroke-dasharray="3"
|
||||
/></svg
|
||||
>
|
||||
<div class="hidden items-center xl:block">
|
||||
{#if bytesTotal === 0 || Math.round(progress * 100) === 100}
|
||||
<h2 class="text-xl font-bold">{status === 'submitted' ? 'Odesláno' : 'Nahráno'}</h2>
|
||||
|
|
|
|||
Loading…
Reference in a new issue