feat(console): 模糊度预设按背景(流光8/自定义8/纯色0);恢复初始一并复位B/T;更新公告磁片模糊锁死8px(不随用户设置)
This commit is contained in:
@@ -8182,7 +8182,7 @@ var css = xterm_default + "\n" + [
|
|||||||
".dsh-wt_consoleScroll{flex:1;min-height:0;overflow:auto;padding-bottom:10px}",
|
".dsh-wt_consoleScroll{flex:1;min-height:0;overflow:auto;padding-bottom:10px}",
|
||||||
".dsh-wt_announceCtr{display:flex;min-height:100%;align-items:center;justify-content:center;box-sizing:border-box}",
|
".dsh-wt_announceCtr{display:flex;min-height:100%;align-items:center;justify-content:center;box-sizing:border-box}",
|
||||||
".dsh-wt_announceCtr .dsh-wt_announce{margin:auto}",
|
".dsh-wt_announceCtr .dsh-wt_announce{margin:auto}",
|
||||||
".dsh-wt_announce{width:100%;max-width:856px;margin:0 auto;display:flex;flex-direction:column;gap:12px;padding:26px;border-radius:16px;background:linear-gradient(135deg,rgba(255,255,255,.22) 0%,rgba(255,255,255,.07) 30%,rgba(255,255,255,.01) 60%,rgba(0,0,0,.07) 100%),rgba(18,23,32,.24);border:1px solid transparent;box-shadow:0 10px 28px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.13);box-sizing:border-box;backdrop-filter:blur(var(--wt-cardBlur,0px)) saturate(1.15)}",
|
".dsh-wt_announce{width:100%;max-width:856px;margin:0 auto;display:flex;flex-direction:column;gap:12px;padding:26px;border-radius:16px;background:linear-gradient(135deg,rgba(255,255,255,.22) 0%,rgba(255,255,255,.07) 30%,rgba(255,255,255,.01) 60%,rgba(0,0,0,.07) 100%),rgba(18,23,32,.24);border:1px solid transparent;box-shadow:0 10px 28px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.13);box-sizing:border-box;backdrop-filter:blur(8px) saturate(1.15)}",
|
||||||
".dsh-wt_console[data-wt-theme=light] .dsh-wt_announce{background:linear-gradient(135deg,rgba(255,255,255,1) 0%,rgba(255,255,255,.65) 30%,rgba(255,255,255,.12) 60%,rgba(31,41,55,.06) 100%),rgba(255,255,255,.34);box-shadow:0 10px 28px rgba(31,41,55,.18),inset 0 1px 0 rgba(255,255,255,1)}",
|
".dsh-wt_console[data-wt-theme=light] .dsh-wt_announce{background:linear-gradient(135deg,rgba(255,255,255,1) 0%,rgba(255,255,255,.65) 30%,rgba(255,255,255,.12) 60%,rgba(31,41,55,.06) 100%),rgba(255,255,255,.34);box-shadow:0 10px 28px rgba(31,41,55,.18),inset 0 1px 0 rgba(255,255,255,1)}",
|
||||||
".dsh-wt_announceHead{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-bottom:10px;border-bottom:1px solid var(--wt-border)}",
|
".dsh-wt_announceHead{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-bottom:10px;border-bottom:1px solid var(--wt-border)}",
|
||||||
".dsh-wt_announceVer{font-size:15px;font-weight:700;color:var(--wt-text)}",
|
".dsh-wt_announceVer{font-size:15px;font-weight:700;color:var(--wt-text)}",
|
||||||
@@ -17898,9 +17898,9 @@ function ConsolePane() {
|
|||||||
const [bgVideo, setBgVideo] = (0, import_react.useState)("");
|
const [bgVideo, setBgVideo] = (0, import_react.useState)("");
|
||||||
const [photoGrid, setPhotoGridState] = (0, import_react.useState)(() => splitEnv?.console?.getPhotoGrid?.() ?? true);
|
const [photoGrid, setPhotoGridState] = (0, import_react.useState)(() => splitEnv?.console?.getPhotoGrid?.() ?? true);
|
||||||
const [gridOpacity, setGridOpacityState] = (0, import_react.useState)(() => splitEnv?.console?.getGridOpacity?.() ?? 8);
|
const [gridOpacity, setGridOpacityState] = (0, import_react.useState)(() => splitEnv?.console?.getGridOpacity?.() ?? 8);
|
||||||
const [cardBlur, setCardBlurState] = (0, import_react.useState)(() => splitEnv?.console?.getCardBlur?.() ?? 0);
|
const [cardBlur, setCardBlurState] = (0, import_react.useState)(() => splitEnv?.console?.getCardBlur?.() ?? 8);
|
||||||
const [plainBlur, setPlainBlurState] = (0, import_react.useState)(() => splitEnv?.console?.getPlainBlur?.() ?? 0);
|
const [plainBlur, setPlainBlurState] = (0, import_react.useState)(() => splitEnv?.console?.getPlainBlur?.() ?? 0);
|
||||||
const [glowBlur, setGlowBlurState] = (0, import_react.useState)(() => splitEnv?.console?.getGlowBlur?.() ?? 0);
|
const [glowBlur, setGlowBlurState] = (0, import_react.useState)(() => splitEnv?.console?.getGlowBlur?.() ?? 8);
|
||||||
const [plainGrid, setPlainGridState] = (0, import_react.useState)(() => splitEnv?.console?.getPlainGrid?.() ?? 5);
|
const [plainGrid, setPlainGridState] = (0, import_react.useState)(() => splitEnv?.console?.getPlainGrid?.() ?? 5);
|
||||||
const [glowGrid, setGlowGridState] = (0, import_react.useState)(() => splitEnv?.console?.getGlowGrid?.() ?? 8);
|
const [glowGrid, setGlowGridState] = (0, import_react.useState)(() => splitEnv?.console?.getGlowGrid?.() ?? 8);
|
||||||
const [annOpen, setAnnOpen] = (0, import_react.useState)(false);
|
const [annOpen, setAnnOpen] = (0, import_react.useState)(false);
|
||||||
@@ -18111,6 +18111,23 @@ function ConsolePane() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const resetHsl = (kind) => {
|
const resetHsl = (kind) => {
|
||||||
|
const blurDef = kind === "plain" ? 0 : 8;
|
||||||
|
if (kind === "plain") {
|
||||||
|
setPlainBlurState(blurDef);
|
||||||
|
splitEnv?.console?.setPlainBlur?.(blurDef);
|
||||||
|
setPlainGridState(5);
|
||||||
|
splitEnv?.console?.setPlainGrid?.(5);
|
||||||
|
} else if (kind === "glow") {
|
||||||
|
setGlowBlurState(blurDef);
|
||||||
|
splitEnv?.console?.setGlowBlur?.(blurDef);
|
||||||
|
setGlowGridState(8);
|
||||||
|
splitEnv?.console?.setGlowGrid?.(8);
|
||||||
|
} else {
|
||||||
|
setCardBlurState(blurDef);
|
||||||
|
splitEnv?.console?.setCardBlur?.(blurDef);
|
||||||
|
setGridOpacityState(8);
|
||||||
|
splitEnv?.console?.setGridOpacity?.(8);
|
||||||
|
}
|
||||||
if (kind === "plain") {
|
if (kind === "plain") {
|
||||||
const def = resolvedTheme === "light" ? { ...PLAIN_HSL_LIGHT } : { ...PLAIN_HSL_DARK };
|
const def = resolvedTheme === "light" ? { ...PLAIN_HSL_LIGHT } : { ...PLAIN_HSL_DARK };
|
||||||
setPlainHslState(def);
|
setPlainHslState(def);
|
||||||
@@ -18492,7 +18509,10 @@ function ConsolePane() {
|
|||||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { className: "dsh-wt_hslSlider", type: "range", min: 0, max: lMax, step: 1, value: v.l, onChange: (e) => editHsl(bgEdit, { l: Number(e.target.value) }) }),
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { className: "dsh-wt_hslSlider", type: "range", min: 0, max: lMax, step: 1, value: v.l, onChange: (e) => editHsl(bgEdit, { l: Number(e.target.value) }) }),
|
||||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(HslValInput, { value: v.l, max: lMax, onCommit: (n) => editHsl(bgEdit, { l: n }) })
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(HslValInput, { value: v.l, max: lMax, onCommit: (n) => editHsl(bgEdit, { l: n }) })
|
||||||
] }),
|
] }),
|
||||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "dsh-wt_hslReset", onClick: () => resetHsl(bgEdit), children: T("console.bgEditReset") })
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", className: "dsh-wt_hslReset", onClick: () => resetHsl(bgEdit), children: [
|
||||||
|
T("console.bgEditReset"),
|
||||||
|
"\uFF08\u542B B/T\uFF09"
|
||||||
|
] })
|
||||||
] });
|
] });
|
||||||
})()
|
})()
|
||||||
] })),
|
] })),
|
||||||
@@ -20919,11 +20939,11 @@ function WorktableSection(props) {
|
|||||||
setPhotoGrid: (v) => persistView({ consoleBgPhotoGrid: v }),
|
setPhotoGrid: (v) => persistView({ consoleBgPhotoGrid: v }),
|
||||||
getGridOpacity: () => viewRef.current.consoleBgGridOpacity ?? 8,
|
getGridOpacity: () => viewRef.current.consoleBgGridOpacity ?? 8,
|
||||||
setGridOpacity: (v) => persistView({ consoleBgGridOpacity: v }),
|
setGridOpacity: (v) => persistView({ consoleBgGridOpacity: v }),
|
||||||
getCardBlur: () => viewRef.current.consoleCardBlur ?? 0,
|
getCardBlur: () => viewRef.current.consoleCardBlur ?? 8,
|
||||||
setCardBlur: (v) => persistView({ consoleCardBlur: v }),
|
setCardBlur: (v) => persistView({ consoleCardBlur: v }),
|
||||||
getPlainBlur: () => viewRef.current.consoleBgPlainBlur ?? 0,
|
getPlainBlur: () => viewRef.current.consoleBgPlainBlur ?? 0,
|
||||||
setPlainBlur: (v) => persistView({ consoleBgPlainBlur: v }),
|
setPlainBlur: (v) => persistView({ consoleBgPlainBlur: v }),
|
||||||
getGlowBlur: () => viewRef.current.consoleBgGlowBlur ?? 0,
|
getGlowBlur: () => viewRef.current.consoleBgGlowBlur ?? 8,
|
||||||
setGlowBlur: (v) => persistView({ consoleBgGlowBlur: v }),
|
setGlowBlur: (v) => persistView({ consoleBgGlowBlur: v }),
|
||||||
getPlainGrid: () => viewRef.current.consoleBgPlainGrid ?? 5,
|
getPlainGrid: () => viewRef.current.consoleBgPlainGrid ?? 5,
|
||||||
setPlainGrid: (v) => persistView({ consoleBgPlainGrid: v }),
|
setPlainGrid: (v) => persistView({ consoleBgPlainGrid: v }),
|
||||||
|
|||||||
@@ -1420,11 +1420,11 @@ function WorktableSection(props: any) {
|
|||||||
setPhotoGrid: (v: boolean) => persistView({ consoleBgPhotoGrid: v }),
|
setPhotoGrid: (v: boolean) => persistView({ consoleBgPhotoGrid: v }),
|
||||||
getGridOpacity: () => viewRef.current.consoleBgGridOpacity ?? 8,
|
getGridOpacity: () => viewRef.current.consoleBgGridOpacity ?? 8,
|
||||||
setGridOpacity: (v: number) => persistView({ consoleBgGridOpacity: v }),
|
setGridOpacity: (v: number) => persistView({ consoleBgGridOpacity: v }),
|
||||||
getCardBlur: () => viewRef.current.consoleCardBlur ?? 0,
|
getCardBlur: () => viewRef.current.consoleCardBlur ?? 8,
|
||||||
setCardBlur: (v: number) => persistView({ consoleCardBlur: v }),
|
setCardBlur: (v: number) => persistView({ consoleCardBlur: v }),
|
||||||
getPlainBlur: () => viewRef.current.consoleBgPlainBlur ?? 0,
|
getPlainBlur: () => viewRef.current.consoleBgPlainBlur ?? 0,
|
||||||
setPlainBlur: (v: number) => persistView({ consoleBgPlainBlur: v }),
|
setPlainBlur: (v: number) => persistView({ consoleBgPlainBlur: v }),
|
||||||
getGlowBlur: () => viewRef.current.consoleBgGlowBlur ?? 0,
|
getGlowBlur: () => viewRef.current.consoleBgGlowBlur ?? 8,
|
||||||
setGlowBlur: (v: number) => persistView({ consoleBgGlowBlur: v }),
|
setGlowBlur: (v: number) => persistView({ consoleBgGlowBlur: v }),
|
||||||
getPlainGrid: () => viewRef.current.consoleBgPlainGrid ?? 5,
|
getPlainGrid: () => viewRef.current.consoleBgPlainGrid ?? 5,
|
||||||
setPlainGrid: (v: number) => persistView({ consoleBgPlainGrid: v }),
|
setPlainGrid: (v: number) => persistView({ consoleBgPlainGrid: v }),
|
||||||
|
|||||||
@@ -1424,9 +1424,9 @@ function ConsolePane() {
|
|||||||
const [bgVideo, setBgVideo] = useState<string>('')
|
const [bgVideo, setBgVideo] = useState<string>('')
|
||||||
const [photoGrid, setPhotoGridState] = useState<boolean>(() => splitEnv?.console?.getPhotoGrid?.() ?? true)
|
const [photoGrid, setPhotoGridState] = useState<boolean>(() => splitEnv?.console?.getPhotoGrid?.() ?? true)
|
||||||
const [gridOpacity, setGridOpacityState] = useState<number>(() => splitEnv?.console?.getGridOpacity?.() ?? 8)
|
const [gridOpacity, setGridOpacityState] = useState<number>(() => splitEnv?.console?.getGridOpacity?.() ?? 8)
|
||||||
const [cardBlur, setCardBlurState] = useState<number>(() => splitEnv?.console?.getCardBlur?.() ?? 0)
|
const [cardBlur, setCardBlurState] = useState<number>(() => splitEnv?.console?.getCardBlur?.() ?? 8)
|
||||||
const [plainBlur, setPlainBlurState] = useState<number>(() => splitEnv?.console?.getPlainBlur?.() ?? 0)
|
const [plainBlur, setPlainBlurState] = useState<number>(() => splitEnv?.console?.getPlainBlur?.() ?? 0)
|
||||||
const [glowBlur, setGlowBlurState] = useState<number>(() => splitEnv?.console?.getGlowBlur?.() ?? 0)
|
const [glowBlur, setGlowBlurState] = useState<number>(() => splitEnv?.console?.getGlowBlur?.() ?? 8)
|
||||||
const [plainGrid, setPlainGridState] = useState<number>(() => splitEnv?.console?.getPlainGrid?.() ?? 5)
|
const [plainGrid, setPlainGridState] = useState<number>(() => splitEnv?.console?.getPlainGrid?.() ?? 5)
|
||||||
const [glowGrid, setGlowGridState] = useState<number>(() => splitEnv?.console?.getGlowGrid?.() ?? 8)
|
const [glowGrid, setGlowGridState] = useState<number>(() => splitEnv?.console?.getGlowGrid?.() ?? 8)
|
||||||
const [annOpen, setAnnOpen] = useState(false)
|
const [annOpen, setAnnOpen] = useState(false)
|
||||||
@@ -1601,6 +1601,18 @@ function ConsolePane() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const resetHsl = (kind: 'plain' | 'glow' | 'photo') => {
|
const resetHsl = (kind: 'plain' | 'glow' | 'photo') => {
|
||||||
|
// 恢复初始:连同贴片模糊(B)/网格不透明度(T)一起复位(纯色 B=0,流光/自定义 B=8)
|
||||||
|
const blurDef = kind === 'plain' ? 0 : 8
|
||||||
|
if (kind === 'plain') {
|
||||||
|
setPlainBlurState(blurDef); splitEnv?.console?.setPlainBlur?.(blurDef)
|
||||||
|
setPlainGridState(5); splitEnv?.console?.setPlainGrid?.(5)
|
||||||
|
} else if (kind === 'glow') {
|
||||||
|
setGlowBlurState(blurDef); splitEnv?.console?.setGlowBlur?.(blurDef)
|
||||||
|
setGlowGridState(8); splitEnv?.console?.setGlowGrid?.(8)
|
||||||
|
} else {
|
||||||
|
setCardBlurState(blurDef); splitEnv?.console?.setCardBlur?.(blurDef)
|
||||||
|
setGridOpacityState(8); splitEnv?.console?.setGridOpacity?.(8)
|
||||||
|
}
|
||||||
if (kind === 'plain') {
|
if (kind === 'plain') {
|
||||||
const def = resolvedTheme === 'light' ? { ...PLAIN_HSL_LIGHT } : { ...PLAIN_HSL_DARK }
|
const def = resolvedTheme === 'light' ? { ...PLAIN_HSL_LIGHT } : { ...PLAIN_HSL_DARK }
|
||||||
setPlainHslState(def)
|
setPlainHslState(def)
|
||||||
@@ -1890,7 +1902,7 @@ function ConsolePane() {
|
|||||||
<div className="dsh-wt_hslRow" data-tip={T('console.bgTipH')}><span className="dsh-wt_hslLabel">H</span><input className="dsh-wt_hslSlider" type="range" min={-180} max={180} step={1} value={v.h} onChange={(e) => editHsl(bgEdit, { h: Number(e.target.value) })} /><HslValInput value={v.h} min={-180} max={180} onCommit={(n) => editHsl(bgEdit, { h: n })} /></div>
|
<div className="dsh-wt_hslRow" data-tip={T('console.bgTipH')}><span className="dsh-wt_hslLabel">H</span><input className="dsh-wt_hslSlider" type="range" min={-180} max={180} step={1} value={v.h} onChange={(e) => editHsl(bgEdit, { h: Number(e.target.value) })} /><HslValInput value={v.h} min={-180} max={180} onCommit={(n) => editHsl(bgEdit, { h: n })} /></div>
|
||||||
<div className="dsh-wt_hslRow" data-tip={T('console.bgTipS')}><span className="dsh-wt_hslLabel">S</span><input className="dsh-wt_hslSlider" type="range" min={0} max={sMax} step={1} value={v.s} onChange={(e) => editHsl(bgEdit, { s: Number(e.target.value) })} /><HslValInput value={v.s} max={sMax} onCommit={(n) => editHsl(bgEdit, { s: n })} /></div>
|
<div className="dsh-wt_hslRow" data-tip={T('console.bgTipS')}><span className="dsh-wt_hslLabel">S</span><input className="dsh-wt_hslSlider" type="range" min={0} max={sMax} step={1} value={v.s} onChange={(e) => editHsl(bgEdit, { s: Number(e.target.value) })} /><HslValInput value={v.s} max={sMax} onCommit={(n) => editHsl(bgEdit, { s: n })} /></div>
|
||||||
<div className="dsh-wt_hslRow" data-tip={T('console.bgTipL')}><span className="dsh-wt_hslLabel">L</span><input className="dsh-wt_hslSlider" type="range" min={0} max={lMax} step={1} value={v.l} onChange={(e) => editHsl(bgEdit, { l: Number(e.target.value) })} /><HslValInput value={v.l} max={lMax} onCommit={(n) => editHsl(bgEdit, { l: n })} /></div>
|
<div className="dsh-wt_hslRow" data-tip={T('console.bgTipL')}><span className="dsh-wt_hslLabel">L</span><input className="dsh-wt_hslSlider" type="range" min={0} max={lMax} step={1} value={v.l} onChange={(e) => editHsl(bgEdit, { l: Number(e.target.value) })} /><HslValInput value={v.l} max={lMax} onCommit={(n) => editHsl(bgEdit, { l: n })} /></div>
|
||||||
<button type="button" className="dsh-wt_hslReset" onClick={() => resetHsl(bgEdit)}>{T('console.bgEditReset')}</button>
|
<button type="button" className="dsh-wt_hslReset" onClick={() => resetHsl(bgEdit)}>{T('console.bgEditReset')}(含 B/T)</button>
|
||||||
</>)
|
</>)
|
||||||
})()}
|
})()}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -430,7 +430,7 @@ export const css = xtermCss + '\n' + [
|
|||||||
'.dsh-wt_consoleScroll{flex:1;min-height:0;overflow:auto;padding-bottom:10px}',
|
'.dsh-wt_consoleScroll{flex:1;min-height:0;overflow:auto;padding-bottom:10px}',
|
||||||
'.dsh-wt_announceCtr{display:flex;min-height:100%;align-items:center;justify-content:center;box-sizing:border-box}',
|
'.dsh-wt_announceCtr{display:flex;min-height:100%;align-items:center;justify-content:center;box-sizing:border-box}',
|
||||||
'.dsh-wt_announceCtr .dsh-wt_announce{margin:auto}',
|
'.dsh-wt_announceCtr .dsh-wt_announce{margin:auto}',
|
||||||
'.dsh-wt_announce{width:100%;max-width:856px;margin:0 auto;display:flex;flex-direction:column;gap:12px;padding:26px;border-radius:16px;background:linear-gradient(135deg,rgba(255,255,255,.22) 0%,rgba(255,255,255,.07) 30%,rgba(255,255,255,.01) 60%,rgba(0,0,0,.07) 100%),rgba(18,23,32,.24);border:1px solid transparent;box-shadow:0 10px 28px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.13);box-sizing:border-box;backdrop-filter:blur(var(--wt-cardBlur,0px)) saturate(1.15)}',
|
'.dsh-wt_announce{width:100%;max-width:856px;margin:0 auto;display:flex;flex-direction:column;gap:12px;padding:26px;border-radius:16px;background:linear-gradient(135deg,rgba(255,255,255,.22) 0%,rgba(255,255,255,.07) 30%,rgba(255,255,255,.01) 60%,rgba(0,0,0,.07) 100%),rgba(18,23,32,.24);border:1px solid transparent;box-shadow:0 10px 28px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.13);box-sizing:border-box;backdrop-filter:blur(8px) saturate(1.15)}',
|
||||||
'.dsh-wt_console[data-wt-theme=light] .dsh-wt_announce{background:linear-gradient(135deg,rgba(255,255,255,1) 0%,rgba(255,255,255,.65) 30%,rgba(255,255,255,.12) 60%,rgba(31,41,55,.06) 100%),rgba(255,255,255,.34);box-shadow:0 10px 28px rgba(31,41,55,.18),inset 0 1px 0 rgba(255,255,255,1)}',
|
'.dsh-wt_console[data-wt-theme=light] .dsh-wt_announce{background:linear-gradient(135deg,rgba(255,255,255,1) 0%,rgba(255,255,255,.65) 30%,rgba(255,255,255,.12) 60%,rgba(31,41,55,.06) 100%),rgba(255,255,255,.34);box-shadow:0 10px 28px rgba(31,41,55,.18),inset 0 1px 0 rgba(255,255,255,1)}',
|
||||||
'.dsh-wt_announceHead{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-bottom:10px;border-bottom:1px solid var(--wt-border)}',
|
'.dsh-wt_announceHead{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-bottom:10px;border-bottom:1px solid var(--wt-border)}',
|
||||||
'.dsh-wt_announceVer{font-size:15px;font-weight:700;color:var(--wt-text)}',
|
'.dsh-wt_announceVer{font-size:15px;font-weight:700;color:var(--wt-text)}',
|
||||||
|
|||||||
Reference in New Issue
Block a user