"distraction free mode" renamed to more standard "zen mode"

This commit is contained in:
zadam 2019-11-18 19:32:27 +01:00
parent a1181623b7
commit b4709e8ee5
10 changed files with 25 additions and 24 deletions

19
package-lock.json generated
View File

@ -5990,9 +5990,9 @@
},
"dependencies": {
"glob": {
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
"integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@ -6546,12 +6546,13 @@
}
},
"imagemin": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/imagemin/-/imagemin-7.0.0.tgz",
"integrity": "sha512-TXvCSSIYl4KQUASur9S0+E4olVECzvxvZABU9rNqsza7vzIrUQMRTjyczGf8OmtcgvZ9jOYyinXW3epOpd/04A==",
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/imagemin/-/imagemin-7.0.1.tgz",
"integrity": "sha512-33AmZ+xjZhg2JMCe+vDf6a9mzWukE7l+wAtesjE7KyteqqKjzxv7aVQeWnul1Ve26mWvEQqyPwl0OctNBfSR9w==",
"requires": {
"file-type": "^12.0.0",
"globby": "^10.0.0",
"graceful-fs": "^4.2.2",
"junk": "^3.1.0",
"make-dir": "^3.0.0",
"p-pipe": "^3.0.0",
@ -9903,9 +9904,9 @@
"integrity": "sha512-CzFr90qM24ju5f88quFC/6qohjC144rehe5n6DH900lgXmUe86+xCKc10ev56gRKC4/BkHUoG4uSiQgBiIXwDA=="
},
"picomatch": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.0.7.tgz",
"integrity": "sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA=="
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.1.1.tgz",
"integrity": "sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA=="
},
"pify": {
"version": "4.0.1",

View File

@ -45,7 +45,7 @@
"http-proxy-agent": "2.1.0",
"https-proxy-agent": "3.0.1",
"image-type": "4.1.0",
"imagemin": "7.0.0",
"imagemin": "7.0.1",
"imagemin-giflossy": "5.1.10",
"imagemin-mozjpeg": "8.0.0",
"imagemin-pngquant": "8.0.0",

View File

@ -92,12 +92,12 @@ function registerEntrypoints() {
}
}
// hide (toggle) everything except for the note content for zen mode
utils.bindGlobalShortcut('alt+m', e => {
$(".hide-toggle").toggle();
$("#container").toggleClass("distraction-free-mode");
$(".hide-in-zen-mode").toggle();
$("#container").toggleClass("zen-mode");
});
// hide (toggle) everything except for the note content for distraction free writing
utils.bindGlobalShortcut('alt+t', e => {
const date = new Date();
const dateString = utils.formatDateTime(date);

View File

@ -18,7 +18,7 @@ body {
grid-gap: 0;
}
#container.distraction-free-mode {
#container.zen-mode {
grid-template-areas:
"tab-container" !important;
grid-template-rows: auto

View File

@ -144,9 +144,9 @@ ul.fancytree-container {
margin-top: 0;
}
/** we disable shield background when in distraction free mode because I couldn't get it to stay static
/** we disable shield background when in zen mode because I couldn't get it to stay static
(it kept growing with content) */
#container:not(.distraction-free-mode) .note-tab-content.protected {
#container:not(.zen-mode) .note-tab-content.protected {
/* DON'T COLLAPSE THE RULES INTO SINGLE ONE, BACKGROUND WON'T DISPLAY */
background: url('../images/shield.svg') no-repeat;
background-size: contain;

View File

@ -10,7 +10,7 @@
<div id="toast-container" class="d-flex flex-column justify-content-center align-items-center"></div>
<div id="container" style="display: none; grid-template-columns: minmax(<%= leftPaneMinWidth %>px, <%= leftPaneWidthPercent %>fr) minmax(0, <%= rightPaneWidthPercent %>fr)">
<div id="header" class="hide-toggle">
<div id="header" class="hide-in-zen-mode">
<div id="history-navigation" style="display: none;">
<a id="history-back-button" title="Go to previous note." class="icon-action bx bx-left-arrow-circle"></a>
@ -107,7 +107,7 @@
</div>
</div>
<div id="left-pane" class="hide-toggle">
<div id="left-pane" class="hide-in-zen-mode">
<div id="global-buttons">
<a id="create-top-level-note-button" title="Create new top level note" class="icon-action bx bx-folder-plus"></a>

View File

@ -134,7 +134,7 @@
<p class="card-text">
<ul>
<li><kbd>ALT+M</kbd> - distraction-free mode - display only note editor, everything else is hidden</li>
<li><kbd>ALT+M</kbd> - Zen mode - display only note editor, everything else is hidden</li>
<li><kbd>CTRL+S</kbd> - toggle search form in tree pane</li>
<li><kbd>CTRL+F</kbd> - in page search</li>
<li><kbd>ALT+A</kbd> - show note attributes dialog</li>

View File

@ -1,4 +1,4 @@
<div class="note-detail-sidebar hide-toggle" style="width: <%= sidebarWidthPercent %>%; min-width: <%= sidebarMinWidth %>px">
<div class="note-detail-sidebar hide-in-zen-mode" style="width: <%= sidebarWidthPercent %>%; min-width: <%= sidebarMinWidth %>px">
<div style="text-align: center; margin-bottom: 5px;">
<button class="hide-sidebar-button">hide sidebar <span class="bx bx-chevrons-right"></span></button>
</div>

View File

@ -1,4 +1,4 @@
<div class="note-tab-row hide-toggle">
<div class="note-tab-row hide-in-hide-in-zen-mode">
<div class="note-tab-row-content"></div>
</div>

View File

@ -1,6 +1,6 @@
<div class="note-title-row">
<div style="display: flex; align-items: center;">
<div class="dropdown hide-toggle">
<div class="dropdown hide-in-zen-mode">
<button class="btn btn-sm dropdown-toggle note-path-list-button" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="note-path-count">1 path</span>
@ -12,9 +12,9 @@
<input autocomplete="off" value="" class="note-title" tabindex="1">
<span class="saved-indicator bx bx-check" title="All changes have been saved"></span>
<span class="saved-indicator hide-in-zen-mode bx bx-check" title="All changes have been saved"></span>
<div class="hide-toggle" style="display: flex; align-items: center;">
<div class="hide-in-zen-mode" style="display: flex; align-items: center;">
<button class="btn btn-sm icon-button bx bx-play-circle render-button"
style="display: none; margin-right: 10px;"
title="Render"></button>