diff --git a/README.md b/README.md index fec6d46..c60dd49 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ want to contribute? check the the [contribution guidelines](CONTRIBUTING.md). ## installation 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". 2. install notion-enhancer globally via yarn or npm: `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), diff --git a/bin.js b/bin.js index bd9ae83..00d295c 100644 --- a/bin.js +++ b/bin.js @@ -22,7 +22,7 @@ const cli = require('cac')(), cli.option('-y, --yes', ': skip prompts (may overwrite data)'); cli - .command('apply', ': add enhancements to the notion app') + .command('apply', ': add the enhancer to the notion app') .action(async (options) => { console.info('=== NOTION ENHANCEMENT LOG ==='); await require('./pkg/apply.js')(); diff --git a/mods/core/css/menu.css b/mods/core/css/menu.css index e2aa25c..e48b0c9 100644 --- a/mods/core/css/menu.css +++ b/mods/core/css/menu.css @@ -212,6 +212,7 @@ s { padding: 0.2em 0.5em; margin-top: 0.5em; background: var(--theme_local--card); + color: var(--theme_local--overlay); border-radius: 2px; transition: background 200ms; user-select: none; diff --git a/pkg/apply.js b/pkg/apply.js index 1122a57..ebe16db 100644 --- a/pkg/apply.js +++ b/pkg/apply.js @@ -9,8 +9,7 @@ const fs = require('fs-extra'), path = require('path'), { readdirIterator } = require('readdir-enhanced'), - { promisify } = require('util'), - { exec } = require('child_process'), + { extractAll } = require('asar'), helpers = require('./helpers.js'), { version } = require('../package.json'); @@ -57,13 +56,8 @@ module.exports = async function ({ overwrite_version } = {}) { }); } console.info(' ...unpacking app.asar'); - const asar_app = path.resolve(`${__notion}/app.asar`), - asar_exec = path.resolve(`${__dirname}/../node_modules/asar/bin/asar.js`); - await promisify(exec)( - `"${asar_exec}" extract "${asar_app}" "${path.resolve( - `${__notion}/app` - )}"` - ); + const asar_app = path.resolve(`${__notion}/app.asar`); + extractAll(asar_app, `${path.resolve(`${__notion}/app`)}`); fs.move(asar_app, path.resolve(`${__notion}/app.asar.bak`)); // patching launch script target of custom wrappers