Commit 46badbbc authored by Tasso Evangelista's avatar Tasso Evangelista

Move some menus

parent 95899698
......@@ -8,15 +8,15 @@ import { app, ipcMain, Menu } from 'electron';
import autoUpdate from './background/autoUpdate';
import certificate from './background/certificate';
import { addServer, createMainWindow, getMainWindow } from './background/mainWindow';
import menus from './background/menus';
import './background/screenshare';
import i18n from './i18n/index.js';
import env from './env';
export { default as showAboutDialog } from './background/aboutDialog';
export { default as certificate } from './background/certificate';
export { default as menus } from './background/menus';
export { default as remoteServers } from './background/servers';
export { certificate, menus };
process.env.GOOGLE_API_KEY = 'AIzaSyADqUh_c1Qhji3Cp1NE43YrcpuPkmhXD-c';
......
......@@ -9,9 +9,9 @@ const createTemplate = ({
currentServerUrl = null,
showTrayIcon = true,
showFullScreen = false,
showWindowOnUnreadChanged = false,
showMenuBar = true,
showServerList = true,
showWindowOnUnreadChanged = false,
}, events) => ([
{
label: process.platform === 'darwin' ? appName : i18n.__('&File'),
......@@ -51,11 +51,13 @@ const createTemplate = ({
// accelerator: 'CommandOrControl+,',
// click: () => events.emit('preferences'),
// },
{
label: i18n.__('Add &new server'),
accelerator: 'CommandOrControl+N',
click: () => events.emit('add-new-server'),
},
...(process.platform !== 'darwin' ? [
{
label: i18n.__('Add &new server'),
accelerator: 'CommandOrControl+N',
click: () => events.emit('add-new-server'),
},
] : []),
{
type: 'separator',
},
......@@ -157,12 +159,6 @@ const createTemplate = ({
},
] : []),
...(process.platform !== 'darwin' ? [
{
label: i18n.__('Show window on unread messages'),
type: 'checkbox',
checked: showWindowOnUnreadChanged,
click: () => events.emit('toggle', 'showWindowOnUnreadChanged'),
},
{
label: i18n.__('Menu bar'),
type: 'checkbox',
......@@ -201,6 +197,16 @@ const createTemplate = ({
id: 'window',
role: 'window',
submenu: [
...(process.platform === 'darwin' ? [
{
label: i18n.__('Add &new server'),
accelerator: 'CommandOrControl+N',
click: () => events.emit('add-new-server'),
},
{
type: 'separator',
},
] : []),
...servers.map((host, i) => ({
label: host.title.replace(/&/g, '&&'),
type: currentServerUrl ? 'radio' : 'normal',
......@@ -224,6 +230,15 @@ const createTemplate = ({
{
type: 'separator',
},
{
label: i18n.__('Show on unread messages'),
type: 'checkbox',
checked: showWindowOnUnreadChanged,
click: () => events.emit('toggle', 'showWindowOnUnreadChanged'),
},
{
type: 'separator',
},
{
label: i18n.__('Minimize'),
accelerator: 'CommandOrControl+M',
......
......@@ -71,7 +71,7 @@
"Server list": "Server list",
"Share_Your_Screen": "Share Your Screen",
"Show": "Show",
"Show window on unread messages": "Show window on unread messages",
"Show on unread messages": "Show on unread messages",
"Spelling_languages": "Spelling languages",
"Timeout_trying_to_connect": "Timeout trying to connect",
"Toggle &DevTools": "Toggle &DevTools",
......
......@@ -70,7 +70,7 @@
"Services": "Serviços",
"Share_Your_Screen": "Compartilhe sua Tela",
"Show": "Mostrar",
"Show window on unread messages": "Exibir janela quando há mensagens não lidas",
"Show on unread messages": "Exibir quando há mensagens não lidas",
"Spelling_languages": "Línguas Suportadas",
"Timeout_trying_to_connect": "Tempo Esgotado ao Carregar",
"Toggle &DevTools": "Alternar &DevTools",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment