diff options
Diffstat (limited to 'src/app.js')
-rw-r--r-- | src/app.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/app.js b/src/app.js index cb3e37c64..e16c01456 100644 --- a/src/app.js +++ b/src/app.js | |||
@@ -18,7 +18,6 @@ import apiFactory from './api'; | |||
18 | import actions from './actions'; | 18 | import actions from './actions'; |
19 | import MenuFactory from './lib/Menu'; | 19 | import MenuFactory from './lib/Menu'; |
20 | import TouchBarFactory from './lib/TouchBar'; | 20 | import TouchBarFactory from './lib/TouchBar'; |
21 | import * as analytics from './lib/analytics'; | ||
22 | 21 | ||
23 | import I18N from './I18n'; | 22 | import I18N from './I18n'; |
24 | import AppLayoutContainer from './containers/layout/AppLayoutContainer'; | 23 | import AppLayoutContainer from './containers/layout/AppLayoutContainer'; |
@@ -33,6 +32,7 @@ import EditSettingsScreen from './containers/settings/EditSettingsScreen'; | |||
33 | import InviteSettingsScreen from './containers/settings/InviteScreen'; | 32 | import InviteSettingsScreen from './containers/settings/InviteScreen'; |
34 | import WelcomeScreen from './containers/auth/WelcomeScreen'; | 33 | import WelcomeScreen from './containers/auth/WelcomeScreen'; |
35 | import LoginScreen from './containers/auth/LoginScreen'; | 34 | import LoginScreen from './containers/auth/LoginScreen'; |
35 | import LockedScreen from './containers/auth/LockedScreen'; | ||
36 | import PasswordScreen from './containers/auth/PasswordScreen'; | 36 | import PasswordScreen from './containers/auth/PasswordScreen'; |
37 | import SignupScreen from './containers/auth/SignupScreen'; | 37 | import SignupScreen from './containers/auth/SignupScreen'; |
38 | import ImportScreen from './containers/auth/ImportScreen'; | 38 | import ImportScreen from './containers/auth/ImportScreen'; |
@@ -54,20 +54,20 @@ webFrame.setVisualZoomLevelLimits(1, 1); | |||
54 | webFrame.setLayoutZoomLevelLimits(0, 0); | 54 | webFrame.setLayoutZoomLevelLimits(0, 0); |
55 | 55 | ||
56 | window.addEventListener('load', () => { | 56 | window.addEventListener('load', () => { |
57 | const api = apiFactory(new ServerApi(), new LocalApi()); | 57 | const serverApi = new ServerApi(); |
58 | const api = apiFactory(serverApi, new LocalApi()); | ||
58 | const router = new RouterStore(); | 59 | const router = new RouterStore(); |
59 | const history = syncHistoryWithStore(hashHistory, router); | ||
60 | const stores = storeFactory(api, actions, router); | 60 | const stores = storeFactory(api, actions, router); |
61 | const history = syncHistoryWithStore(hashHistory, router); | ||
61 | const menu = new MenuFactory(stores, actions); | 62 | const menu = new MenuFactory(stores, actions); |
62 | const touchBar = new TouchBarFactory(stores, actions); | 63 | const touchBar = new TouchBarFactory(stores, actions); |
63 | 64 | ||
64 | window.franz = { | 65 | window.ferdi = { |
65 | stores, | 66 | stores, |
66 | actions, | 67 | actions, |
67 | api, | 68 | api, |
68 | menu, | 69 | menu, |
69 | touchBar, | 70 | touchBar, |
70 | analytics, | ||
71 | features: {}, | 71 | features: {}, |
72 | render() { | 72 | render() { |
73 | const preparedApp = ( | 73 | const preparedApp = ( |
@@ -95,6 +95,7 @@ window.addEventListener('load', () => { | |||
95 | <IndexRedirect to="/auth/welcome" /> | 95 | <IndexRedirect to="/auth/welcome" /> |
96 | <Route path="/auth/welcome" component={WelcomeScreen} /> | 96 | <Route path="/auth/welcome" component={WelcomeScreen} /> |
97 | <Route path="/auth/login" component={LoginScreen} /> | 97 | <Route path="/auth/login" component={LoginScreen} /> |
98 | <Route path="/auth/locked" component={LockedScreen} /> | ||
98 | <Route path="/auth/signup"> | 99 | <Route path="/auth/signup"> |
99 | <IndexRedirect to="/auth/signup/form" /> | 100 | <IndexRedirect to="/auth/signup/form" /> |
100 | <Route path="/auth/signup/form" component={SignupScreen} /> | 101 | <Route path="/auth/signup/form" component={SignupScreen} /> |
@@ -114,7 +115,7 @@ window.addEventListener('load', () => { | |||
114 | render(preparedApp, document.getElementById('root')); | 115 | render(preparedApp, document.getElementById('root')); |
115 | }, | 116 | }, |
116 | }; | 117 | }; |
117 | window.franz.render(); | 118 | window.ferdi.render(); |
118 | }); | 119 | }); |
119 | 120 | ||
120 | // Prevent drag and drop into window from redirecting | 121 | // Prevent drag and drop into window from redirecting |