mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 01:42:50 +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
+4
-3
@@ -3415,7 +3415,7 @@
|
|||||||
|
|
||||||
.ts-design-theme-card-actions {
|
.ts-design-theme-card-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 0.3rem;
|
gap: 0.4rem;
|
||||||
margin-top: 0.5rem;
|
margin-top: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3450,10 +3450,11 @@
|
|||||||
there's plenty of room in a custom-theme card for them. */
|
there's plenty of room in a custom-theme card for them. */
|
||||||
.ts-design-theme-card-actions button {
|
.ts-design-theme-card-actions button {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
min-height: 2.6rem;
|
min-height: 2.6rem;
|
||||||
padding: 0.6rem 0;
|
padding: 0.6rem 0;
|
||||||
font-size: 20px;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ts-design-store-card-actions {
|
.ts-design-store-card-actions {
|
||||||
|
|||||||
+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 { useRegisterSW } from "virtual:pwa-register/react";
|
||||||
import "./App.css";
|
import "./App.css";
|
||||||
|
|
||||||
@@ -5214,6 +5214,27 @@ function AnwendungPanel() {
|
|||||||
|
|
||||||
type CustomThemeDraft = { id: string | null; name: string; baseTheme: DesignTheme; css: string };
|
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({
|
function DesignPanel({
|
||||||
designSelection,
|
designSelection,
|
||||||
onSelectionChange,
|
onSelectionChange,
|
||||||
@@ -5377,7 +5398,9 @@ function DesignPanel({
|
|||||||
onClick={() => setEditing({ id: theme.id, name: theme.name, baseTheme: theme.baseTheme, css: theme.css })}
|
onClick={() => setEditing({ id: theme.id, name: theme.name, baseTheme: theme.baseTheme, css: theme.css })}
|
||||||
title={t("design.custom.edit")}
|
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>
|
||||||
<button
|
<button
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
@@ -5385,10 +5408,17 @@ function DesignPanel({
|
|||||||
}
|
}
|
||||||
title={t("design.custom.duplicate")}
|
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>
|
||||||
<button onClick={() => handleExport(theme)} title={t("design.custom.export")}>
|
<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>
|
||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -5396,7 +5426,12 @@ function DesignPanel({
|
|||||||
}}
|
}}
|
||||||
title={t("design.custom.delete")}
|
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>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user