@iasiv5/dsh-skins 1.5.4 → 1.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +21 -9
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -871,8 +871,10 @@ ${darkSelector}{${dark.join(";")}}`;
|
|
|
871
871
|
"personalization.confirmTitle": "确认操作",
|
|
872
872
|
"personalization.confirm": "确认",
|
|
873
873
|
"personalization.cancel": "取消",
|
|
874
|
-
"personalization.resetJoin": "
|
|
875
|
-
"personalization.resetConfirm": "以下设置将恢复为出厂默认:\n{fields}\n此操作立即生效,确认继续吗?",
|
|
874
|
+
"personalization.resetJoin": "\n• ",
|
|
875
|
+
"personalization.resetConfirm": "以下设置将恢复为出厂默认:\n\n{fields}\n\n此操作立即生效,确认继续吗?",
|
|
876
|
+
"personalization.resetConfirmIntro": "以下设置将恢复为出厂默认:",
|
|
877
|
+
"personalization.resetConfirmOutro": "此操作立即生效,确认继续吗?",
|
|
876
878
|
"personalization.light": "浅色",
|
|
877
879
|
"personalization.dark": "深色",
|
|
878
880
|
"personalization.builtin": "内置画作",
|
|
@@ -942,8 +944,10 @@ ${darkSelector}{${dark.join(";")}}`;
|
|
|
942
944
|
"personalization.confirmTitle": "Confirm action",
|
|
943
945
|
"personalization.confirm": "Confirm",
|
|
944
946
|
"personalization.cancel": "Cancel",
|
|
945
|
-
"personalization.resetJoin": "
|
|
946
|
-
"personalization.resetConfirm": "These settings will be reset to factory defaults:\n{fields}\nThis takes effect immediately. Continue?",
|
|
947
|
+
"personalization.resetJoin": "\n• ",
|
|
948
|
+
"personalization.resetConfirm": "These settings will be reset to factory defaults:\n\n{fields}\n\nThis takes effect immediately. Continue?",
|
|
949
|
+
"personalization.resetConfirmIntro": "These settings will be reset to factory defaults:",
|
|
950
|
+
"personalization.resetConfirmOutro": "This takes effect immediately. Continue?",
|
|
947
951
|
"personalization.light": "Light",
|
|
948
952
|
"personalization.dark": "Dark",
|
|
949
953
|
"personalization.builtin": "Built-in artwork",
|
|
@@ -1112,6 +1116,10 @@ ${darkSelector}{${dark.join(";")}}`;
|
|
|
1112
1116
|
".dsh-skins-pz-dialog{box-sizing:border-box;width:min(480px,calc(100vw - 32px));max-height:calc(100vh - 32px);padding:20px;border:1px solid var(--dsw-alias-border-l2);border-radius:14px;background:var(--dsw-alias-bg-elevated,var(--dsw-alias-bg-overlay));color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-shadow-lv3,0 8px 24px rgba(0,0,0,.25));font:inherit}",
|
|
1113
1117
|
".dsh-skins-pz-dialog::backdrop{background:rgba(0,0,0,.45)}",
|
|
1114
1118
|
".dsh-skins-pz-dialog-message{margin:0 0 20px;white-space:pre-line;line-height:1.6;font-size:14px}",
|
|
1119
|
+
".dsh-skins-pz-dialog-intro{margin:0;font-size:14px;line-height:1.6}.dsh-skins-pz-dialog-outro{margin:0 0 20px;font-size:14px;line-height:1.6}",
|
|
1120
|
+
".dsh-skins-pz-dialog-tags{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 16px;padding:0;list-style:none}",
|
|
1121
|
+
".dsh-skins-pz-dialog-tag{box-sizing:border-box;display:inline-flex;align-items:center;gap:7px;max-width:100%;padding:6px 10px;border:1px solid var(--dsw-alias-border-l2);border-color:color-mix(in srgb,var(--dsw-alias-brand-primary) 42%,transparent);border-radius:999px;background:var(--dsw-alias-bg-layer-1);background:color-mix(in srgb,var(--dsw-alias-brand-primary) 10%,var(--dsw-alias-bg-overlay));color:var(--dsw-alias-label-primary);font-size:13px;line-height:18px;font-weight:600;white-space:normal}",
|
|
1122
|
+
'.dsh-skins-pz-dialog-tag::before{content:"";flex:none;width:6px;height:6px;border-radius:50%;background:var(--dsw-alias-brand-primary)}',
|
|
1115
1123
|
".dsh-skins-pz-dialog-actions{display:flex;justify-content:flex-end;gap:8px}",
|
|
1116
1124
|
// Stacked (<904px) resets MUST come after the rules they override — the
|
|
1117
1125
|
// array order is the cascade order among equal-specificity selectors.
|
|
@@ -1405,13 +1413,13 @@ ${names}`,
|
|
|
1405
1413
|
const dialogRef = useRef(null);
|
|
1406
1414
|
const confirmationRef = useRef(null);
|
|
1407
1415
|
const [confirmation, setConfirmation] = useState(null);
|
|
1408
|
-
const requestConfirm = (message, accept) => {
|
|
1416
|
+
const requestConfirm = (message, accept, { detailItems = null } = {}) => {
|
|
1409
1417
|
if (!desktopProfile) {
|
|
1410
1418
|
if (window.confirm(message)) void accept();
|
|
1411
1419
|
return;
|
|
1412
1420
|
}
|
|
1413
1421
|
if (confirmationRef.current !== null) return;
|
|
1414
|
-
const next = { message, accept };
|
|
1422
|
+
const next = { message, accept, detailItems };
|
|
1415
1423
|
confirmationRef.current = next;
|
|
1416
1424
|
setConfirmation(next);
|
|
1417
1425
|
};
|
|
@@ -1530,11 +1538,11 @@ ${names}`,
|
|
|
1530
1538
|
onClick: () => {
|
|
1531
1539
|
const affected = schema.fields.filter((field) => overrides[field.key] !== void 0).map((field) => tr(field.labelKey));
|
|
1532
1540
|
requestConfirm(tr("personalization.resetConfirm", {
|
|
1533
|
-
fields: affected.length > 0 ? affected.join(tr("personalization.resetJoin")) : "—"
|
|
1541
|
+
fields: affected.length > 0 ? `• ${affected.join(tr("personalization.resetJoin"))}` : "—"
|
|
1534
1542
|
}), () => {
|
|
1535
1543
|
for (const field of schema.fields) configClient.previewReset(skinId, field.key);
|
|
1536
1544
|
void configClient.flushNow();
|
|
1537
|
-
});
|
|
1545
|
+
}, { detailItems: affected });
|
|
1538
1546
|
},
|
|
1539
1547
|
children: tr("personalization.reset")
|
|
1540
1548
|
}) : null,
|
|
@@ -1562,7 +1570,11 @@ ${names}`,
|
|
|
1562
1570
|
},
|
|
1563
1571
|
children: [
|
|
1564
1572
|
jsx("div", { id: "dsh-skins-confirm-title", className: "dsh-skins-pop-title", children: tr("personalization.confirmTitle") }),
|
|
1565
|
-
jsx("p", { className: "dsh-skins-pz-dialog-message", children: confirmation.message }),
|
|
1573
|
+
confirmation.detailItems === null ? jsx("p", { className: "dsh-skins-pz-dialog-message", children: confirmation.message }) : jsx("div", { children: [
|
|
1574
|
+
jsx("p", { className: "dsh-skins-pz-dialog-intro", children: tr("personalization.resetConfirmIntro") }),
|
|
1575
|
+
confirmation.detailItems.length > 0 ? jsx("ul", { className: "dsh-skins-pz-dialog-tags", children: confirmation.detailItems.map((label) => jsx("li", { className: "dsh-skins-pz-dialog-tag", children: label }, label)) }) : jsx("p", { className: "dsh-skins-pz-dialog-message", children: "—" }),
|
|
1576
|
+
jsx("p", { className: "dsh-skins-pz-dialog-outro", children: tr("personalization.resetConfirmOutro") })
|
|
1577
|
+
] }),
|
|
1566
1578
|
jsx("div", { className: "dsh-skins-pz-dialog-actions", children: [
|
|
1567
1579
|
jsx("button", {
|
|
1568
1580
|
type: "button",
|