diff options
author | 2019-02-13 21:38:05 +0700 | |
---|---|---|
committer | 2019-02-13 21:38:05 +0700 | |
commit | f242474399551528d0673871d7e159272c30feff (patch) | |
tree | b2bf5679fb68148769e24871b32cf7bf92bf241b /src/components/layout/AppLayout.js | |
parent | Fix typo (diff) | |
download | ferdium-app-f242474399551528d0673871d7e159272c30feff.tar.gz ferdium-app-f242474399551528d0673871d7e159272c30feff.tar.zst ferdium-app-f242474399551528d0673871d7e159272c30feff.zip |
#1 Remove delayApp call
Diffstat (limited to 'src/components/layout/AppLayout.js')
-rw-r--r-- | src/components/layout/AppLayout.js | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index bce792e56..a1641bc4a 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -5,7 +5,6 @@ import { defineMessages, intlShape } from 'react-intl'; | |||
5 | import { TitleBar } from 'electron-react-titlebar'; | 5 | import { TitleBar } from 'electron-react-titlebar'; |
6 | 6 | ||
7 | import InfoBar from '../ui/InfoBar'; | 7 | import InfoBar from '../ui/InfoBar'; |
8 | import { Component as DelayApp } from '../../features/delayApp'; | ||
9 | import { Component as BasicAuth } from '../../features/basicAuth'; | 8 | import { Component as BasicAuth } from '../../features/basicAuth'; |
10 | import ErrorBoundary from '../util/ErrorBoundary'; | 9 | import ErrorBoundary from '../util/ErrorBoundary'; |
11 | 10 | ||
@@ -44,7 +43,9 @@ const messages = defineMessages({ | |||
44 | }, | 43 | }, |
45 | }); | 44 | }); |
46 | 45 | ||
47 | export default @observer class AppLayout extends Component { | 46 | export default |
47 | @observer | ||
48 | class AppLayout extends Component { | ||
48 | static propTypes = { | 49 | static propTypes = { |
49 | isFullScreen: PropTypes.bool.isRequired, | 50 | isFullScreen: PropTypes.bool.isRequired, |
50 | sidebar: PropTypes.element.isRequired, | 51 | sidebar: PropTypes.element.isRequired, |
@@ -62,7 +63,6 @@ export default @observer class AppLayout extends Component { | |||
62 | retryRequiredRequests: PropTypes.func.isRequired, | 63 | retryRequiredRequests: PropTypes.func.isRequired, |
63 | areRequiredRequestsLoading: PropTypes.bool.isRequired, | 64 | areRequiredRequestsLoading: PropTypes.bool.isRequired, |
64 | darkMode: PropTypes.bool.isRequired, | 65 | darkMode: PropTypes.bool.isRequired, |
65 | isDelayAppScreenVisible: PropTypes.bool.isRequired, | ||
66 | }; | 66 | }; |
67 | 67 | ||
68 | static defaultProps = { | 68 | static defaultProps = { |
@@ -91,30 +91,37 @@ export default @observer class AppLayout extends Component { | |||
91 | retryRequiredRequests, | 91 | retryRequiredRequests, |
92 | areRequiredRequestsLoading, | 92 | areRequiredRequestsLoading, |
93 | darkMode, | 93 | darkMode, |
94 | isDelayAppScreenVisible, | ||
95 | } = this.props; | 94 | } = this.props; |
96 | 95 | ||
97 | const { intl } = this.context; | 96 | const { intl } = this.context; |
98 | 97 | ||
99 | return ( | 98 | return ( |
100 | <ErrorBoundary> | 99 | <ErrorBoundary> |
101 | <div className={(darkMode ? 'theme__dark' : '')}> | 100 | <div className={darkMode ? 'theme__dark' : ''}> |
102 | <div className="app"> | 101 | <div className="app"> |
103 | {isWindows && !isFullScreen && <TitleBar menu={window.franz.menu.template} icon="assets/images/logo.svg" />} | 102 | {isWindows && !isFullScreen && ( |
103 | <TitleBar | ||
104 | menu={window.franz.menu.template} | ||
105 | icon="assets/images/logo.svg" | ||
106 | /> | ||
107 | )} | ||
104 | <div className="app__content"> | 108 | <div className="app__content"> |
105 | {sidebar} | 109 | {sidebar} |
106 | <div className="app__service"> | 110 | <div className="app__service"> |
107 | {news.length > 0 && news.map(item => ( | 111 | {news.length > 0 |
108 | <InfoBar | 112 | && news.map(item => ( |
109 | key={item.id} | 113 | <InfoBar |
110 | position="top" | 114 | key={item.id} |
111 | type={item.type} | 115 | position="top" |
112 | sticky={item.sticky} | 116 | type={item.type} |
113 | onHide={() => removeNewsItem({ newsId: item.id })} | 117 | sticky={item.sticky} |
114 | > | 118 | onHide={() => removeNewsItem({ newsId: item.id })} |
115 | <span dangerouslySetInnerHTML={createMarkup(item.message)} /> | 119 | > |
116 | </InfoBar> | 120 | <span |
117 | ))} | 121 | dangerouslySetInnerHTML={createMarkup(item.message)} |
122 | /> | ||
123 | </InfoBar> | ||
124 | ))} | ||
118 | {/* {!isOnline && ( | 125 | {/* {!isOnline && ( |
119 | <InfoBar | 126 | <InfoBar |
120 | type="danger" | 127 | type="danger" |
@@ -162,7 +169,6 @@ export default @observer class AppLayout extends Component { | |||
162 | </a> | 169 | </a> |
163 | </InfoBar> | 170 | </InfoBar> |
164 | )} | 171 | )} |
165 | {isDelayAppScreenVisible && (<DelayApp />)} | ||
166 | <BasicAuth /> | 172 | <BasicAuth /> |
167 | {services} | 173 | {services} |
168 | </div> | 174 | </div> |