mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
Design store: fix button sizing/theming, move back button to header
The store's install button had accidentally inherited the icon-row's big-icon sizing (shared class) and rendered huge. Gave it and the publish/new-design/import/store buttons proper themed gradient styling instead of the browser default, and moved "back" to a top-left header button instead of stacking it under publish. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
1 parent
a98cf59111
commit
587c0048e3
2 files changed
+80
-19
No files matched your search
+70
-9
@@ -3419,22 +3419,83 @@
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.ts-design-theme-card-actions button {
|
||||
flex: 1;
|
||||
min-height: 2.4rem;
|
||||
padding: 0.5rem 0;
|
||||
border: 1px solid var(--border-soft);
|
||||
.ts-design-theme-card-actions button,
|
||||
.ts-design-store-card-actions button,
|
||||
.ts-design-store-publish-submit,
|
||||
.ts-design-custom-actions button {
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
background: var(--input-bg);
|
||||
background: linear-gradient(to bottom, var(--button-bg-1), var(--button-bg-2));
|
||||
color: var(--text);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ts-design-theme-card-actions button:hover:not(:disabled),
|
||||
.ts-design-store-card-actions button:hover:not(:disabled),
|
||||
.ts-design-store-publish-submit:hover:not(:disabled),
|
||||
.ts-design-custom-actions button:hover:not(:disabled) {
|
||||
background: linear-gradient(to bottom, var(--button-bg-hover-1), var(--button-bg-hover-2));
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.ts-design-theme-card-actions button:disabled,
|
||||
.ts-design-store-card-actions button:disabled,
|
||||
.ts-design-store-publish-submit:disabled,
|
||||
.ts-design-custom-actions button:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* Icon row (edit/duplicate/export/delete) - big, evenly-spaced tap targets,
|
||||
there's plenty of room in a custom-theme card for them. */
|
||||
.ts-design-theme-card-actions button {
|
||||
flex: 1;
|
||||
min-height: 2.6rem;
|
||||
padding: 0.6rem 0;
|
||||
font-size: 20px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.ts-design-theme-card-actions button:hover {
|
||||
color: var(--text);
|
||||
border-color: var(--accent);
|
||||
.ts-design-store-card-actions {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.ts-design-store-card-actions button {
|
||||
width: 100%;
|
||||
padding: 0.5rem;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.ts-design-store-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.ts-design-store-header h3 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.ts-design-store-back {
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--accent);
|
||||
cursor: pointer;
|
||||
padding: 0.2rem 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.ts-design-store-publish-submit {
|
||||
display: block;
|
||||
margin-top: 0.75rem;
|
||||
padding: 0.5rem 1rem;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.ts-design-custom-actions button {
|
||||
padding: 0.5rem 1rem;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.ts-design-custom-actions {
|
||||
|
||||
+10
-10
@@ -5559,7 +5559,12 @@ function DesignStorePanel({
|
||||
|
||||
return (
|
||||
<>
|
||||
<h3>{t("design.store.title")}</h3>
|
||||
<div className="ts-design-store-header">
|
||||
<button className="ts-design-store-back" onClick={onClose}>
|
||||
← {t("design.store.back")}
|
||||
</button>
|
||||
<h3>{t("design.store.title")}</h3>
|
||||
</div>
|
||||
{unavailable ? (
|
||||
<p className="ts-options-subtitle">{t("design.store.unavailable")}</p>
|
||||
) : themes === null ? (
|
||||
@@ -5604,7 +5609,7 @@ function DesignStorePanel({
|
||||
: t("design.store.rating.none")}
|
||||
</span>
|
||||
</div>
|
||||
<div className="ts-design-theme-card-actions">
|
||||
<div className="ts-design-store-card-actions">
|
||||
<button onClick={() => handleInstall(theme.id)} disabled={installedIds.has(theme.id)}>
|
||||
{installedIds.has(theme.id) ? t("design.store.installed") : t("design.store.install")}
|
||||
</button>
|
||||
@@ -5664,20 +5669,15 @@ function DesignStorePanel({
|
||||
placeholder={t("design.store.publish.adminTokenPlaceholder")}
|
||||
/>
|
||||
</label>
|
||||
<div className="ts-dialog-buttons-right">
|
||||
<button onClick={handlePublish} disabled={!publishTarget || publishing}>
|
||||
{t("design.store.publish.submit")}
|
||||
</button>
|
||||
</div>
|
||||
<button className="ts-design-store-publish-submit" onClick={handlePublish} disabled={!publishTarget || publishing}>
|
||||
{t("design.store.publish.submit")}
|
||||
</button>
|
||||
{publishResult === "ok" && <p className="ts-options-subtitle">{t("design.store.publish.success")}</p>}
|
||||
{publishResult === "error" && <p className="ts-options-subtitle">{t("design.store.publish.error")}</p>}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
<div className="ts-dialog-buttons-right">
|
||||
<button onClick={onClose}>{t("design.store.back")}</button>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user