mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-01-18 15:26:19 +08:00
Fix issue with styling in plugin dialogs
Fix cannot set empty string as settings override value Fix color in menu items on hover Add nullish coalescing as browser requirement
This commit is contained in:
parent
69078ca5ea
commit
489964cf31
@ -594,6 +594,7 @@
|
||||
.contextMenu li.focused,
|
||||
.contextMenu li.parent.opened {
|
||||
background-color: var(--color-accent);
|
||||
color: var(--color-accent_text);
|
||||
}
|
||||
.contextMenu li.hybrid_parent.opened {
|
||||
background-color: transparent;
|
||||
|
@ -54,8 +54,9 @@
|
||||
<script>
|
||||
// Browser compatibility check
|
||||
try {
|
||||
eval('window?.document');
|
||||
eval('window?.document ?? 2');
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
let error_element = document.querySelector('#loading_error_detail')
|
||||
error_element.innerHTML = `Incompatible browser version. Please update your web browser.`
|
||||
}
|
||||
|
@ -326,9 +326,9 @@ function buildLines(dialog) {
|
||||
dialog.max_label_width = Math.max(getStringWidth(widget.name), dialog.max_label_width)
|
||||
}
|
||||
dialog.uses_wide_inputs = true;
|
||||
dialog_content.append(bar)
|
||||
dialog_content.append(bar);
|
||||
} else {
|
||||
dialog_content.append(DOMPurify.sanitize(l))
|
||||
dialog_content.append(l);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ class Setting {
|
||||
get value() {
|
||||
let profile = SettingsProfile.all.find(profile => profile.isActive() && profile.settings[this.id] !== undefined);
|
||||
if (profile) {
|
||||
return profile.settings[this.id] || this.master_value;
|
||||
return profile.settings[this.id] ?? this.master_value;
|
||||
} else {
|
||||
return this.master_value;
|
||||
}
|
||||
@ -82,7 +82,7 @@ class Setting {
|
||||
get ui_value() {
|
||||
let profile = Settings.dialog.content_vue?.profile;
|
||||
if (profile) {
|
||||
return profile.settings[this.id] || this.master_value;
|
||||
return profile.settings[this.id] ?? this.master_value;
|
||||
} else {
|
||||
return this.master_value;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user