patch removal and help commands + separate focus mode into an extension

This commit is contained in:
dragonwocky 2020-08-11 11:16:23 +10:00
parent 7b06843fe1
commit 18f24804d2
Signed by: dragonwocky
GPG Key ID: C7A48B7846AA706D
10 changed files with 56 additions and 27 deletions

View File

@ -9,15 +9,21 @@ complete rewrite with node.js.
- new: simpler cli installation system (inc. commands: `apply`, `remove`, and `check`). - new: simpler cli installation system (inc. commands: `apply`, `remove`, and `check`).
- new: mod loading system (easier to create new mods, adds to notion rather than overwriting). - new: mod loading system (easier to create new mods, adds to notion rather than overwriting).
- new: mod configuration menu.
- improved: more theming variable coverage - inc. light theme and sizing/spacing.
- bugfix: non-reproducable errors with python. - bugfix: non-reproducable errors with python.
- bugfix: better launcher patching on linux. - bugfix: better launcher patching on linux.
- bugfix: fix frameless window issue introduced by notion desktop 2.0.9.
- extension: "custom inserts" = link files for small client-side tweaks..
- extension: "bracketed links" = render links surrounded with \[\[brackets]] instead of underlined.
- extension: "focus mode" = hide the titlebar/menubar when the sidebar is closed (will be shown on hover).
- theme: "neutral" = smoother colours and fonts, designed to be more pleasing to the eye.
- theme: "dark+" = a vivid-colour near-black theme.
//todo //todo
- improved: greater choice of emoji sets. - extension: "emojiset" = pick from a variety of emoji styles to use.
- improved: better colour coverage for theming variables. - extension: "night light" = sync dark/light theme with the system.
- new: menu for configuring mods.
- new: syncing dark/light theme with the system.
### v0.7.0 (2020-07-09) ### v0.7.0 (2020-07-09)

View File

@ -13,7 +13,7 @@ want to contribute? check the the [contribution guidelines](CONTRIBUTING.md).
## installation ## installation
1. install node.js: [windows/macOS](https://nodejs.org/en/download/), [linux/WSL](https://github.com/mklement0/n-install). 1. install node.js: [windows/macOS](https://nodejs.org/en/download/), [linux/WSL](https://github.com/mklement0/n-install).
if on windows, the next steps will need to be done in the newly installed "node.js command prompt". a computer restart may be required here.
2. install notion-enhancer globally via yarn or npm: 2. install notion-enhancer globally via yarn or npm:
`npm i -g notion-enhancer` or `yarn global add notion-enhancer` `npm i -g notion-enhancer` or `yarn global add notion-enhancer`
3. ensure no notion processes are running (you may want to check the task manager to make sure), 3. ensure no notion processes are running (you may want to check the task manager to make sure),

2
bin.js
View File

@ -8,7 +8,7 @@
'use strict'; 'use strict';
const cli = require('cac')(), const cli = require('cac')('notion-enhancer'),
{ EnhancerError } = require('./pkg/helpers.js'); { EnhancerError } = require('./pkg/helpers.js');
// === title === // === title ===

View File

@ -2,7 +2,6 @@
* notion-enhancer * notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/) * (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 TarasokUA * (c) 2020 TarasokUA
* (c) 2020 Arecsu
* under the MIT license * under the MIT license
*/ */
@ -46,19 +45,3 @@
justify-content: flex-end; justify-content: flex-end;
} }
} }
/* hide topbar when sidebar is hidden */
.notion-sidebar-container[style*='width: 0px;'] + .notion-frame {
height: calc(
100% - (var(--configured-dragarea_height, 10px) + 45px)
) !important;
}
.notion-sidebar-container[style*='width: 0px;'] + .notion-frame .notion-topbar {
opacity: 0 !important;
transition: opacity 200ms ease-in-out !important;
}
.notion-sidebar-container[style*='width: 0px;']
+ .notion-frame
.notion-topbar:hover {
opacity: 1 !important;
}

18
mods/focus-mode/mod.js Normal file
View File

@ -0,0 +1,18 @@
/*
* focus mode
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 Arecsu
* under the MIT license
*/
'use strict';
module.exports = {
id: '5a08598d-bfac-4167-9ae8-2bd0e2ef141e',
tags: ['extension'],
name: 'focus mode',
desc:
'hide the titlebar/menubar when the sidebar is closed (will be shown on hover).',
version: '0.0.1',
author: 'arecsu',
};

View File

@ -0,0 +1,21 @@
/*
* focus mode
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 Arecsu
* under the MIT license
*/
.notion-sidebar-container[style*='width: 0px;'] + .notion-frame {
height: calc(
100% - (var(--configured-dragarea_height, 10px) + 45px)
) !important;
}
.notion-sidebar-container[style*='width: 0px;'] + .notion-frame .notion-topbar {
opacity: 0 !important;
transition: opacity 200ms ease-in-out !important;
}
.notion-sidebar-container[style*='width: 0px;']
+ .notion-frame
.notion-topbar:hover {
opacity: 1 !important;
}

View File

@ -1,6 +1,7 @@
/* /*
* neutral * neutral
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/) * (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 Arecsu
* under the MIT license * under the MIT license
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* notion-enhancer * neutral
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/) * (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 Arecsu * (c) 2020 Arecsu
* under the MIT license * under the MIT license
@ -36,7 +36,7 @@
--theme_dark--font-heading1_size: 33px; --theme_dark--font-heading1_size: 33px;
--theme_dark--font-heading2_size: 25.3px; --theme_dark--font-heading2_size: 25.3px;
--theme_dark--font-heading3_size: 19.5px; --theme_dark--font-heading3_size: 19.5px;
--theme_dark--font-label_size: 15px; --theme_dark--font-label_size: 13.5px;
--theme_dark--font-body_size: 15px; --theme_dark--font-body_size: 15px;
--theme_dark--font-code_size: 13.5px; --theme_dark--font-code_size: 13.5px;

View File

@ -1,6 +1,6 @@
{ {
"name": "notion-enhancer", "name": "notion-enhancer",
"version": "0.8.0-wip", "version": "0.8.0-beta",
"description": "an enhancer/customiser for the all-in-one productivity workspace notion.so", "description": "an enhancer/customiser for the all-in-one productivity workspace notion.so",
"main": "index.js", "main": "index.js",
"bin": { "bin": {

View File

@ -98,7 +98,7 @@ function getNotion() {
fs.pathExistsSync(path.resolve(`${folder}/app`))) fs.pathExistsSync(path.resolve(`${folder}/app`)))
) )
) { ) {
const asar_bak = path.resolve(`${__notion}/app.asar.bak`); const asar_bak = path.resolve(`${folder}/app.asar.bak`);
if (fs.pathExistsSync(asar_bak)) { if (fs.pathExistsSync(asar_bak)) {
fs.moveSync(asar_bak, app_asar); fs.moveSync(asar_bak, app_asar);
} else } else