mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 20:52:06 +00:00
Add options in store (tray, app visible, auto-update)
This commit is contained in:
@ -9,13 +9,25 @@ const store = new Store({
|
|||||||
},
|
},
|
||||||
url: "https://music.youtube.com",
|
url: "https://music.youtube.com",
|
||||||
plugins: ["navigation", "shortcuts", "adblocker"],
|
plugins: ["navigation", "shortcuts", "adblocker"],
|
||||||
|
options: {
|
||||||
|
tray: false,
|
||||||
|
appVisible: true,
|
||||||
|
autoUpdates: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
store: store,
|
store: store,
|
||||||
|
// Plugins
|
||||||
isPluginEnabled: plugin => plugins.isEnabled(store, plugin),
|
isPluginEnabled: plugin => plugins.isEnabled(store, plugin),
|
||||||
getEnabledPlugins: () => plugins.getEnabledPlugins(store),
|
getEnabledPlugins: () => plugins.getEnabledPlugins(store),
|
||||||
enablePlugin: plugin => plugins.enablePlugin(store, plugin),
|
enablePlugin: plugin => plugins.enablePlugin(store, plugin),
|
||||||
disablePlugin: plugin => plugins.disablePlugin(store, plugin),
|
disablePlugin: plugin => plugins.disablePlugin(store, plugin),
|
||||||
|
// Options
|
||||||
|
setOptions: options =>
|
||||||
|
store.set("options", { ...store.get("options"), ...options }),
|
||||||
|
isTrayEnabled: () => store.get("options.tray"),
|
||||||
|
isAppVisible: () => store.get("options.appVisible"),
|
||||||
|
autoUpdate: () => store.get("options.autoUpdates")
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user