feat: move upload button

This commit is contained in:
2026-02-04 09:04:31 +05:00
parent 3a55689f23
commit 3792c4d546
3 changed files with 17 additions and 15 deletions
+7
View File
@@ -1,5 +1,6 @@
<script lang="ts">
import { panelStore } from "../stores/panelStore";
import { uiStore, setCurrentStep } from "../stores/uiStore";
import type { TextItem } from "../lib/types/panel";
import { Stage, Layer, Image, Text } from "svelte-konva";
import { Button } from "../lib/components/ui";
@@ -10,6 +11,10 @@
onDownload?: () => void;
} = $props();
function handleUploadNewImage() {
setCurrentStep("upload");
}
let backgroundImage: HTMLImageElement | undefined = $state(undefined);
$effect(() => {
@@ -57,6 +62,7 @@
{#if $panelStore}
<div class="preview-header">
<Button variant="primary" onclick={handleDownload}>Скачать панель</Button>
<Button variant="secondary" onclick={handleUploadNewImage}>Загрузить</Button>
</div>
<div class="preview-sections">
<!-- Превью чистой картинки -->
@@ -119,6 +125,7 @@
display: flex;
justify-content: center;
align-items: center;
gap: 0.5rem;
padding: 1rem;
margin-bottom: 1rem;
}