diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/layout/AppLayout.js | 4 | ||||
-rw-r--r-- | src/containers/layout/AppLayoutContainer.js | 1 | ||||
-rw-r--r-- | src/lib/Menu.js | 15 | ||||
-rw-r--r-- | src/stores/AppStore.js | 10 | ||||
-rw-r--r-- | src/styles/title-bar.scss | 3 |
5 files changed, 19 insertions, 14 deletions
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index 66aef1730..746775a7f 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -43,6 +43,7 @@ const messages = defineMessages({ | |||
43 | @observer | 43 | @observer |
44 | export default class AppLayout extends Component { | 44 | export default class AppLayout extends Component { |
45 | static propTypes = { | 45 | static propTypes = { |
46 | isFullScreen: PropTypes.bool.isRequired, | ||
46 | sidebar: PropTypes.element.isRequired, | 47 | sidebar: PropTypes.element.isRequired, |
47 | services: PropTypes.element.isRequired, | 48 | services: PropTypes.element.isRequired, |
48 | children: PropTypes.element, | 49 | children: PropTypes.element, |
@@ -69,6 +70,7 @@ export default class AppLayout extends Component { | |||
69 | 70 | ||
70 | render() { | 71 | render() { |
71 | const { | 72 | const { |
73 | isFullScreen, | ||
72 | sidebar, | 74 | sidebar, |
73 | services, | 75 | services, |
74 | children, | 76 | children, |
@@ -90,7 +92,7 @@ export default class AppLayout extends Component { | |||
90 | return ( | 92 | return ( |
91 | <div> | 93 | <div> |
92 | <div className="app"> | 94 | <div className="app"> |
93 | {isWindows && <TitleBar menu={window.franz.menu.template} icon={'assets/images/logo.svg'} />} | 95 | {isWindows && !isFullScreen && <TitleBar menu={window.franz.menu.template} icon={'assets/images/logo.svg'} />} |
94 | <div className="app__content"> | 96 | <div className="app__content"> |
95 | {sidebar} | 97 | {sidebar} |
96 | <div className="app__service"> | 98 | <div className="app__service"> |
diff --git a/src/containers/layout/AppLayoutContainer.js b/src/containers/layout/AppLayoutContainer.js index 0931738fd..9212f809f 100644 --- a/src/containers/layout/AppLayoutContainer.js +++ b/src/containers/layout/AppLayoutContainer.js | |||
@@ -106,6 +106,7 @@ export default class AppLayoutContainer extends Component { | |||
106 | 106 | ||
107 | return ( | 107 | return ( |
108 | <AppLayout | 108 | <AppLayout |
109 | isFullScreen={app.isFullScreen} | ||
109 | isOnline={app.isOnline} | 110 | isOnline={app.isOnline} |
110 | showServicesUpdatedInfoBar={ui.showServicesUpdatedInfoBar} | 111 | showServicesUpdatedInfoBar={ui.showServicesUpdatedInfoBar} |
111 | appUpdateIsDownloaded={app.updateStatus === app.updateStatusTypes.DOWNLOADED} | 112 | appUpdateIsDownloaded={app.updateStatus === app.updateStatusTypes.DOWNLOADED} |
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 5a05e47b3..19b8d5b15 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -415,7 +415,7 @@ const _titleBarTemplateFactory = intl => [ | |||
415 | label: app.mainWindow.isFullScreen() // label doesn't work, gets overridden by Electron | 415 | label: app.mainWindow.isFullScreen() // label doesn't work, gets overridden by Electron |
416 | ? intl.formatMessage(menuItems.exitFullScreen) | 416 | ? intl.formatMessage(menuItems.exitFullScreen) |
417 | : intl.formatMessage(menuItems.enterFullScreen), | 417 | : intl.formatMessage(menuItems.enterFullScreen), |
418 | accelerator: `${ctrlKey}+F`, | 418 | accelerator: 'F11', |
419 | click(menuItem, browserWindow) { | 419 | click(menuItem, browserWindow) { |
420 | browserWindow.setFullScreen(!browserWindow.isFullScreen()); | 420 | browserWindow.setFullScreen(!browserWindow.isFullScreen()); |
421 | }, | 421 | }, |
@@ -431,14 +431,14 @@ const _titleBarTemplateFactory = intl => [ | |||
431 | submenu: [ | 431 | submenu: [ |
432 | { | 432 | { |
433 | label: intl.formatMessage(menuItems.minimize), | 433 | label: intl.formatMessage(menuItems.minimize), |
434 | accelerator: 'Alt+M', | 434 | accelerator: 'Ctrl+M', |
435 | click(menuItem, browserWindow) { | 435 | click(menuItem, browserWindow) { |
436 | browserWindow.minimize(); | 436 | browserWindow.minimize(); |
437 | }, | 437 | }, |
438 | }, | 438 | }, |
439 | { | 439 | { |
440 | label: intl.formatMessage(menuItems.close), | 440 | label: intl.formatMessage(menuItems.close), |
441 | accelerator: 'Alt+W', | 441 | accelerator: 'Ctrl+W', |
442 | click(menuItem, browserWindow) { | 442 | click(menuItem, browserWindow) { |
443 | browserWindow.close(); | 443 | browserWindow.close(); |
444 | }, | 444 | }, |
@@ -450,7 +450,7 @@ const _titleBarTemplateFactory = intl => [ | |||
450 | submenu: [ | 450 | submenu: [ |
451 | { | 451 | { |
452 | label: intl.formatMessage(menuItems.learnMore), | 452 | label: intl.formatMessage(menuItems.learnMore), |
453 | click() { shell.openExternal('http://meetfranz.com'); }, | 453 | click() { shell.openExternal('https://meetfranz.com'); }, |
454 | }, | 454 | }, |
455 | { | 455 | { |
456 | label: intl.formatMessage(menuItems.changelog), | 456 | label: intl.formatMessage(menuItems.changelog), |
@@ -461,7 +461,7 @@ const _titleBarTemplateFactory = intl => [ | |||
461 | }, | 461 | }, |
462 | { | 462 | { |
463 | label: intl.formatMessage(menuItems.support), | 463 | label: intl.formatMessage(menuItems.support), |
464 | click() { shell.openExternal('http://meetfranz.com/support'); }, | 464 | click() { shell.openExternal('https://meetfranz.com/support'); }, |
465 | }, | 465 | }, |
466 | { | 466 | { |
467 | type: 'separator', | 467 | type: 'separator', |
@@ -643,10 +643,7 @@ export default class FranzMenu { | |||
643 | }, | 643 | }, |
644 | { | 644 | { |
645 | label: intl.formatMessage(menuItems.quit), | 645 | label: intl.formatMessage(menuItems.quit), |
646 | accelerator: 'Alt+F4', | 646 | role: 'quit', |
647 | click: () => { | ||
648 | app.quit(); | ||
649 | }, | ||
650 | }, | 647 | }, |
651 | ]; | 648 | ]; |
652 | 649 | ||
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index ea1e71bdc..38edff1b4 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -19,6 +19,8 @@ const debug = require('debug')('AppStore'); | |||
19 | 19 | ||
20 | const { app } = remote; | 20 | const { app } = remote; |
21 | 21 | ||
22 | const mainWindow = remote.getCurrentWindow(); | ||
23 | |||
22 | const defaultLocale = DEFAULT_APP_SETTINGS.locale; | 24 | const defaultLocale = DEFAULT_APP_SETTINGS.locale; |
23 | const autoLauncher = new AutoLaunch({ | 25 | const autoLauncher = new AutoLaunch({ |
24 | name: 'Franz', | 26 | name: 'Franz', |
@@ -50,6 +52,8 @@ export default class AppStore extends Store { | |||
50 | 52 | ||
51 | @observable isClearingAllCache = false; | 53 | @observable isClearingAllCache = false; |
52 | 54 | ||
55 | @observable isFullScreen = mainWindow.isFullScreen(); | ||
56 | |||
53 | constructor(...args) { | 57 | constructor(...args) { |
54 | super(...args); | 58 | super(...args); |
55 | 59 | ||
@@ -82,6 +86,10 @@ export default class AppStore extends Store { | |||
82 | window.addEventListener('online', () => { this.isOnline = true; }); | 86 | window.addEventListener('online', () => { this.isOnline = true; }); |
83 | window.addEventListener('offline', () => { this.isOnline = false; }); | 87 | window.addEventListener('offline', () => { this.isOnline = false; }); |
84 | 88 | ||
89 | mainWindow.on('enter-full-screen', () => { this.isFullScreen = true; }); | ||
90 | mainWindow.on('leave-full-screen', () => { this.isFullScreen = false; }); | ||
91 | |||
92 | |||
85 | this.isOnline = navigator.onLine; | 93 | this.isOnline = navigator.onLine; |
86 | 94 | ||
87 | // Check if Franz should launch on start | 95 | // Check if Franz should launch on start |
@@ -172,8 +180,6 @@ export default class AppStore extends Store { | |||
172 | 180 | ||
173 | this.actions.service.setActive({ serviceId }); | 181 | this.actions.service.setActive({ serviceId }); |
174 | 182 | ||
175 | const mainWindow = remote.getCurrentWindow(); | ||
176 | |||
177 | if (isWindows) { | 183 | if (isWindows) { |
178 | mainWindow.restore(); | 184 | mainWindow.restore(); |
179 | } else if (isLinux) { | 185 | } else if (isLinux) { |
diff --git a/src/styles/title-bar.scss b/src/styles/title-bar.scss index 492245e2f..5316f35b3 100644 --- a/src/styles/title-bar.scss +++ b/src/styles/title-bar.scss | |||
@@ -32,8 +32,7 @@ | |||
32 | margin: 4px; | 32 | margin: 4px; |
33 | border-radius: $theme-border-radius-small; | 33 | border-radius: $theme-border-radius-small; |
34 | } | 34 | } |
35 | &.selected { | 35 | &.selected, &.selected:focus { |
36 | // background: $theme-brand-primary; | ||
37 | background: none; | 36 | background: none; |
38 | 37 | ||
39 | .menu-item { | 38 | .menu-item { |