fix: resolve errors and css warnings

This commit is contained in:
2026-02-04 16:50:22 +05:00
parent 62254acdb9
commit 64dfc2c441
5 changed files with 15 additions and 80 deletions
+8
View File
@@ -21,6 +21,7 @@
"@sveltejs/adapter-static": "^3.0.10", "@sveltejs/adapter-static": "^3.0.10",
"@sveltejs/kit": "^2.50.1", "@sveltejs/kit": "^2.50.1",
"@sveltejs/vite-plugin-svelte": "^6.2.4", "@sveltejs/vite-plugin-svelte": "^6.2.4",
"@types/file-saver": "^2.0.7",
"@types/node": "^25.1.0", "@types/node": "^25.1.0",
"svelte": "^5.48.2", "svelte": "^5.48.2",
"svelte-check": "^4.3.5", "svelte-check": "^4.3.5",
@@ -1129,6 +1130,13 @@
"integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/file-saver": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/@types/file-saver/-/file-saver-2.0.7.tgz",
"integrity": "sha512-dNKVfHd/jk0SkR/exKGj2ggkB45MAkzvWCaqLUUgkyjITkGNzH8H+yUwr+BLJUBjZOe9w8X3wgmXhZDRg1ED6A==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "25.1.0", "version": "25.1.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.1.0.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-25.1.0.tgz",
+1
View File
@@ -16,6 +16,7 @@
"@sveltejs/adapter-static": "^3.0.10", "@sveltejs/adapter-static": "^3.0.10",
"@sveltejs/kit": "^2.50.1", "@sveltejs/kit": "^2.50.1",
"@sveltejs/vite-plugin-svelte": "^6.2.4", "@sveltejs/vite-plugin-svelte": "^6.2.4",
"@types/file-saver": "^2.0.7",
"@types/node": "^25.1.0", "@types/node": "^25.1.0",
"svelte": "^5.48.2", "svelte": "^5.48.2",
"svelte-check": "^4.3.5", "svelte-check": "^4.3.5",
-46
View File
@@ -116,32 +116,6 @@
font-size: 1.1rem; font-size: 1.1rem;
} }
.panel-actions {
display: flex;
gap: 0.5rem;
align-items: center;
}
.edit-controls {
display: flex;
gap: 0.5rem;
align-items: center;
flex: 1;
}
.edit-input {
flex: 1;
padding: 0.5rem;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 1rem;
}
.edit-input:focus {
outline: none;
border-color: #007bff;
}
.preview-sections { .preview-sections {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -154,13 +128,6 @@
gap: 0.5rem; gap: 0.5rem;
} }
.preview-section h3 {
margin: 0;
color: #333;
font-size: 1rem;
font-weight: 500;
}
.canvas-container { .canvas-container {
display: flex; display: flex;
justify-content: center; justify-content: center;
@@ -168,17 +135,4 @@
background: #f5f5f5; background: #f5f5f5;
border-radius: 8px; border-radius: 8px;
} }
.empty-state {
text-align: center;
padding: 1.5rem;
color: #666;
background: #f9f9f9;
border-radius: 6px;
}
.empty-state p {
margin: 0;
font-size: 0.95rem;
}
</style> </style>
-32
View File
@@ -378,12 +378,6 @@
font-size: 0.9rem; font-size: 0.9rem;
} }
.text-list {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.text-item { .text-item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@@ -400,19 +394,6 @@
background: #f0f8ff; background: #f0f8ff;
} }
.text-content {
font-size: 0.95rem;
color: #333;
flex: 1;
}
.text-controls {
padding: 1rem;
display: flex;
flex-direction: column;
gap: 1rem;
}
.control-group { .control-group {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -447,17 +428,4 @@
font-weight: 500; font-weight: 500;
color: #333; color: #333;
} }
.empty-state {
text-align: center;
padding: 1.5rem;
color: #666;
background: #f9f9f9;
border-radius: 6px;
}
.empty-state p {
margin: 0;
font-size: 0.95rem;
}
</style> </style>
+6 -2
View File
@@ -1,4 +1,3 @@
import pkg from "file-saver"; import pkg from "file-saver";
const { saveAs } = pkg; const { saveAs } = pkg;
import type { Panel } from "../types/panel"; import type { Panel } from "../types/panel";
@@ -44,7 +43,12 @@ export class ExportService {
ctx.fillStyle = textItem.color; ctx.fillStyle = textItem.color;
ctx.textAlign = "center"; ctx.textAlign = "center";
ctx.textBaseline = "middle"; ctx.textBaseline = "middle";
ctx.fillText(textItem.text, textItem.x, textItem.y);
// Calculate position based on existing system
const x = 160; // Center of 320px panel
const y = panel.height / 2 + textItem.verticalOffset;
ctx.fillText(textItem.text, x, y);
}); });
// Конвертируем в blob и сохраняем // Конвертируем в blob и сохраняем