From debeada46849d4ae729b47c37d5990ea756bc46f Mon Sep 17 00:00:00 2001 From: TraceLumen Date: Sat, 5 Sep 2026 01:27:59 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=BA=D0=BB=D1=8E=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=9F=D0=B5=D1=87=D0=B0=D1=82=D1=8C=20=D0=BA=20=D0=B1=D1=8D?= =?UTF-8?q?=D0=BA=D0=B5=D0=BD=D0=B4=D1=83=20+=20=D0=B2=D1=80=D0=B5=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D0=BD=D1=8B=D0=B9=20=D0=BF=D1=80=D0=BE=D0=BA=D1=81?= =?UTF-8?q?=D0=B8=20=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20vite.config.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/PrintMenu.svelte | 635 ++++++++++++++++++++++----------------- vite.config.js | 9 + 2 files changed, 369 insertions(+), 275 deletions(-) diff --git a/src/lib/PrintMenu.svelte b/src/lib/PrintMenu.svelte index 6f83992..ec866b2 100644 --- a/src/lib/PrintMenu.svelte +++ b/src/lib/PrintMenu.svelte @@ -1,303 +1,372 @@ {#if !activeFile} @@ -306,7 +375,7 @@ function handlePagesClick(file) {

Печать

- +
{#if files.length === 0}
@@ -326,7 +395,7 @@ function handlePagesClick(file) {
- + {#if file.expanded}
- +
@@ -354,7 +423,7 @@ function handlePagesClick(file) { {/each}
- +
@@ -363,10 +432,19 @@ function handlePagesClick(file) { {/each}
- +
- + updateQuality(file, parseInt(e.target.value))} + class="quality-slider" + style="--fill: {qualityFillFor(file)}%" + />
{#each qualities as q}{q.label}{/each}
@@ -375,11 +453,10 @@ function handlePagesClick(file) { {/if} {/each} - {/if}
- + @@ -466,13 +551,13 @@ function handlePagesClick(file) { .add-file-btn { align-self: center; background: none; border: 1px dashed rgba(255, 255, 255, 0.18); color: #a9b0c0; font-size: 14px; font-weight: 600; padding: 12px 18px; border-radius: 14px; cursor: pointer; margin-top: 8px; } .actions { padding: 16px 20px 32px; display: flex; flex-direction: column; gap: 12px; } .file-count { color: #8b93a1; font-size: 13px; margin: 0; text-align: center; line-height: 1.4; } - .action-btn { width: 100%; padding: 16px 24px; border-radius: 16px; font-size: 16px; font-weight: 700; cursor: pointer; border: none; color: #fff; } + .action-btn { width: 100%; padding: 16px 24px; border-radius: 16px; font-size: 16px; font-weight: 700; cursor: pointer; border: none; color: #fff; transition: opacity 0.2s; } + .action-btn:disabled { opacity: 0.6; cursor: wait; } .action-btn.primary { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); box-shadow: 0 8px 24px -6px rgba(99, 102, 241, 0.5); } .action-btn.secondary { background: linear-gradient(135deg, #5b8cff 0%, #38c6ff 100%); box-shadow: 0 8px 24px -6px rgba(72, 150, 255, 0.4); } .price-summary { display: flex; justify-content: space-between; align-items: baseline; width: 100%; } .summary-itogo { font-size: 30px; font-weight: 700; color: #8b93a1; } .summary-price { font-size: 38px; font-weight: 800; color: #fff; } - .overlay-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 12, 18, 0.92); backdrop-filter: blur(12px); diff --git a/vite.config.js b/vite.config.js index 1341769..f65f1c4 100644 --- a/vite.config.js +++ b/vite.config.js @@ -24,4 +24,13 @@ export default defineConfig({ } }) ], + server: { + proxy: { + '/api': { + target: 'http://localhost:3000', + changeOrigin: true, + rewrite: (path) => path.replace(/^\/api/, '') + } + } + } })