fix: remove old components
This commit is contained in:
@@ -1,69 +0,0 @@
|
||||
<script lang="ts">
|
||||
import ErrorMessage from "$components/feedback/ErrorMessage.svelte";
|
||||
import AppContent from "$components/layout/AppContent.svelte";
|
||||
|
||||
interface Props {
|
||||
errorMessage: string | undefined;
|
||||
uploadedImage: string | undefined;
|
||||
texts: Array<{ id: string; text: string }>;
|
||||
backgroundImage: string | undefined;
|
||||
panels: any[];
|
||||
onUploadNewImage: () => void;
|
||||
onImageUpload: (image: string) => void;
|
||||
onCropComplete: (croppedImage: string) => void;
|
||||
onCropCancel: () => void;
|
||||
onTextAdd: (text: string) => void;
|
||||
onTextUpdate: (id: string, newText: string) => void;
|
||||
onTextDelete: (id: string) => void;
|
||||
onDownload: (panel: any, konvaStage: any) => Promise<void>;
|
||||
onDownloadAll: () => Promise<void>;
|
||||
}
|
||||
|
||||
let {
|
||||
errorMessage,
|
||||
uploadedImage,
|
||||
texts,
|
||||
backgroundImage,
|
||||
panels,
|
||||
onUploadNewImage,
|
||||
onImageUpload,
|
||||
onCropComplete,
|
||||
onCropCancel,
|
||||
onTextAdd,
|
||||
onTextUpdate,
|
||||
onTextDelete,
|
||||
onDownload,
|
||||
onDownloadAll,
|
||||
}: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class="app-container">
|
||||
<ErrorMessage {errorMessage} />
|
||||
|
||||
<AppContent
|
||||
{uploadedImage}
|
||||
{texts}
|
||||
{backgroundImage}
|
||||
{panels}
|
||||
{onImageUpload}
|
||||
{onCropComplete}
|
||||
{onCropCancel}
|
||||
{onTextAdd}
|
||||
{onTextUpdate}
|
||||
{onTextDelete}
|
||||
{onUploadNewImage}
|
||||
{onDownload}
|
||||
{onDownloadAll}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.app-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
}
|
||||
</style>
|
||||
@@ -1,64 +0,0 @@
|
||||
<script lang="ts">
|
||||
import MainSection from "$components/layout/MainSection.svelte";
|
||||
import Sidebar from "$components/layout/Sidebar.svelte";
|
||||
|
||||
interface Props {
|
||||
uploadedImage: string | undefined;
|
||||
texts: Array<{ id: string; text: string }>;
|
||||
backgroundImage: string | undefined;
|
||||
panels: any[];
|
||||
onImageUpload: (image: string) => void;
|
||||
onCropComplete: (croppedImage: string) => void;
|
||||
onCropCancel: () => void;
|
||||
onTextAdd: (text: string) => void;
|
||||
onTextUpdate: (id: string, newText: string) => void;
|
||||
onTextDelete: (id: string) => void;
|
||||
onUploadNewImage: () => void;
|
||||
onDownload: (panel: any, konvaStage: any) => Promise<void>;
|
||||
onDownloadAll: () => Promise<void>;
|
||||
}
|
||||
|
||||
let {
|
||||
uploadedImage,
|
||||
texts,
|
||||
backgroundImage,
|
||||
panels,
|
||||
onImageUpload,
|
||||
onCropComplete,
|
||||
onCropCancel,
|
||||
onTextAdd,
|
||||
onTextUpdate,
|
||||
onTextDelete,
|
||||
onUploadNewImage,
|
||||
onDownload,
|
||||
onDownloadAll,
|
||||
}: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class="app-content">
|
||||
<MainSection
|
||||
{uploadedImage}
|
||||
{texts}
|
||||
{onImageUpload}
|
||||
{onCropComplete}
|
||||
{onCropCancel}
|
||||
{onTextAdd}
|
||||
{onTextUpdate}
|
||||
{onTextDelete}
|
||||
/>
|
||||
<Sidebar {backgroundImage} {panels} {onUploadNewImage} {onDownload} {onDownloadAll} />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.app-content {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.app-content {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,42 +0,0 @@
|
||||
<script lang="ts">
|
||||
import ImageManager from "$components/image/ImageManager.svelte";
|
||||
import TextSection from "$components/text/TextSection.svelte";
|
||||
import { uiStore } from "$stores/uiStore";
|
||||
|
||||
interface Props {
|
||||
uploadedImage: string | undefined;
|
||||
texts: Array<{ id: string; text: string }>;
|
||||
onImageUpload: (image: string) => void;
|
||||
onCropComplete: (croppedImage: string) => void;
|
||||
onCropCancel: () => void;
|
||||
onTextAdd: (text: string) => void;
|
||||
onTextUpdate: (id: string, newText: string) => void;
|
||||
onTextDelete: (id: string) => void;
|
||||
}
|
||||
|
||||
let {
|
||||
uploadedImage,
|
||||
texts,
|
||||
onImageUpload,
|
||||
onCropComplete,
|
||||
onCropCancel,
|
||||
onTextAdd,
|
||||
onTextUpdate,
|
||||
onTextDelete,
|
||||
}: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class="main-section">
|
||||
<ImageManager currentStep={$uiStore.currentStep} {uploadedImage} {onImageUpload} {onCropComplete} {onCropCancel} />
|
||||
{#if $uiStore.currentStep === "text"}
|
||||
<TextSection {texts} {onTextAdd} {onTextUpdate} {onTextDelete} />
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.main-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
</style>
|
||||
@@ -1,36 +0,0 @@
|
||||
<script lang="ts">
|
||||
import BackgroundPreview from "$components/image/BackgroundPreview.svelte";
|
||||
import PanelsList from "$components/panel/PanelsList.svelte";
|
||||
import { uiStore } from "$stores/uiStore";
|
||||
|
||||
interface Props {
|
||||
backgroundImage: string | undefined;
|
||||
panels: any[];
|
||||
onUploadNewImage: () => void;
|
||||
onDownload: (panel: any, konvaStage: any) => Promise<void>;
|
||||
onDownloadAll: () => Promise<void>;
|
||||
}
|
||||
|
||||
let { backgroundImage, panels, onUploadNewImage, onDownload, onDownloadAll }: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class="sidebar">
|
||||
{#if $uiStore.currentStep === "text"}
|
||||
<BackgroundPreview {backgroundImage} {onUploadNewImage} />
|
||||
<PanelsList {panels} {onDownload} {onDownloadAll} />
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.sidebar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.sidebar {
|
||||
order: -1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user