Mesh:Tool: restore the dark-mode checkbox too (913977ec removed it)
The set_darkmode() restore missed that 913977ec also deleted the 'dark
mode' checkbox from api.settings() (src/mesh/build.js) - 'const dark =
true' + no toggle. Restored: reads space.dark, re-adds the checkbox
wired to call.set_darkmode().
This commit is contained in:
parent
ba806a55af
commit
e58ffd843a
1 changed files with 10 additions and 1 deletions
|
|
@ -275,9 +275,18 @@ api.welcome = function(version = "unknown") {
|
||||||
api.settings = function() {
|
api.settings = function() {
|
||||||
const { prefs } = api;
|
const { prefs } = api;
|
||||||
const { surface, normals, space, sketch, wireframe } = prefs.map;
|
const { surface, normals, space, sketch, wireframe } = prefs.map;
|
||||||
const dark = true;
|
// CMMS patch: upstream 913977ec hard-wired `const dark = true` and deleted
|
||||||
|
// the dark-mode checkbox. Restored - set_darkmode() (src/main/mesh.js) is
|
||||||
|
// conditional again and the CMMS host follows its own light/dark theme.
|
||||||
|
const dark = space.dark;
|
||||||
|
|
||||||
const set1 = div([
|
const set1 = div([
|
||||||
|
label({ class: "header", _: 'theme'}),
|
||||||
|
label('dark mode'),
|
||||||
|
input({ type: "checkbox",
|
||||||
|
onchange: ev => call.set_darkmode(ev.target.checked),
|
||||||
|
[ dark ? 'checked' : 'unchecked' ] : 1
|
||||||
|
}),
|
||||||
label({ class: "header", _: 'auto'}),
|
label({ class: "header", _: 'auto'}),
|
||||||
label('auto floor'),
|
label('auto floor'),
|
||||||
input({ type: "checkbox",
|
input({ type: "checkbox",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue