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/stores/AppStore.js | 10 |
3 files changed, 12 insertions, 3 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 075bd5e34..222ffdc1a 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/stores/AppStore.js b/src/stores/AppStore.js index 4ac8325d4..b3554f9d8 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -17,6 +17,8 @@ import { getServiceIdsFromPartitions, removeServicePartitionDirectory } from '.. | |||
17 | 17 | ||
18 | const { app } = remote; | 18 | const { app } = remote; |
19 | 19 | ||
20 | const mainWindow = remote.getCurrentWindow(); | ||
21 | |||
20 | const defaultLocale = DEFAULT_APP_SETTINGS.locale; | 22 | const defaultLocale = DEFAULT_APP_SETTINGS.locale; |
21 | const autoLauncher = new AutoLaunch({ | 23 | const autoLauncher = new AutoLaunch({ |
22 | name: 'Franz', | 24 | name: 'Franz', |
@@ -48,6 +50,8 @@ export default class AppStore extends Store { | |||
48 | 50 | ||
49 | @observable isClearingAllCache = false; | 51 | @observable isClearingAllCache = false; |
50 | 52 | ||
53 | @observable isFullScreen = mainWindow.isFullScreen(); | ||
54 | |||
51 | constructor(...args) { | 55 | constructor(...args) { |
52 | super(...args); | 56 | super(...args); |
53 | 57 | ||
@@ -80,6 +84,10 @@ export default class AppStore extends Store { | |||
80 | window.addEventListener('online', () => { this.isOnline = true; }); | 84 | window.addEventListener('online', () => { this.isOnline = true; }); |
81 | window.addEventListener('offline', () => { this.isOnline = false; }); | 85 | window.addEventListener('offline', () => { this.isOnline = false; }); |
82 | 86 | ||
87 | mainWindow.on('enter-full-screen', () => { this.isFullScreen = true; }); | ||
88 | mainWindow.on('leave-full-screen', () => { this.isFullScreen = false; }); | ||
89 | |||
90 | |||
83 | this.isOnline = navigator.onLine; | 91 | this.isOnline = navigator.onLine; |
84 | 92 | ||
85 | // Check if Franz should launch on start | 93 | // Check if Franz should launch on start |
@@ -170,8 +178,6 @@ export default class AppStore extends Store { | |||
170 | 178 | ||
171 | this.actions.service.setActive({ serviceId }); | 179 | this.actions.service.setActive({ serviceId }); |
172 | 180 | ||
173 | const mainWindow = remote.getCurrentWindow(); | ||
174 | |||
175 | if (isWindows) { | 181 | if (isWindows) { |
176 | mainWindow.restore(); | 182 | mainWindow.restore(); |
177 | } else if (isLinux) { | 183 | } else if (isLinux) { |