removed zen mode

This commit is contained in:
zadam 2021-06-05 21:56:39 +02:00
parent 8debf18984
commit faab6be48d
8 changed files with 1 additions and 49 deletions

2
TODO
View File

@ -1 +1 @@
- remove zen mode - search should not require a note

View File

@ -80,7 +80,6 @@ export default class DesktopLayout {
.css("width", "54px") .css("width", "54px")
) )
.child(new LeftPaneContainer() .child(new LeftPaneContainer()
.hideInZenMode()
.child(new QuickSearchWidget()) .child(new QuickSearchWidget())
.child(appContext.mainTreeWidget) .child(appContext.mainTreeWidget)
.child(...this.customWidgets.get('left-pane')) .child(...this.customWidgets.get('left-pane'))
@ -147,7 +146,6 @@ export default class DesktopLayout {
) )
) )
.child(new RightPaneContainer() .child(new RightPaneContainer()
.hideInZenMode()
.child(...this.customWidgets.get('right-pane')) .child(...this.customWidgets.get('right-pane'))
) )
) )

View File

@ -45,11 +45,6 @@ class BasicWidget extends Component {
return this; return this;
} }
hideInZenMode() {
this.class('hide-in-zen-mode');
return this;
}
cssBlock(block) { cssBlock(block) {
this.cssEl = block; this.cssEl = block;
return this; return this;

View File

@ -48,12 +48,6 @@ const TPL = `
<kbd data-command="reloadFrontendApp"></kbd> <kbd data-command="reloadFrontendApp"></kbd>
</a> </a>
<a class="dropdown-item" data-trigger-command="toggleZenMode">
<span class="bx bx-empty"></span>
Toggle Zen mode
<kbd data-command="toggleZenMode"></kbd>
</a>
<a class="dropdown-item" data-trigger-command="toggleFullscreen"> <a class="dropdown-item" data-trigger-command="toggleFullscreen">
<span class="bx bx-empty"></span> <span class="bx bx-empty"></span>
Toggle fullscreen Toggle fullscreen

View File

@ -22,23 +22,6 @@ export default class RootContainer extends FlexContainer {
this.$widget.toggleClass("protected", note.isProtected); this.$widget.toggleClass("protected", note.isProtected);
} }
this.setZenMode(this.isZenModeActive);
}
setZenMode(active) {
this.isZenModeActive = active;
if (this.isZenModeActive) {
$("#root-widget").addClass("zen-mode");
}
else {
$("#root-widget").removeClass("zen-mode");
}
}
toggleZenModeEvent() {
this.setZenMode(!this.isZenModeActive);
} }
noteSwitchedEvent() { noteSwitchedEvent() {

View File

@ -54,18 +54,6 @@ button.close:hover {
display: none; display: none;
} }
.zen-mode #center-pane {
width: 100% !important;
/* limit max width to improve readability */
max-width: 1000px;
margin-left: auto;
margin-right: auto;
}
.zen-mode .hide-in-zen-mode, .zen-mode .gutter {
display: none !important;
}
.ui-autocomplete { .ui-autocomplete {
max-height: 300px; max-height: 300px;
overflow-y: auto; overflow-y: auto;

View File

@ -396,11 +396,6 @@ const DEFAULT_KEYBOARD_ACTIONS = [
defaultShortcuts: ["F11"], defaultShortcuts: ["F11"],
scope: "window" scope: "window"
}, },
{
actionName: "toggleZenMode",
defaultShortcuts: ["Alt+M"],
scope: "window"
},
{ {
actionName: "zoomOut", actionName: "zoomOut",
defaultShortcuts: isElectron ? ["CommandOrControl+-"] : [], defaultShortcuts: isElectron ? ["CommandOrControl+-"] : [],

View File

@ -135,7 +135,6 @@
<p class="card-text"> <p class="card-text">
<ul> <ul>
<li><kbd data-command="toggleZenMode">not set</kbd> - Zen mode - display only note editor, everything else is hidden</li>
<li><kbd data-command="quickSearch">not set</kbd> - focus on quick search input</li> <li><kbd data-command="quickSearch">not set</kbd> - focus on quick search input</li>
<li><kbd data-command="findInText">not set</kbd> - in page search</li> <li><kbd data-command="findInText">not set</kbd> - in page search</li>
</ul> </ul>