Fix panel resizing direction on mobile

Remove screen orientation preference
Fix error message when changing keybinding on search result
This commit is contained in:
JannisX11 2022-03-22 14:46:59 +01:00
parent 4afaadacea
commit b97fd52f12
4 changed files with 8 additions and 7 deletions

View File

@ -333,8 +333,10 @@ function updateKeybindConflicts() {
if (Keybinds.dialog && Keybinds.dialog.sidebar.node) {
let node = Keybinds.dialog.sidebar.node;
for (var key in Keybinds.structure) {
let page = node.querySelector(`.dialog_sidebar_pages li[page="${key}"]`)
page.classList.toggle('error', Keybinds.structure[key].conflict);
if (Keybinds.dialog.sidebar.pages[key]) {
let page = node.querySelector(`.dialog_sidebar_pages li[page="${key}"]`)
page.classList.toggle('error', Keybinds.structure[key].conflict);
}
}
}
}

View File

@ -277,7 +277,7 @@ class Panel {
}
if (!started) return;
let sign = settings.mobile_panel_side.value == 'left' ? -1 : 1;
let sign = (Blockbench.isLandscape && settings.mobile_panel_side.value == 'left') ? -1 : 1;
this.position_data.height = Math.clamp(height_before + diff * sign, 140, max);
this.update(true);

View File

@ -185,8 +185,8 @@ const Settings = {
new Setting('mobile_panel_side', {category: 'interface', value: 'right', condition: Blockbench.isMobile, type: 'select', options: {
'right': tl('generic.right'),
'left': tl('generic.left'),
}, onChange(value) {
document.body.classList.toggle('mobile_sidebar_left', value == 'left');
}, onChange() {
document.body.classList.toggle('mobile_sidebar_left', settings.mobile_panel_side.value == 'left');
}});
new Setting('status_bar_modifier_keys', {category: 'interface', value: true, condition: !Blockbench.isTouch, onChange(value) {
Interface.status_bar.vue.show_modifier_keys = value;

View File

@ -24,6 +24,5 @@
"background_color": "#21252b",
"theme_color": "#3e90ff",
"display": "standalone",
"display_override": ["tabbed", "minimal-ui"],
"orientation": "any"
"display_override": ["tabbed", "minimal-ui"]
}