fix: plugin config default value

This commit is contained in:
JellyBrick
2023-11-28 10:21:08 +09:00
parent 04d7b32d3f
commit 3e8a0ec49a
12 changed files with 44 additions and 91 deletions

View File

@ -84,7 +84,6 @@ export default createPlugin({
}
},
async onConfigChange(newConfig) {
console.log('Adblocker config changed', newConfig);
if (this.mainWindow) {
if (newConfig.blocker === blockers.WithBlocklists && !isBlockerEnabled(this.mainWindow.webContents.session)) {
await loadAdBlockerEngine(

View File

@ -1,5 +1,6 @@
import { createPlugin } from '@/utils';
import {YoutubePlayer} from "@/types/youtube-player";
import type { YoutubePlayer } from '@/types/youtube-player';
export type DisableAutoPlayPluginConfig = {
enabled: boolean;

View File

@ -13,7 +13,13 @@ export default createPlugin({
name: 'In-App Menu',
restartNeeded: true,
config: {
enabled: false,
enabled: (
typeof window !== 'undefined' &&
!window.navigator?.userAgent?.includes('mac')
) || (
typeof global !== 'undefined' &&
global.process?.platform !== 'darwin'
),
hideDOMWindowControls: false,
} as InAppMenuConfig,
stylesheets: [titlebarStyle],

View File

@ -9,7 +9,7 @@ export default createPlugin({
name: 'Navigation',
restartNeeded: true,
config: {
enabled: false,
enabled: true,
},
stylesheets: [style],
renderer() {