Rename cssFiles option to themes and add menu entry

This commit is contained in:
TC
2022-08-25 22:50:33 +02:00
parent ef6fb402bf
commit e62ee35b42
3 changed files with 37 additions and 3 deletions

28
menu.js
View File

@ -100,6 +100,34 @@ const mainMenuTemplate = (win) => {
config.set("options.ForceShowLikeButtons", item.checked);
},
},
{
label: "Theme",
submenu: [
{
label: "No theme",
type: "radio",
checked: !config.get("options.themes"), // todo rename "themes"
click: () => {
config.set("options.themes", []);
},
},
{ type: "separator" },
{
label: "Import custom CSS file",
type: "radio",
checked: false,
click: async () => {
const { filePaths } = await dialog.showOpenDialog({
filters: [{ name: "CSS Files", extensions: ["css"] }],
properties: ["openFile", "multiSelections"],
});
if (filePaths) {
config.set("options.themes", filePaths);
}
},
},
],
},
],
},
{