Merge branch 'dev' into dracula_theme
16
CHANGELOG.md
@ -16,17 +16,29 @@ a flexibility update.
|
||||
variables can be modified.)
|
||||
- new: in-page columns disabled/wrapped and wider pages when the window is narrower than 600px
|
||||
for improved responsiveness.
|
||||
- new: relaunch button in tray menu.
|
||||
- improved: a core mod option to make transitions snappy/0s.
|
||||
- improved: menu will now respect integrated titlebar setting.
|
||||
- improved: use keyup listeners instead of a globalShortcut for the enhancements menu toggle.
|
||||
- bugfix: removed messenger emoji set as the provider no longer supports it.
|
||||
- bugfix: remove shadow around light mode board headers
|
||||
\+ minor text colour fixes for night shift theming.
|
||||
- bugfix: properly detect/respond to `EACCES` errors.
|
||||
- bugfix: properly detect/respond to `EACCES`/`EBUSY` errors.
|
||||
- bugfix: night shift checks every interaction,
|
||||
will respond to system changes without any manual changes.
|
||||
- bugfix: toc blocks can have text colours.
|
||||
- bugfix: bypass preview extension works with the back/forward keyboard shortcuts.
|
||||
- bugfix: (maybe) fix csp issues under proxy.
|
||||
- bugfix: remove focus mode footer from neutral theme.
|
||||
- bugfix: improvements to the colour theming, particularly to make real- and fake-light/dark
|
||||
modes (as applied by the night shift extension) look consistent.
|
||||
- tweak: sticky table/list rows.
|
||||
- extension: "material ocean" = an oceanic colour palette.
|
||||
- theme: "material ocean" = an oceanic colour palette.
|
||||
- theme: "dracula" = a theme based on the popular dracula color palette
|
||||
originally by zeno rocha and friends.
|
||||
- extension: "tabs" = have multiple notion pages open in a single window.
|
||||
|
||||
a fork of notion-deb-builder that does generate an app.asar has been created and is once again supported.
|
||||
|
||||
### v0.9.1 (2020-09-26)
|
||||
|
||||
|
30
README.md
@ -17,6 +17,8 @@ for support, join the [discord server](https://discord.gg/sFWPXtA).
|
||||
- the [official windows/mac releases](https://notion.so/desktop).
|
||||
- the arch linux AUR [notion-app](https://aur.archlinux.org/packages/notion-app/) package.
|
||||
- the linux [notion-app](https://github.com/jaredallard/notion-app) installer.
|
||||
- [@haydn-jones](https://github.com/haydn-jones/)'s fork of the
|
||||
linux [notion-deb-builder](https://github.com/haydn-jones/notion-deb-builder).
|
||||
|
||||
(it can also be run from the wsl to apply enhancements to the windows app.)
|
||||
|
||||
@ -31,10 +33,22 @@ a chrome extension may be coming soon for web client support.
|
||||
|
||||
during installation/removal, make sure no notion processes are running! (check your task manager.)
|
||||
|
||||
**win10, macOS**
|
||||
**win10**
|
||||
|
||||
1. [install node.js](https://nodejs.org/en/download/) (_a computer restart may be required here._)
|
||||
2. execute `npm i -g notion-enhancer` in the terminal/command prompt.
|
||||
[install node.js](https://nodejs.org/en/download/) (_a computer restart may be required here_),
|
||||
then execute `npm i -g notion-enhancer` in the command prompt.
|
||||
|
||||
**macOS**
|
||||
|
||||
[install node.js](https://nodejs.org/en/download/) (_a computer restart may be required here_),
|
||||
then execute the following lines in the terminal:
|
||||
|
||||
```
|
||||
sudo chmod -R a+wr /usr/local/lib/node_modules
|
||||
sudo chmod -R a+wr /usr/local/bin
|
||||
sudo chmod -R a+wr /Applications/Notion/Contents/Resources
|
||||
npm i -g notion-enhancer
|
||||
```
|
||||
|
||||
**debian/ubuntu, chromeOS, WSL (to modify the win10 app)**
|
||||
|
||||
@ -81,6 +95,14 @@ Options:
|
||||
-v, --version : display version number
|
||||
```
|
||||
|
||||
### faq
|
||||
|
||||
**the themes aren't working?**
|
||||
|
||||
if you pick a dark theme it will only be applied if notion is in dark mode,
|
||||
and if you pick a light theme it will only work if notion is in light mode.
|
||||
do `CMD/CTRL+SHIFT+L` to toggle between them.
|
||||
|
||||
**is this against notion's terms of service? can i get in trouble for using it?**
|
||||
|
||||
definitely not! i contacted their support team to check, and the response was awesome:
|
||||
@ -92,7 +114,7 @@ team to take to heart for future improvements."
|
||||
## features
|
||||
|
||||
once applied, modules can be configured via the graphical menu, which is opened from
|
||||
the tray/menubar icon or with `ALT+E`.
|
||||
the tray/menubar icon or with `OPTION/ALT+E`.
|
||||
|
||||

|
||||
|
||||
|
@ -88,7 +88,7 @@ module.exports = (store) => {
|
||||
]()}</button>`;
|
||||
}
|
||||
for (let btn of buttons.insert) {
|
||||
document.querySelector(`.window-button#btn-${btn}`).onclick =
|
||||
buttons.element.querySelector(`.window-button#btn-${btn}`).onclick =
|
||||
buttons.actions[btn];
|
||||
}
|
||||
if (store().frameless && !store().tiling_mode && !is_mac) {
|
||||
|
@ -13,11 +13,18 @@ module.exports = (store, __exports) => {
|
||||
notionIpc = require(`${helpers.__notion.replace(
|
||||
/\\/g,
|
||||
'/'
|
||||
)}/app/helpers/notionIpc.js`);
|
||||
)}/app/helpers/notionIpc.js`),
|
||||
{ toKeyEvent } = require('keyboardevent-from-electron-accelerator');
|
||||
|
||||
// additional hotkeys
|
||||
document.defaultView.addEventListener('keyup', (event) => {
|
||||
if (event.code === 'F5') location.reload();
|
||||
// open menu on hotkey toggle
|
||||
const hotkey = toKeyEvent(store().menu_toggle);
|
||||
let triggered = true;
|
||||
for (let prop in hotkey)
|
||||
if (hotkey[prop] !== event[prop]) triggered = false;
|
||||
if (triggered) electron.ipcRenderer.send('enhancer:open-menu');
|
||||
});
|
||||
|
||||
const attempt_interval = setInterval(enhance, 500);
|
||||
@ -36,13 +43,12 @@ module.exports = (store, __exports) => {
|
||||
document.body.classList.add('snappy-transitions');
|
||||
|
||||
// frameless
|
||||
if (store().frameless && !store().tiling_mode) {
|
||||
if (store().frameless && !store().tiling_mode && !store().tabs) {
|
||||
document.body.classList.add('frameless');
|
||||
// draggable area
|
||||
const dragarea = helpers.createElement(
|
||||
'<div class="window-dragarea"></div>'
|
||||
);
|
||||
document.querySelector('.notion-topbar').prepend(dragarea);
|
||||
document
|
||||
.querySelector('.notion-topbar')
|
||||
.prepend(helpers.createElement('<div class="window-dragarea"></div>'));
|
||||
document.documentElement.style.setProperty(
|
||||
'--configured--dragarea_height',
|
||||
`${store().dragarea_height + 2}px`
|
||||
@ -50,10 +56,12 @@ module.exports = (store, __exports) => {
|
||||
}
|
||||
|
||||
// window buttons
|
||||
if (!store().tabs) {
|
||||
const buttons = require('./buttons.js')(store);
|
||||
document
|
||||
.querySelector('.notion-topbar > div[style*="display: flex"]')
|
||||
.appendChild(buttons.element);
|
||||
}
|
||||
document
|
||||
.querySelector('.notion-history-back-button')
|
||||
.parentElement.nextElementSibling.classList.add(
|
||||
@ -68,7 +76,7 @@ module.exports = (store, __exports) => {
|
||||
document.querySelector('.notion-app-inner')
|
||||
).getPropertyValue(prop);
|
||||
|
||||
// ctrl+f theming
|
||||
// external theming
|
||||
document.defaultView.addEventListener('keydown', (event) => {
|
||||
if ((event.ctrlKey || event.metaKey) && event.key === 'f') {
|
||||
notionIpc.sendNotionToIndex('search:set-theme', {
|
||||
@ -97,10 +105,9 @@ module.exports = (store, __exports) => {
|
||||
}
|
||||
});
|
||||
|
||||
// enhancer menu
|
||||
function setThemeVars() {
|
||||
electron.ipcRenderer.send(
|
||||
'enhancer:set-theme-vars',
|
||||
'enhancer:set-menu-theme',
|
||||
[
|
||||
'--theme--main',
|
||||
'--theme--sidebar',
|
||||
@ -135,28 +142,54 @@ module.exports = (store, __exports) => {
|
||||
'--theme--select_red',
|
||||
'--theme--line_text',
|
||||
'--theme--line_yellow',
|
||||
'--theme--line_yellow-text',
|
||||
'--theme--line_green',
|
||||
'--theme--line_green-text',
|
||||
'--theme--line_blue',
|
||||
'--theme--line_blue-text',
|
||||
'--theme--line_red',
|
||||
'--theme--line_red-text',
|
||||
'--theme--code_inline-text',
|
||||
'--theme--code_inline-background',
|
||||
].map((rule) => [rule, getStyle(rule)])
|
||||
);
|
||||
if (store().tabs) {
|
||||
electron.ipcRenderer.sendToHost(
|
||||
'enhancer:set-tab-theme',
|
||||
[
|
||||
'--theme--main',
|
||||
'--theme--dragarea',
|
||||
'--theme--font_sans',
|
||||
'--theme--table-border',
|
||||
'--theme--interactive_hover',
|
||||
'--theme--interactive_hover-border',
|
||||
'--theme--button_close',
|
||||
'--theme--button_close-fill',
|
||||
'--theme--option_active-background',
|
||||
'--theme--selected',
|
||||
'--theme--text',
|
||||
].map((rule) => [rule, getStyle(rule)])
|
||||
);
|
||||
}
|
||||
}
|
||||
setThemeVars();
|
||||
const theme_observer = new MutationObserver(setThemeVars);
|
||||
theme_observer.observe(document.querySelector('.notion-app-inner'), {
|
||||
attributes: true,
|
||||
});
|
||||
electron.ipcRenderer.on('enhancer:get-theme-vars', setThemeVars);
|
||||
new MutationObserver(setThemeVars).observe(
|
||||
document.querySelector('.notion-app-inner'),
|
||||
{ attributes: true }
|
||||
);
|
||||
electron.ipcRenderer.on('enhancer:get-menu-theme', setThemeVars);
|
||||
|
||||
const sidebar_observer = new MutationObserver(setSidebarWidth);
|
||||
sidebar_observer.observe(document.querySelector('.notion-sidebar'), {
|
||||
attributes: true,
|
||||
});
|
||||
if (store().tabs) {
|
||||
let tab_title = '';
|
||||
__electronApi.setWindowTitle = (title) => {
|
||||
if (tab_title !== title) {
|
||||
tab_title = title;
|
||||
electron.ipcRenderer.sendToHost('enhancer:set-tab-title', title);
|
||||
}
|
||||
};
|
||||
} else if (store().frameless && !store().tiling_mode) {
|
||||
let sidebar_width;
|
||||
function setSidebarWidth(list) {
|
||||
if (!store().frameless && store().tiling_mode) return;
|
||||
const new_sidebar_width =
|
||||
list[0].target.style.height === 'auto'
|
||||
? '0px'
|
||||
@ -169,6 +202,11 @@ module.exports = (store, __exports) => {
|
||||
);
|
||||
}
|
||||
}
|
||||
new MutationObserver(setSidebarWidth).observe(
|
||||
document.querySelector('.notion-sidebar'),
|
||||
{ attributes: true }
|
||||
);
|
||||
setSidebarWidth([{ target: document.querySelector('.notion-sidebar') }]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -52,6 +52,18 @@ module.exports = (store, __exports) => {
|
||||
},
|
||||
...rect,
|
||||
});
|
||||
electron.session
|
||||
.fromPartition('persist:notion')
|
||||
.webRequest.onHeadersReceived((details, callback) => {
|
||||
callback({
|
||||
responseHeaders: {
|
||||
...details.responseHeaders,
|
||||
'Content-Security-Policy': [
|
||||
"script-src 'self' 'unsafe-inline' 'unsafe-eval' enhancement: https://gist.github.com https://apis.google.com https://api.amplitude.com https://widget.intercom.io https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com https://analytics.pgncs.notion.so https://checkout.stripe.com https://embed.typeform.com https://admin.typeform.com https://platform.twitter.com https://cdn.syndication.twimg.com; connect-src 'self' https://msgstore.www.notion.so wss://msgstore.www.notion.so https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com https://api.segment.io https://api.pgncs.notion.so https://checkout.stripe.com https://cdn.contentful.com https://preview.contentful.com https://images.ctfassets.net https://api.unsplash.com https://boards-api.greenhouse.io; font-src 'self' data: https://cdnjs.cloudflare.com https://js.intercomcdn.com; img-src 'self' data: blob: https: https://platform.twitter.com https://syndication.twitter.com https://pbs.twimg.com https://ton.twimg.com; style-src 'self' 'unsafe-inline' enhancement: https://cdnjs.cloudflare.com https://github.githubassets.com https://platform.twitter.com https://ton.twimg.com; frame-src https: http:; media-src https: http:",
|
||||
],
|
||||
},
|
||||
});
|
||||
});
|
||||
window.once('ready-to-show', function () {
|
||||
if (
|
||||
!store().openhidden ||
|
||||
|
@ -50,11 +50,11 @@ body:not([style]) > * {
|
||||
body:not([style])::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 44vw;
|
||||
top: calc(50% - 7.5vw);
|
||||
width: 10vw;
|
||||
height: 10vw;
|
||||
border: 4px solid rgb(34, 34, 34);
|
||||
left: calc(50% - 13px);
|
||||
top: calc(50% + 10px);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border: 4px solid rgb(34, 34, 34, 0.5);
|
||||
border-top-color: transparent;
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
@ -93,7 +93,7 @@ s {
|
||||
|
||||
/* titlebar */
|
||||
|
||||
#menu-titlebar::before {
|
||||
#titlebar::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
@ -103,20 +103,18 @@ s {
|
||||
height: 2px;
|
||||
}
|
||||
|
||||
#menu-titlebar {
|
||||
#titlebar {
|
||||
display: flex;
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
#menu-titlebar button {
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
#menu-titlebar {
|
||||
background: var(--theme--dragarea);
|
||||
}
|
||||
#menu-titlebar > .window-buttons-area {
|
||||
#titlebar button {
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
#titlebar .window-buttons-area {
|
||||
margin: 0.4em 0.4em 0.4em auto;
|
||||
}
|
||||
#menu-titlebar > .window-buttons-area:empty {
|
||||
#titlebar .window-buttons-area:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@ -148,6 +146,7 @@ s {
|
||||
color: var(--theme--select_red);
|
||||
}
|
||||
#alerts .error {
|
||||
color: var(--theme--line_red-text);
|
||||
background: var(--theme--line_red);
|
||||
border-color: var(--theme--select_red);
|
||||
}
|
||||
@ -155,6 +154,7 @@ s {
|
||||
color: var(--theme--select_yellow);
|
||||
}
|
||||
#alerts .warning {
|
||||
color: var(--theme--line_yellow-text);
|
||||
background: var(--theme--line_yellow);
|
||||
border-color: var(--theme--select_yellow);
|
||||
}
|
||||
@ -162,6 +162,7 @@ s {
|
||||
color: var(--theme--select_blue);
|
||||
}
|
||||
#alerts .info {
|
||||
color: var(--theme--line_blue-text);
|
||||
background: var(--theme--line_blue);
|
||||
border-color: var(--theme--select_blue);
|
||||
}
|
||||
@ -170,6 +171,7 @@ s {
|
||||
color: var(--theme--select_green);
|
||||
}
|
||||
#alerts .success {
|
||||
color: var(--theme--line_green-text);
|
||||
background: var(--theme--line_green);
|
||||
border-color: var(--theme--select_green);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
.smooth-scrollbars ::-webkit-scrollbar {
|
||||
width: 8px; /* vertical */
|
||||
height: 8px; /* horizontal */
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
.smooth-scrollbars ::-webkit-scrollbar-corner {
|
||||
background-color: transparent; /* overlap */
|
||||
|
178
mods/core/css/tabs.css
Normal file
@ -0,0 +1,178 @@
|
||||
/*
|
||||
* notion-enhancer
|
||||
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
|
||||
* under the MIT license
|
||||
*/
|
||||
|
||||
@import './buttons.css';
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
word-break: break-word;
|
||||
text-decoration: none;
|
||||
text-size-adjust: 100%;
|
||||
font-family: var(--theme--font_sans) !important;
|
||||
outline-color: var(--theme--table-border);
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@keyframes tabSlideIn {
|
||||
from {
|
||||
width: 0;
|
||||
}
|
||||
to {
|
||||
width: 8.5em;
|
||||
}
|
||||
}
|
||||
|
||||
body:not([style*='--theme']):not(.error) > * {
|
||||
opacity: 0;
|
||||
}
|
||||
body:not([style*='--theme']):not(.error)::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: calc(50% - 15px);
|
||||
top: calc(50% + 10px);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border: 4px solid rgb(34, 34, 34, 0.5);
|
||||
border-top-color: transparent;
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
}
|
||||
body[style*='--theme']::after {
|
||||
z-index: 1;
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: calc(50% - 15px);
|
||||
top: calc(50% + 10px);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
opacity: 0.5;
|
||||
border: 4px solid var(--theme--text);
|
||||
border-top-color: transparent;
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
background: var(--theme--main) !important;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
#root {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#titlebar::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
-webkit-app-region: no-drag;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 2px;
|
||||
}
|
||||
#titlebar {
|
||||
display: flex;
|
||||
flex-shrink: 1;
|
||||
user-select: none;
|
||||
-webkit-app-region: drag;
|
||||
background: var(--theme--dragarea);
|
||||
}
|
||||
#titlebar button {
|
||||
color: var(--theme--text);
|
||||
-webkit-app-region: no-drag;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
#titlebar .window-buttons-area {
|
||||
margin: 0.5em 0.55em 0.5em auto;
|
||||
}
|
||||
#titlebar .window-buttons-area:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#open-enhancer-menu::before {
|
||||
content: '';
|
||||
height: 1.25em;
|
||||
width: 1.25em;
|
||||
display: inline-block;
|
||||
margin: auto 1em -0.25em 1em;
|
||||
background-size: contain;
|
||||
background-image: url('enhancement://core/icons/mac+linux.png');
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
#tabs {
|
||||
margin-top: auto;
|
||||
}
|
||||
#tabs .tab {
|
||||
display: inline-flex;
|
||||
background: var(--theme--main);
|
||||
border: none;
|
||||
font-size: 1.15em;
|
||||
padding: 0.2em 0.4em;
|
||||
text-align: left;
|
||||
border-bottom: 4px solid var(--theme--table-border);
|
||||
opacity: 0.8;
|
||||
}
|
||||
#tabs .tab:first-child {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
#tabs .tab:not(.new) span:not(.close) {
|
||||
width: 8.5em;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
#tabs .tab.slideIn span:not(.close) {
|
||||
animation: tabSlideIn 100ms ease-in-out;
|
||||
}
|
||||
#tabs .tab .close {
|
||||
padding: 0 0.35em 0.1em 0.3em;
|
||||
margin-left: auto;
|
||||
font-weight: bold;
|
||||
}
|
||||
#tabs .tab.current {
|
||||
opacity: 1;
|
||||
background: var(--theme--selected);
|
||||
border-bottom: 4px solid var(--theme--option_active-background);
|
||||
}
|
||||
#tabs .tab.new {
|
||||
background: none;
|
||||
border: none;
|
||||
margin-left: -0.1em;
|
||||
}
|
||||
#tabs .tab.new span {
|
||||
padding: 0 0.35em 0.1em 0.3em;
|
||||
font-weight: bold;
|
||||
}
|
||||
#tabs .tab:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
#tabs .tab .close:hover,
|
||||
#tabs .tab.new span:hover {
|
||||
background: var(--theme--table-border);
|
||||
border-radius: 5px;
|
||||
}
|
||||
#tabs .tab.dragged-over {
|
||||
box-shadow: inset 4px 0 0 0 var(--theme--selected);
|
||||
}
|
||||
|
||||
.notion {
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: none;
|
||||
}
|
@ -9,20 +9,25 @@
|
||||
|
||||
/** app **/
|
||||
|
||||
.notion-body,
|
||||
.notion-body.dark [style*='background: rgb(47, 52, 55)'],
|
||||
.notion-body.dark [style*='background-color: rgb(47, 52, 55)'],
|
||||
.notion-body:not(.dark)
|
||||
.notion-light-theme
|
||||
[style*='background: white']:not(.notion-help-button),
|
||||
.notion-body:not(.dark)
|
||||
.notion-dark-theme
|
||||
[style*='background: white']:not(.notion-help-button):not([style*='box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;']),
|
||||
.notion-body:not(.dark) [style*='background-color: white'] {
|
||||
background: var(--theme--main) !important;
|
||||
}
|
||||
.notion-sidebar > div,
|
||||
.notion-body.dark [style*='background: rgb(55, 60, 63)'],
|
||||
.notion-body.dark [style*='background: rgb(120, 123, 123)'],
|
||||
.notion-body:not(.dark) [style*='background: rgb(247, 246, 243)'],
|
||||
.notion-body:not(.dark) [style*='background: rgb(223, 223, 222)'] {
|
||||
background: var(--theme--sidebar) !important;
|
||||
}
|
||||
.notion-body,
|
||||
.notion-body.dark [style*='background: rgb(47, 52, 55)'],
|
||||
.notion-body.dark [style*='background-color: rgb(47, 52, 55)'],
|
||||
.notion-body:not(.dark)
|
||||
[style*='background: white']:not(.notion-help-button):not([style*='box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;']),
|
||||
.notion-body:not(.dark) [style*='background-color: white'] {
|
||||
background: var(--theme--main) !important;
|
||||
}
|
||||
[style*='background: rgba(15, 15, 15, 0.6)'] {
|
||||
background: var(--theme--overlay) !important;
|
||||
}
|
||||
@ -147,7 +152,8 @@
|
||||
[style*='SFMono-Regular'] {
|
||||
font-family: var(--theme--font_code) !important;
|
||||
}
|
||||
.notion-frame .notion-page-block div[placeholder='Untitled'] {
|
||||
.notion-frame .notion-page-block div[placeholder='Untitled'],
|
||||
.notion-overlay-container .notion-page-block div[placeholder='Untitled']{
|
||||
font-size: calc(
|
||||
var(--theme--font_body-size) * (var(--theme--font_heading1-size) / 1em)
|
||||
) !important;
|
||||
@ -167,15 +173,16 @@
|
||||
var(--theme--font_body-size) * (var(--theme--font_heading3-size) / 1em)
|
||||
) !important;
|
||||
}
|
||||
.notion-frame .notion-scroller.vertical.horizontal [style*='font-size: 14px'] {
|
||||
.notion-frame .notion-scroller.vertical.horizontal [style*='font-size: 14px'],
|
||||
.notion-overlay-container .notion-scroller.vertical [style*='font-size: 14px']{
|
||||
font-size: var(--theme--font_label-size) !important;
|
||||
}
|
||||
.notion-frame .notion-scroller.vertical.horizontal .notion-page-content {
|
||||
.notion-frame .notion-scroller.vertical.horizontal .notion-page-content,
|
||||
.notion-overlay-container .notion-scroller.vertical .notion-page-content {
|
||||
font-size: var(--theme--font_body-size) !important;
|
||||
}
|
||||
.notion-frame
|
||||
.notion-scroller.vertical.horizontal
|
||||
.notion-page-content[style*='font-size: 14px'] {
|
||||
.notion-frame .notion-scroller.vertical.horizontal .notion-page-content[style*='font-size: 14px'],
|
||||
.notion-overlay-container .notion-scroller.vertical .notion-page-content[style*='font-size: 14px'] {
|
||||
font-size: var(--theme--font_body-size_small) !important;
|
||||
}
|
||||
.notion-code-block [placeholder=' '] {
|
||||
@ -195,7 +202,8 @@
|
||||
> a[style*='background: white'],
|
||||
.notion-body:not(.dark) [style*='background: rgb(247, 246, 243)'],
|
||||
.notion-body:not(.dark)
|
||||
[style*='box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;'] {
|
||||
.notion-dark-theme
|
||||
[style*='background: white'][style*='box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;'] {
|
||||
background: var(--theme--card) !important;
|
||||
}
|
||||
.notion-body.dark
|
||||
@ -206,19 +214,36 @@
|
||||
[style*='background: rgba(55, 53, 47, 0.024)'] {
|
||||
background: var(--theme--gallery) !important;
|
||||
}
|
||||
.notion-body.dark .notion-scroller > [style*='rgb(55, 60, 63)'],
|
||||
.notion-body:not(.dark) [style*='background: rgba(242, 241, 238, 0.6)'] {
|
||||
background: var(--theme--select_input) !important;
|
||||
}
|
||||
|
||||
.notion-body.dark
|
||||
[style*='box-shadow: rgba(15, 15, 15, 0.2) 0px 0px 0px 1px, rgba(15, 15, 15, 0.2) 0px 2px 4px'],
|
||||
[style*='box-shadow: rgba(255, 255, 255, 0.14) 0px -1px inset;'],
|
||||
.notion-body:not(.dark)
|
||||
.notion-dark-theme
|
||||
[style*='box-shadow: white -3px 0px 0px'] {
|
||||
box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px,
|
||||
rgba(15, 15, 15, 0.1) 0px 2px 4px !important;
|
||||
[style*='box-shadow: rgba(55, 53, 47, 0.16) 0px -1px 0px inset'] {
|
||||
box-shadow: rgba(55, 53, 47, 0.16) 0px -1px inset !important;
|
||||
}
|
||||
|
||||
.notion-body.dark [style*='box-shadow: rgba(255, 255, 255, 0.07) 0px 1px 0px'],
|
||||
.notion-body:not(.dark)
|
||||
[style*='box-shadow: rgba(55, 53, 47, 0.09) 0px 1px 0px'] {
|
||||
box-shadow: var(--theme--ui-border) 0px 1px 0px !important;
|
||||
}
|
||||
.notion-body.dark
|
||||
[style*='box-shadow: rgba(255, 255, 255, 0.14) 0px 1px 0px inset'],
|
||||
.notion-body:not(.dark)
|
||||
[style*='box-shadow: rgba(55, 53, 47, 0.16) 0px 1px 0px inset'] {
|
||||
box-shadow: var(--theme--table-border) 0px 1px 0px inset !important;
|
||||
}
|
||||
|
||||
.notion-body.dark [style*='box-shadow: rgb(47, 52, 55) -3px 0px 0px'] {
|
||||
box-shadow: var(--theme--main) -3px 0px 0px !important;
|
||||
}
|
||||
.notion-body:not(.dark) [style*='box-shadow: white -3px 0px 0px;'] {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.notion-body.dark
|
||||
[style*='box-shadow: rgb(47, 52, 55) -3px 0px 0px, rgba(255, 255, 255, 0.14) 0px 1px 0px'],
|
||||
.notion-body:not(.dark)
|
||||
@ -226,7 +251,7 @@
|
||||
.notion-body:not(.dark)
|
||||
[style*='box-shadow: rgba(255, 255, 255, 0.07) 0px -1px 0px'] {
|
||||
box-shadow: var(--theme--main) -3px 0px 0px,
|
||||
var(--theme--table-border) 0px 1px 0px !important;
|
||||
var(--theme--ui-border) 0px 1px 0px !important;
|
||||
}
|
||||
|
||||
.notion-body.dark [style*='border-top: 1px solid rgba(255, 255, 255,'],
|
||||
@ -254,7 +279,7 @@
|
||||
.notion-body.dark [style*='box-shadow: rgba(55, 53, 47, 0.09) 0px -1px 0px'],
|
||||
.notion-body:not(.dark)
|
||||
[style*='box-shadow: rgba(55, 53, 47, 0.09) 0px -1px 0px'] {
|
||||
box-shadow: var(--theme--table-border) 0px -1px 0px !important;
|
||||
box-shadow: var(--theme--ui-border) 0px -1px 0px !important;
|
||||
}
|
||||
.notion-body.dark [style*='border-left: 1px solid rgba(255, 255, 255,'],
|
||||
.notion-body.dark
|
||||
@ -263,12 +288,6 @@
|
||||
.notion-body:not(.dark) [style*='border-left: 1px solid rgba(55, 53, 47,'] {
|
||||
border-left: 1px solid var(--theme--table-border) !important;
|
||||
}
|
||||
.notion-body.dark
|
||||
[style*='box-shadow: rgba(255, 255, 255, 0.14) 0px 1px 0px inset'],
|
||||
.notion-body:not(.dark)
|
||||
[style*='box-shadow: rgba(55, 53, 47, 0.16) 0px 1px 0px inset'] {
|
||||
box-shadow: var(--theme--table-border) 0px 1px 0px inset !important;
|
||||
}
|
||||
.notion-body.dark
|
||||
[style*='box-shadow: rgba(255, 255, 255, 0.14) 1px 0px 0px inset'],
|
||||
.notion-body:not(.dark)
|
||||
@ -296,6 +315,7 @@
|
||||
.notion-body.dark [style*='background: rgb(71, 76, 80)'],
|
||||
.notion-body.dark [style*='background: rgb(80, 85, 88)'],
|
||||
.notion-body.dark [style*='background: rgb(98, 102, 104)'],
|
||||
.notion-body.dark [style*='height: 1px; background: rgba(255, 255, 255, 0.07)'],
|
||||
.notion-body:not(.dark) [style*='background: rgba(55, 53, 47,'],
|
||||
.notion-body:not(.dark) [style*='background: rgb(239, 239, 238)'],
|
||||
.notion-body:not(.dark) [style*='background: rgba(206, 205, 202, 0.5)'] {
|
||||
@ -395,6 +415,19 @@
|
||||
background: var(--theme--primary_indicator) !important;
|
||||
}
|
||||
|
||||
.notion-body.dark
|
||||
[style*='box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.2) 0px 3px 6px, rgba(15, 15, 15, 0.4) 0px 9px 24px'],
|
||||
.notion-body:not(.dark)
|
||||
[style*='box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px'] {
|
||||
box-shadow: var(--theme--box-shadow_strong) !important;
|
||||
}
|
||||
.notion-body.dark
|
||||
[style*='box-shadow: rgba(15, 15, 15, 0.2) 0px 0px 0px 1px, rgba(15, 15, 15, 0.2) 0px 2px 4px'],
|
||||
.notion-body:not(.dark)
|
||||
[style*='box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 2px 4px'] {
|
||||
box-shadow: var(--theme--box-shadow) !important;
|
||||
}
|
||||
|
||||
.notion-to_do-block > div [role='button']:hover,
|
||||
.notion-to_do-block > div [role='button']:hover .checkboxSquare,
|
||||
.notion-to_do-block > div [role='button']:hover .check {
|
||||
@ -444,18 +477,38 @@
|
||||
.notion-body:not(.dark) [style*='color: rgba(25, 23, 17, 0.6)'] {
|
||||
color: var(--theme--text_ui) !important;
|
||||
}
|
||||
::placeholder {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
::placeholder,
|
||||
[style*='-webkit-text-fill-color:'],
|
||||
.notion-body.dark [style*='color: rgba(255, 255, 255, 0.4)'],
|
||||
.notion-body:not(.dark) [style*='color: rgba(55, 53, 47, 0.4)'] {
|
||||
.notion-body.dark [style*='color: rgba(255, 255, 255, 0.4)']::before,
|
||||
.notion-body:not(.dark) [style*='color: rgba(55, 53, 47, 0.4)'],
|
||||
.notion-body:not(.dark) [style*='color: rgba(55, 53, 47, 0.4)']::before {
|
||||
color: var(--theme--text_ui_info) !important;
|
||||
-webkit-text-fill-color: var(--theme--text_ui_info) !important;
|
||||
}
|
||||
.notion-body.dark [style*='fill: rgb(202, 204, 206)'] {
|
||||
fill: var(--theme--text) !important;
|
||||
}
|
||||
.notion-body.dark [style*='fill: rgba(202, 204, 206,'],
|
||||
|
||||
.notion-body.dark [style*='fill: rgba(255, 255, 255, 0.6)'],
|
||||
.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.8)'],
|
||||
.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47,'] {
|
||||
.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.6)'],
|
||||
.notion-body:not(.dark) [style*='fill: rgba(25, 23, 17, 0.6)'] {
|
||||
fill: var(--theme--text_ui) !important;
|
||||
}
|
||||
.notion-body.dark [style*='fill: rgba(202, 204, 206, 0.6)'],
|
||||
.notion-body.dark [style*='fill: rgba(202, 204, 206, 0.4)'],
|
||||
.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.4)'],
|
||||
.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.3)'] {
|
||||
fill: var(--theme--text_ui_info) !important;
|
||||
}
|
||||
.notion-body.dark [style*='border-color:rgba(255,255,255,0.4);opacity:0.7'],
|
||||
.notion-body:not(.dark) [style*='border-color:rgba(55,53,47,0.4);opacity:0.7'] {
|
||||
border-color: var(--theme--text_ui_info) !important;
|
||||
}
|
||||
.notion-body.dark [style*='caret-color: rgba(255, 255, 255, 0.9)'],
|
||||
.notion-body:not(.dark) [style*='caret-color: rgb(55, 53, 47)'] {
|
||||
caret-color: var(--theme--text) !important;
|
||||
|
@ -14,6 +14,10 @@
|
||||
--theme_dark--sidebar: rgb(55, 60, 63);
|
||||
--theme_dark--overlay: rgba(15, 15, 15, 0.6);
|
||||
--theme_dark--dragarea: #272d2f;
|
||||
--theme_dark--box-shadow: rgba(15, 15, 15, 0.2) 0px 0px 0px 1px,
|
||||
rgba(15, 15, 15, 0.2) 0px 2px 4px;
|
||||
--theme_dark--box-shadow_strong: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px,
|
||||
rgba(15, 15, 15, 0.2) 0px 3px 6px, rgba(15, 15, 15, 0.4) 0px 9px 24px;
|
||||
--theme_dark--page_normal-width: 900px;
|
||||
--theme_dark--page_full-width: 100%;
|
||||
--theme_dark--page-padding: calc(96px + env(safe-area-inset-left));
|
||||
@ -48,7 +52,9 @@
|
||||
|
||||
--theme_dark--card: rgb(63, 68, 71);
|
||||
--theme_dark--gallery: rgba(255, 255, 255, 0.05);
|
||||
--theme_dark--select_input: rgb(55, 60, 63);
|
||||
--theme_dark--table-border: rgba(255, 255, 255, 0.1);
|
||||
--theme_dark--ui-border: rgba(255, 255, 255, 0.07);
|
||||
--theme_dark--interactive_hover: rgb(71, 76, 80);
|
||||
--theme_dark--interactive_hover-border: transparent;
|
||||
--theme_dark--button_close: #e81123;
|
||||
@ -189,6 +195,10 @@
|
||||
--theme_light--sidebar: rgb(247, 246, 243);
|
||||
--theme_light--overlay: rgba(15, 15, 15, 0.6);
|
||||
--theme_light--dragarea: rgba(55, 53, 47, 0.04);
|
||||
--theme_light--box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px,
|
||||
rgba(15, 15, 15, 0.1) 0px 2px 4px;
|
||||
--theme_light--box-shadow_strong: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px,
|
||||
rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;
|
||||
--theme_light--page_normal-width: 900px;
|
||||
--theme_light--page_full-width: 100%;
|
||||
--theme_light--page-padding: calc(96px + env(safe-area-inset-left));
|
||||
@ -223,7 +233,9 @@
|
||||
|
||||
--theme_light--card: rgb(247, 247, 247);
|
||||
--theme_light--gallery: rgba(55, 53, 47, 0.024);
|
||||
--theme_light--select_input: rgba(242, 241, 238, 0.6);
|
||||
--theme_light--table-border: rgba(55, 53, 47, 0.16);
|
||||
--theme_light--ui-border: rgba(55, 53, 47, 0.09);
|
||||
--theme_light--interactive_hover: rgb(239, 239, 239);
|
||||
--theme_light--interactive_hover-border: transparent;
|
||||
--theme_light--button_close: #e81123;
|
||||
@ -247,6 +259,7 @@
|
||||
|
||||
--theme_light--text: rgb(55, 53, 47);
|
||||
--theme_light--text_ui: rgba(55, 53, 47, 0.6);
|
||||
--theme_light--text_ui: rgba(55, 53, 47, 0.6);
|
||||
--theme_light--text_ui_info: rgba(55, 53, 47, 0.4);
|
||||
|
||||
--theme_light--text_gray: rgb(155, 154, 151);
|
||||
@ -364,6 +377,8 @@
|
||||
--theme--sidebar: var(--theme_dark--sidebar);
|
||||
--theme--overlay: var(--theme_dark--overlay);
|
||||
--theme--dragarea: var(--theme_dark--dragarea);
|
||||
--theme--box-shadow: var(--theme_dark--box-shadow);
|
||||
--theme--box-shadow_strong: var(--theme_dark--box-shadow_strong);
|
||||
--theme--page_normal-width: var(--theme_dark--page_normal-width);
|
||||
--theme--page_full-width: var(--theme_dark--page_full-width);
|
||||
--theme--page-padding: var(--theme_dark--page-padding);
|
||||
@ -389,7 +404,9 @@
|
||||
--theme--scrollbar_hover: var(--theme_dark--scrollbar_hover);
|
||||
--theme--card: var(--theme_dark--card);
|
||||
--theme--gallery: var(--theme_dark--gallery);
|
||||
--theme--select_input: var(--theme_dark--select_input);
|
||||
--theme--table-border: var(--theme_dark--table-border);
|
||||
--theme--ui-border: var(--theme_dark--ui-border);
|
||||
--theme--interactive_hover: var(--theme_dark--interactive_hover);
|
||||
--theme--interactive_hover-border: var(
|
||||
--theme_dark--interactive_hover-border
|
||||
@ -524,6 +541,8 @@
|
||||
--theme--sidebar: var(--theme_light--sidebar);
|
||||
--theme--overlay: var(--theme_light--overlay);
|
||||
--theme--dragarea: var(--theme_light--dragarea);
|
||||
--theme--box-shadow: var(--theme_light--box-shadow);
|
||||
--theme--box-shadow_strong: var(--theme_light--box-shadow_strong);
|
||||
--theme--page_normal-width: var(--theme_light--page_normal-width);
|
||||
--theme--page_full-width: var(--theme_light--page_full-width);
|
||||
--theme--page-padding: var(--theme_light--page-padding);
|
||||
@ -549,7 +568,9 @@
|
||||
--theme--scrollbar_hover: var(--theme_light--scrollbar_hover);
|
||||
--theme--card: var(--theme_light--card);
|
||||
--theme--gallery: var(--theme_light--gallery);
|
||||
--theme--select_input: var(--theme_light--select_input);
|
||||
--theme--table-border: var(--theme_light--table-border);
|
||||
--theme--ui-border: var(--theme_light--ui-border);
|
||||
--theme--interactive_hover: var(--theme_light--interactive_hover);
|
||||
--theme--interactive_hover-border: var(
|
||||
--theme_light--interactive_hover-border
|
||||
|
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250" file="currentColor" viewBox="0 0 250 250"><path d="M124.859 234.52L67.5474 135.736H102.683V12.184H147.323V135.736H182.459L124.859 234.52Z" file="currentColor"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250" fill="currentColor" viewBox="0 0 250 250"><path d="M124.859 234.52L67.5474 135.736H102.683V12.184H147.323V135.736H182.459L124.859 234.52Z" fill="currentColor"/></svg>
|
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 231 B |
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250" file="currentColor" viewBox="0 0 250 250"><path d="M102.683 234.52V110.968H67.5474L124.859 12.184L182.459 110.968H147.323V234.52H102.683Z" file="currentColor"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250" fill="currentColor" viewBox="0 0 250 250"><path d="M102.683 234.52V110.968H67.5474L124.859 12.184L182.459 110.968H147.323V234.52H102.683Z" fill="currentColor"/></svg>
|
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 231 B |
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250" file="currentColor" viewBox="0 0 250 250"><path d="M14.7346 227.26V7.03998H235.215V227.26H14.7346ZM46.4546 195.8H203.495V70.48H46.4546V195.8Z" file="currentColor"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250" fill="currentColor" viewBox="0 0 250 250"><path d="M14.7346 227.26V7.03998H235.215V227.26H14.7346ZM46.4546 195.8H203.495V70.48H46.4546V195.8Z" fill="currentColor"/></svg>
|
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250" file="currentColor" viewBox="0 0 250 250"><path d="M16.1311 225.96V76.72H84.5111V8.07999H233.751V157.32H165.371V225.96H16.1311ZM110.771 53.58V76.72H165.371V131.32H207.491V53.58H110.771ZM42.3911 199.96H139.111V122.22H42.3911V199.96Z" file="currentColor"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250" fill="currentColor" viewBox="0 0 250 250"><path d="M16.1311 225.96V76.72H84.5111V8.07999H233.751V157.32H165.371V225.96H16.1311ZM110.771 53.58V76.72H165.371V131.32H207.491V53.58H110.771ZM42.3911 199.96H139.111V122.22H42.3911V199.96Z" fill="currentColor"/></svg>
|
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 325 B |
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250" file="currentColor" viewBox="0 0 250 250"><path d="M17.8021 138.04V106.072H232.074V138.04H17.8021Z" file="currentColor"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250" fill="currentColor" viewBox="0 0 250 250"><path d="M17.8021 138.04V106.072H232.074V138.04H17.8021Z" fill="currentColor"/></svg>
|
Before Width: | Height: | Size: 192 B After Width: | Height: | Size: 192 B |
@ -9,7 +9,7 @@
|
||||
<link rel="stylesheet" href="./css/menu.css" />
|
||||
</head>
|
||||
<body>
|
||||
<header id="menu-titlebar"></header>
|
||||
<header id="titlebar"></header>
|
||||
<main>
|
||||
<div id="alerts"></div>
|
||||
<div id="search">
|
||||
|
@ -10,7 +10,8 @@ const store = require('../../pkg/store.js'),
|
||||
helpers = require('../../pkg/helpers.js'),
|
||||
fs = require('fs-extra'),
|
||||
path = require('path'),
|
||||
electron = require('electron');
|
||||
electron = require('electron'),
|
||||
{ toKeyEvent } = require('keyboardevent-from-electron-accelerator');
|
||||
|
||||
window['__start'] = async () => {
|
||||
const buttons = require('./buttons.js')(() => ({
|
||||
@ -19,9 +20,9 @@ window['__start'] = async () => {
|
||||
.enabled,
|
||||
},
|
||||
tiling_mode: store('0f0bf8b6-eae6-4273-b307-8fc43f2ee082').tiling_mode,
|
||||
frameless: true,
|
||||
frameless: store('0f0bf8b6-eae6-4273-b307-8fc43f2ee082').frameless,
|
||||
}));
|
||||
document.querySelector('#menu-titlebar').appendChild(buttons.element);
|
||||
document.querySelector('#titlebar').appendChild(buttons.element);
|
||||
|
||||
document.defaultView.addEventListener('keyup', (event) => {
|
||||
if (event.code === 'F5') location.reload();
|
||||
@ -54,8 +55,8 @@ window['__start'] = async () => {
|
||||
document.querySelector('#search > input').focus();
|
||||
});
|
||||
|
||||
electron.ipcRenderer.send('enhancer:get-theme-vars');
|
||||
electron.ipcRenderer.on('enhancer:set-theme-vars', (event, theme) => {
|
||||
electron.ipcRenderer.send('enhancer:get-menu-theme');
|
||||
electron.ipcRenderer.on('enhancer:set-menu-theme', (event, theme) => {
|
||||
for (const style of theme)
|
||||
document.body.style.setProperty(style[0], style[1]);
|
||||
});
|
||||
@ -141,9 +142,22 @@ window['__start'] = async () => {
|
||||
document.addEventListener('keyup', (event) => {
|
||||
if (
|
||||
$popup.classList.contains('visible') &&
|
||||
[13, 27].includes(event.keyCode)
|
||||
['Enter', 'Escape'].includes(event.key)
|
||||
)
|
||||
$popup.classList.remove('visible');
|
||||
// close window on hotkey toggle
|
||||
console.log();
|
||||
const hotkey = toKeyEvent(
|
||||
store('0f0bf8b6-eae6-4273-b307-8fc43f2ee082', {
|
||||
menu_toggle: modules.loaded
|
||||
.find((m) => m.id === '0f0bf8b6-eae6-4273-b307-8fc43f2ee082')
|
||||
.options.find((o) => o.key === 'menu_toggle').value,
|
||||
}).menu_toggle
|
||||
);
|
||||
let triggered = true;
|
||||
for (let prop in hotkey)
|
||||
if (hotkey[prop] !== event[prop]) triggered = false;
|
||||
if (triggered) electron.remote.getCurrentWindow().close();
|
||||
});
|
||||
let colorpicker_target = null;
|
||||
const $colorpicker = colorjoe
|
||||
|
@ -14,6 +14,12 @@ module.exports = {
|
||||
version: require('../../package.json').version,
|
||||
author: 'dragonwocky',
|
||||
options: [
|
||||
{
|
||||
key: 'tabs',
|
||||
label: 'tabbable windows',
|
||||
type: 'toggle',
|
||||
value: false,
|
||||
},
|
||||
{
|
||||
key: 'openhidden',
|
||||
label: 'hide app on open',
|
||||
|
@ -17,6 +17,8 @@ module.exports = (store, __exports) => {
|
||||
helpers = require('../../pkg/helpers.js');
|
||||
|
||||
electron.app.on('ready', () => {
|
||||
// tray
|
||||
|
||||
tray = new electron.Tray(
|
||||
is_win
|
||||
? path.resolve(`${__dirname}/icons/windows.ico`)
|
||||
@ -28,15 +30,20 @@ module.exports = (store, __exports) => {
|
||||
})
|
||||
);
|
||||
|
||||
electron.ipcMain.on('enhancer:set-theme-vars', (event, arg) => {
|
||||
if (!enhancer_menu) return;
|
||||
enhancer_menu.webContents.send('enhancer:set-theme-vars', arg);
|
||||
// menu
|
||||
|
||||
electron.ipcMain.on('enhancer:open-menu', (event, arg) => {
|
||||
openExtensionMenu();
|
||||
});
|
||||
electron.ipcMain.on('enhancer:get-theme-vars', (event, arg) => {
|
||||
electron.ipcMain.on('enhancer:set-menu-theme', (event, arg) => {
|
||||
if (!enhancer_menu) return;
|
||||
enhancer_menu.webContents.send('enhancer:set-menu-theme', arg);
|
||||
});
|
||||
electron.ipcMain.on('enhancer:get-menu-theme', (event, arg) => {
|
||||
electron.webContents
|
||||
.getAllWebContents()
|
||||
.forEach((webContents) =>
|
||||
webContents.send('enhancer:get-theme-vars', arg)
|
||||
webContents.send('enhancer:get-menu-theme', arg)
|
||||
);
|
||||
});
|
||||
|
||||
@ -88,7 +95,7 @@ module.exports = (store, __exports) => {
|
||||
electron.shell.openExternal(JSON.stringify(window_state));
|
||||
enhancer_menu = new electron.BrowserWindow({
|
||||
show: true,
|
||||
frame: false,
|
||||
frame: !store().frameless,
|
||||
titleBarStyle: 'hiddenInset',
|
||||
x:
|
||||
window_state.x ||
|
||||
@ -111,6 +118,8 @@ module.exports = (store, __exports) => {
|
||||
});
|
||||
}
|
||||
|
||||
// tray
|
||||
|
||||
const contextMenu = electron.Menu.buildFromTemplate([
|
||||
{
|
||||
type: 'normal',
|
||||
@ -185,6 +194,13 @@ module.exports = (store, __exports) => {
|
||||
{
|
||||
type: 'separator',
|
||||
},
|
||||
{
|
||||
label: 'Relaunch',
|
||||
click: () => {
|
||||
electron.app.relaunch();
|
||||
electron.app.quit();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Quit',
|
||||
role: 'quit',
|
||||
@ -193,16 +209,7 @@ module.exports = (store, __exports) => {
|
||||
tray.setContextMenu(contextMenu);
|
||||
tray.setToolTip('Notion');
|
||||
|
||||
electron.globalShortcut.register(store().menu_toggle, () => {
|
||||
if (
|
||||
electron.BrowserWindow.getAllWindows()
|
||||
.filter((win) => win.getTitle() !== 'notion-enhancer menu')
|
||||
.some((win) => win.isFocused())
|
||||
) {
|
||||
openExtensionMenu();
|
||||
} else if (enhancer_menu && enhancer_menu.isFocused())
|
||||
enhancer_menu.close();
|
||||
});
|
||||
// hotkey
|
||||
|
||||
function showWindows() {
|
||||
const windows = electron.BrowserWindow.getAllWindows();
|
||||
|
@ -1,6 +1,4 @@
|
||||
/*
|
||||
* dracula
|
||||
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
|
||||
* (c) 2020 u/mimi-shahzad
|
||||
* (c) 2020 Dracula Theme
|
||||
* under the MIT license
|
||||
@ -12,6 +10,7 @@ module.exports = {
|
||||
id: '033bff54-50ba-4cec-bdc0-b2ca7e307086',
|
||||
tags: ['theme', 'dark'],
|
||||
name: 'dracula',
|
||||
|
||||
desc: 'a theme based on the popular Dracula color palette originally by Zeno Rocha and friends. ',
|
||||
version: '0.1',
|
||||
author: {
|
||||
@ -19,4 +18,5 @@ module.exports = {
|
||||
link: 'https://github.com/mimi-shahzad',
|
||||
avatar: 'https://secure.gravatar.com/avatar/86c98dec3a06245dbf2291deb44441f5',
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -13,6 +13,6 @@ module.exports = {
|
||||
name: 'focus mode',
|
||||
desc:
|
||||
'hide the titlebar/menubar if the sidebar is closed (will be shown on hover).',
|
||||
version: '0.1.0',
|
||||
version: '0.1.1',
|
||||
author: 'arecsu',
|
||||
};
|
||||
|
@ -5,6 +5,11 @@
|
||||
* under the MIT license
|
||||
*/
|
||||
|
||||
/* add space at the bottom of the main frame when sidebar is hidden
|
||||
* -- matches space at top for titlebar */
|
||||
.notion-dark-theme .notion-frame {
|
||||
transition: height 100ms ease 0s;
|
||||
}
|
||||
.notion-sidebar-container[style*='width: 0px;'] + .notion-frame {
|
||||
height: calc(
|
||||
100% - (var(--configured--dragarea_height, 10px) + 45px)
|
||||
|
@ -12,7 +12,7 @@ module.exports = {
|
||||
tags: ['theme', 'dark'],
|
||||
name: 'neutral',
|
||||
desc: 'smoother colours and fonts, designed to be more pleasing to the eye.',
|
||||
version: '0.1.3',
|
||||
version: '0.1.4',
|
||||
author: 'arecsu',
|
||||
fonts: [
|
||||
'https://rsms.me/inter/inter.css',
|
||||
|
@ -143,17 +143,6 @@
|
||||
padding-top: 5px !important;
|
||||
} */
|
||||
|
||||
/* add space at the bottom of the main frame when sidebar is hidden
|
||||
* -- matches space at top for titlebar */
|
||||
.notion-dark-theme .notion-frame {
|
||||
transition: height 300ms ease 0s;
|
||||
}
|
||||
.notion-dark-theme
|
||||
.notion-sidebar-container[style*='width: 0px;']
|
||||
+ .notion-frame {
|
||||
height: calc(100vh - 40px) !important;
|
||||
}
|
||||
|
||||
/* hide sidebar "new page" button */
|
||||
.notion-dark-theme
|
||||
.notion-sidebar
|
||||
|
@ -36,6 +36,7 @@
|
||||
"asar": "^3.0.3",
|
||||
"cac": "^6.5.12",
|
||||
"fs-extra": "^9.0.1",
|
||||
"keyboardevent-from-electron-accelerator": "^2.0.0",
|
||||
"readdir-enhanced": "^6.0.3"
|
||||
}
|
||||
}
|
||||
|
16
pkg/apply.js
@ -55,7 +55,7 @@ module.exports = async function ({ overwrite_version, friendly_errors } = {}) {
|
||||
console.info(' ...unpacking app.asar.');
|
||||
const asar_app = path.resolve(`${helpers.__notion}/app.asar`);
|
||||
extractAll(asar_app, `${path.resolve(`${helpers.__notion}/app`)}`);
|
||||
fs.move(asar_app, path.resolve(`${helpers.__notion}/app.asar.bak`));
|
||||
await fs.move(asar_app, path.resolve(`${helpers.__notion}/app.asar.bak`));
|
||||
|
||||
// patching launch script target of custom wrappers
|
||||
if (
|
||||
@ -117,10 +117,20 @@ module.exports = async function ({ overwrite_version, friendly_errors } = {}) {
|
||||
`file access forbidden - ${
|
||||
process.platform === 'win32'
|
||||
? 'make sure your user has elevated permissions.'
|
||||
: `try running "chown -R $USER ${err.path}"`
|
||||
: `try running "sudo chmod -R a+wr ${err.path.replace(
|
||||
'Notion.app',
|
||||
'Notion'
|
||||
)}" ${
|
||||
err.dest
|
||||
? `and/or "sudo chmod -R a+wr ${err.dest.replace(
|
||||
'Notion.app',
|
||||
'Notion'
|
||||
)}"`
|
||||
: ''
|
||||
}`
|
||||
}`
|
||||
);
|
||||
} else if (err.code === 'EIO' && friendly_errors) {
|
||||
} else if (['EIO', 'EBUSY'].includes(err.code) && friendly_errors) {
|
||||
console.error('file access failed: is notion running?');
|
||||
} else console.error(err);
|
||||
return false;
|
||||
|
@ -93,7 +93,7 @@ module.exports = function (__file, __exports) {
|
||||
(...args) =>
|
||||
!args.length
|
||||
? store(mod.id, mod.defaults)
|
||||
: args.length === 1
|
||||
: args.length === 1 && typeof args[0] === 'object'
|
||||
? store(mod.id, { ...mod.defaults, ...args[0] })
|
||||
: store(args[0], { ...mod.defaults, ...args[1] }),
|
||||
__exports
|
||||
|
@ -119,10 +119,20 @@ module.exports = async function ({
|
||||
`file access forbidden - ${
|
||||
process.platform === 'win32'
|
||||
? 'make sure your user has elevated permissions.'
|
||||
: `try running "chown -R $USER ${err.path}"`
|
||||
: `try running "sudo chmod -R a+wr ${err.path.replace(
|
||||
'Notion.app',
|
||||
'Notion'
|
||||
)}" ${
|
||||
err.dest
|
||||
? `and/or "sudo chmod -R a+wr ${err.dest.replace(
|
||||
'Notion.app',
|
||||
'Notion'
|
||||
)}"`
|
||||
: ''
|
||||
}`
|
||||
}`
|
||||
);
|
||||
} else if (err.code === 'EIO' && friendly_errors) {
|
||||
} else if (['EIO', 'EBUSY'].includes(err.code) && friendly_errors) {
|
||||
console.error('file access failed: is notion running?');
|
||||
} else console.error(err);
|
||||
return false;
|
||||
|
@ -143,6 +143,11 @@ jsonfile@^6.0.1:
|
||||
optionalDependencies:
|
||||
graceful-fs "^4.1.6"
|
||||
|
||||
keyboardevent-from-electron-accelerator@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/keyboardevent-from-electron-accelerator/-/keyboardevent-from-electron-accelerator-2.0.0.tgz#ace21b1aa4e47148815d160057f9edb66567c50c"
|
||||
integrity sha512-iQcmNA0M4ETMNi0kG/q0h/43wZk7rMeKYrXP7sqKIJbHkTU8Koowgzv+ieR/vWJbOwxx5nDC3UnudZ0aLSu4VA==
|
||||
|
||||
minimatch@^3.0.4:
|
||||
version "3.0.4"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
||||
|