feat: 完善剩余功能
This commit is contained in:
@@ -267,7 +267,7 @@ function createWindow(frontendUrl, frontendPort, backendPort, isDev) {
|
||||
* @returns {Array} 菜单模板数组
|
||||
*/
|
||||
function getMenuTemplate() {
|
||||
return [
|
||||
const res = [
|
||||
{
|
||||
label: i18next.t("menu.lockWindow"),
|
||||
click: () => {
|
||||
@@ -286,12 +286,6 @@ function createWindow(frontendUrl, frontendPort, backendPort, isDev) {
|
||||
mainWindow.reload();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: i18next.t("menu.openDevTools"),
|
||||
click: () => {
|
||||
mainWindow.webContents.openDevTools();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: i18next.t("menu.language"),
|
||||
submenu: [
|
||||
@@ -339,6 +333,16 @@ function createWindow(frontendUrl, frontendPort, backendPort, isDev) {
|
||||
},
|
||||
},
|
||||
];
|
||||
if (isDev) {
|
||||
res.push({
|
||||
label: i18next.t("menu.openDevTools"),
|
||||
click: () => {
|
||||
mainWindow.webContents.openDevTools();
|
||||
searchWindow && searchWindow.webContents.openDevTools();
|
||||
},
|
||||
});
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user