mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-09 15:09:02 +00:00
platform-specific option overrides for features not required on macOS
This commit is contained in:
parent
bf800a0889
commit
dc60b3d9ae
@ -587,6 +587,13 @@ window['__start'] = async () => {
|
|||||||
const $options = mod.elem.querySelector('.options');
|
const $options = mod.elem.querySelector('.options');
|
||||||
if ($options)
|
if ($options)
|
||||||
for (const opt of mod.options) {
|
for (const opt of mod.options) {
|
||||||
|
if (
|
||||||
|
Object.keys(opt.platformOverwrite || {}).some(
|
||||||
|
(platform) => process.platform === platform
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const $opt = createOption(opt, mod.id);
|
const $opt = createOption(opt, mod.id);
|
||||||
if (opt.type === 'color') {
|
if (opt.type === 'color') {
|
||||||
const $preview = $opt.querySelector('input');
|
const $preview = $opt.querySelector('input');
|
||||||
|
@ -46,6 +46,9 @@ module.exports = {
|
|||||||
it can be re-shown by clicking the tray icon or using the hotkey.`,
|
it can be re-shown by clicking the tray icon or using the hotkey.`,
|
||||||
type: 'toggle',
|
type: 'toggle',
|
||||||
value: true,
|
value: true,
|
||||||
|
platformOverwrite: {
|
||||||
|
darwin: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'frameless',
|
key: 'frameless',
|
||||||
@ -53,6 +56,9 @@ module.exports = {
|
|||||||
description: `replace the native titlebar with buttons inset into the app.`,
|
description: `replace the native titlebar with buttons inset into the app.`,
|
||||||
type: 'toggle',
|
type: 'toggle',
|
||||||
value: true,
|
value: true,
|
||||||
|
platformOverwrite: {
|
||||||
|
darwin: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'tiling_mode',
|
key: 'tiling_mode',
|
||||||
|
@ -22,6 +22,9 @@ module.exports = {
|
|||||||
used to drag/move the window.`,
|
used to drag/move the window.`,
|
||||||
type: 'input',
|
type: 'input',
|
||||||
value: 15,
|
value: 15,
|
||||||
|
platformOverwrite: {
|
||||||
|
darwin: 0,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'responsive_breakpoint',
|
key: 'responsive_breakpoint',
|
||||||
|
Loading…
Reference in New Issue
Block a user