Compare commits

..

2 Commits

Author SHA1 Message Date
TC
e07cac2406 Bump version to 1.7.1 2020-12-03 22:30:15 +01:00
TC
fd97576611 Option to restart the app on config changes 2020-12-03 22:29:46 +01:00
5 changed files with 20 additions and 5 deletions

View File

@ -11,6 +11,7 @@ const defaultConfig = {
hideMenu: false,
startAtLogin: false,
disableHardwareAcceleration: false,
restartOnConfigChanges: false,
},
plugins: {
// Enabled plugins

View File

@ -13,6 +13,9 @@ module.exports = {
get,
set,
edit: () => store.openInEditor(),
watch: (cb) => store.onDidAnyChange(cb),
watch: (cb) => {
store.onDidChange("options", cb);
store.onDidChange("plugins", cb);
},
plugins,
};

View File

@ -189,9 +189,12 @@ app.on("activate", () => {
app.on("ready", () => {
mainWindow = createMainWindow();
setApplicationMenu(mainWindow);
config.watch(() => {
setApplicationMenu(mainWindow);
});
if (config.get("options.restartOnConfigChanges")) {
config.watch(() => {
app.relaunch();
app.exit();
});
}
setUpTray(app, mainWindow);
// Autostart at login

View File

@ -50,6 +50,14 @@ const mainMenuTemplate = (win) => [
config.set("options.disableHardwareAcceleration", item.checked);
},
},
{
label: "Restart on config changes",
type: "checkbox",
checked: config.get("options.restartOnConfigChanges"),
click: (item) => {
config.set("options.restartOnConfigChanges", item.checked);
},
},
...(is.windows() || is.linux()
? [
{

View File

@ -1,7 +1,7 @@
{
"name": "youtube-music",
"productName": "YouTube Music",
"version": "1.7.0",
"version": "1.7.1",
"description": "YouTube Music Desktop App - including custom plugins",
"license": "MIT",
"repository": "th-ch/youtube-music",