mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
Design store: replace mismatched icon glyphs with consistent SVG icons
The edit/duplicate/export/delete row mixed three text glyphs with a color emoji (🗑), which render at different sizes and weights across platforms - that was the actual cause of the row looking uneven, not just sizing. Swapped all four for matching stroke-style SVG icons. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
1 parent
587c0048e3
commit
f29a1da7d4
2 files changed
+44
-8
No files matched your search
+40
-5
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useMemo, useRef, useState } from "react";
|
||||
import { useEffect, useMemo, useRef, useState, type ReactNode } from "react";
|
||||
import { useRegisterSW } from "virtual:pwa-register/react";
|
||||
import "./App.css";
|
||||
|
||||
@@ -5214,6 +5214,27 @@ function AnwendungPanel() {
|
||||
|
||||
type CustomThemeDraft = { id: string | null; name: string; baseTheme: DesignTheme; css: string };
|
||||
|
||||
/** Shared stroke-icon wrapper for the custom-theme-card action row, so all
|
||||
* four icons (edit/duplicate/export/delete) render at the same size and
|
||||
* color - mixing text glyphs with an emoji (as before) made them look
|
||||
* inconsistent across fonts/platforms. */
|
||||
function ActionIcon({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<svg
|
||||
viewBox="0 0 24 24"
|
||||
width="18"
|
||||
height="18"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
>
|
||||
{children}
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
function DesignPanel({
|
||||
designSelection,
|
||||
onSelectionChange,
|
||||
@@ -5377,7 +5398,9 @@ function DesignPanel({
|
||||
onClick={() => setEditing({ id: theme.id, name: theme.name, baseTheme: theme.baseTheme, css: theme.css })}
|
||||
title={t("design.custom.edit")}
|
||||
>
|
||||
✎
|
||||
<ActionIcon>
|
||||
<path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" />
|
||||
</ActionIcon>
|
||||
</button>
|
||||
<button
|
||||
onClick={() =>
|
||||
@@ -5385,10 +5408,17 @@ function DesignPanel({
|
||||
}
|
||||
title={t("design.custom.duplicate")}
|
||||
>
|
||||
⧉
|
||||
<ActionIcon>
|
||||
<rect x="9" y="9" width="13" height="13" rx="2" ry="2" />
|
||||
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
|
||||
</ActionIcon>
|
||||
</button>
|
||||
<button onClick={() => handleExport(theme)} title={t("design.custom.export")}>
|
||||
⭳
|
||||
<ActionIcon>
|
||||
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
|
||||
<polyline points="7 10 12 15 17 10" />
|
||||
<line x1="12" y1="15" x2="12" y2="3" />
|
||||
</ActionIcon>
|
||||
</button>
|
||||
<button
|
||||
onClick={() => {
|
||||
@@ -5396,7 +5426,12 @@ function DesignPanel({
|
||||
}}
|
||||
title={t("design.custom.delete")}
|
||||
>
|
||||
🗑
|
||||
<ActionIcon>
|
||||
<polyline points="3 6 5 6 21 6" />
|
||||
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
|
||||
<line x1="10" y1="11" x2="10" y2="17" />
|
||||
<line x1="14" y1="11" x2="14" y2="17" />
|
||||
</ActionIcon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user