mirror of
https://github.com/danbulant/Portfolio
synced 2026-07-09 04:51:09 +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 DashboardUploadCard from './DashboardUploadCard.svelte';
|
||||||
import type { ApiError } from '$lib/@api';
|
import type { ApiError } from '$lib/@api';
|
||||||
|
|
||||||
export let compact: boolean = false;
|
|
||||||
let error: string | null = null;
|
let error: string | null = null;
|
||||||
|
|
||||||
const onFileDrop = async (detail: any) => {
|
const onFileDrop = async (detail: any) => {
|
||||||
|
|
@ -27,7 +26,6 @@
|
||||||
|
|
||||||
<DashboardUploadCard
|
<DashboardUploadCard
|
||||||
{error}
|
{error}
|
||||||
{compact}
|
|
||||||
on:filedrop={(e) => onFileDrop(e.detail)}
|
on:filedrop={(e) => onFileDrop(e.detail)}
|
||||||
on:delete={onDelete}
|
on:delete={onDelete}
|
||||||
title="Motivační dopis"
|
title="Motivační dopis"
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
export let filesize: number;
|
export let filesize: number;
|
||||||
export let fileType: number;
|
export let fileType: number;
|
||||||
export let placeholder: string = '';
|
export let placeholder: string = '';
|
||||||
export let compact: boolean = false;
|
|
||||||
|
|
||||||
let fileDropped: boolean = false;
|
let fileDropped: boolean = false;
|
||||||
let progress: number = 1;
|
let progress: number = 1;
|
||||||
|
|
@ -102,11 +101,9 @@
|
||||||
<div class="card uploadCard relative">
|
<div class="card uploadCard relative">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h3 class="mb-4 sm:mb-0">{title}</h3>
|
<h3 class="mb-4 sm:mb-0">{title}</h3>
|
||||||
{#if !compact}
|
|
||||||
<div class="mb-4 mt-1 sm:mb-0 sm:mt-0">
|
<div class="mb-4 mt-1 sm:mb-0 sm:mt-0">
|
||||||
<FileType {filetype} filesize={filesize + ' MB'} />
|
<FileType {filetype} filesize={filesize + ' MB'} />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
|
||||||
<div class="absolute right-0 top-4 flex items-center px-7">
|
<div class="absolute right-0 top-4 flex items-center px-7">
|
||||||
{#if status === 'uploaded'}
|
{#if status === 'uploaded'}
|
||||||
<button
|
<button
|
||||||
|
|
@ -119,7 +116,6 @@
|
||||||
</div>
|
</div>
|
||||||
{#if fileDropped && error === null}
|
{#if fileDropped && error === null}
|
||||||
<div class="body uploaded flex content-around items-center justify-between">
|
<div class="body uploaded flex content-around items-center justify-between">
|
||||||
{#if !compact}
|
|
||||||
<div class="w-24">
|
<div class="w-24">
|
||||||
<img
|
<img
|
||||||
class="w-full object-scale-down"
|
class="w-full object-scale-down"
|
||||||
|
|
@ -138,7 +134,6 @@
|
||||||
stroke-dasharray="3"
|
stroke-dasharray="3"
|
||||||
/></svg
|
/></svg
|
||||||
>
|
>
|
||||||
{/if}
|
|
||||||
<div class="hidden items-center xl:block">
|
<div class="hidden items-center xl:block">
|
||||||
{#if bytesTotal === 0 || Math.round(progress * 100) === 100}
|
{#if bytesTotal === 0 || Math.round(progress * 100) === 100}
|
||||||
<h2 class="text-xl font-bold">{status === 'submitted' ? 'Odesláno' : 'Nahráno'}</h2>
|
<h2 class="text-xl font-bold">{status === 'submitted' ? 'Odesláno' : 'Nahráno'}</h2>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue