diff options
Diffstat (limited to 'src/app.js')
-rw-r--r-- | src/app.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/app.js b/src/app.js index cb3e37c64..1c2f66592 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'; |
@@ -31,8 +30,10 @@ import TeamScreen from './containers/settings/TeamScreen'; | |||
31 | import EditUserScreen from './containers/settings/EditUserScreen'; | 30 | import EditUserScreen from './containers/settings/EditUserScreen'; |
32 | import EditSettingsScreen from './containers/settings/EditSettingsScreen'; | 31 | import EditSettingsScreen from './containers/settings/EditSettingsScreen'; |
33 | import InviteSettingsScreen from './containers/settings/InviteScreen'; | 32 | import InviteSettingsScreen from './containers/settings/InviteScreen'; |
33 | import SupportFerdiScreen from './containers/settings/SupportScreen'; | ||
34 | import WelcomeScreen from './containers/auth/WelcomeScreen'; | 34 | import WelcomeScreen from './containers/auth/WelcomeScreen'; |
35 | import LoginScreen from './containers/auth/LoginScreen'; | 35 | import LoginScreen from './containers/auth/LoginScreen'; |
36 | import LockedScreen from './containers/auth/LockedScreen'; | ||
36 | import PasswordScreen from './containers/auth/PasswordScreen'; | 37 | import PasswordScreen from './containers/auth/PasswordScreen'; |
37 | import SignupScreen from './containers/auth/SignupScreen'; | 38 | import SignupScreen from './containers/auth/SignupScreen'; |
38 | import ImportScreen from './containers/auth/ImportScreen'; | 39 | import ImportScreen from './containers/auth/ImportScreen'; |
@@ -54,20 +55,20 @@ webFrame.setVisualZoomLevelLimits(1, 1); | |||
54 | webFrame.setLayoutZoomLevelLimits(0, 0); | 55 | webFrame.setLayoutZoomLevelLimits(0, 0); |
55 | 56 | ||
56 | window.addEventListener('load', () => { | 57 | window.addEventListener('load', () => { |
57 | const api = apiFactory(new ServerApi(), new LocalApi()); | 58 | const serverApi = new ServerApi(); |
59 | const api = apiFactory(serverApi, new LocalApi()); | ||
58 | const router = new RouterStore(); | 60 | const router = new RouterStore(); |
59 | const history = syncHistoryWithStore(hashHistory, router); | ||
60 | const stores = storeFactory(api, actions, router); | 61 | const stores = storeFactory(api, actions, router); |
62 | const history = syncHistoryWithStore(hashHistory, router); | ||
61 | const menu = new MenuFactory(stores, actions); | 63 | const menu = new MenuFactory(stores, actions); |
62 | const touchBar = new TouchBarFactory(stores, actions); | 64 | const touchBar = new TouchBarFactory(stores, actions); |
63 | 65 | ||
64 | window.franz = { | 66 | window.ferdi = { |
65 | stores, | 67 | stores, |
66 | actions, | 68 | actions, |
67 | api, | 69 | api, |
68 | menu, | 70 | menu, |
69 | touchBar, | 71 | touchBar, |
70 | analytics, | ||
71 | features: {}, | 72 | features: {}, |
72 | render() { | 73 | render() { |
73 | const preparedApp = ( | 74 | const preparedApp = ( |
@@ -89,12 +90,14 @@ window.addEventListener('load', () => { | |||
89 | <Route path="/settings/team" component={TeamScreen} /> | 90 | <Route path="/settings/team" component={TeamScreen} /> |
90 | <Route path="/settings/app" component={EditSettingsScreen} /> | 91 | <Route path="/settings/app" component={EditSettingsScreen} /> |
91 | <Route path="/settings/invite" component={InviteSettingsScreen} /> | 92 | <Route path="/settings/invite" component={InviteSettingsScreen} /> |
93 | <Route path="/settings/support" component={SupportFerdiScreen} /> | ||
92 | </Route> | 94 | </Route> |
93 | </Route> | 95 | </Route> |
94 | <Route path="/auth" component={AuthLayoutContainer}> | 96 | <Route path="/auth" component={AuthLayoutContainer}> |
95 | <IndexRedirect to="/auth/welcome" /> | 97 | <IndexRedirect to="/auth/welcome" /> |
96 | <Route path="/auth/welcome" component={WelcomeScreen} /> | 98 | <Route path="/auth/welcome" component={WelcomeScreen} /> |
97 | <Route path="/auth/login" component={LoginScreen} /> | 99 | <Route path="/auth/login" component={LoginScreen} /> |
100 | <Route path="/auth/locked" component={LockedScreen} /> | ||
98 | <Route path="/auth/signup"> | 101 | <Route path="/auth/signup"> |
99 | <IndexRedirect to="/auth/signup/form" /> | 102 | <IndexRedirect to="/auth/signup/form" /> |
100 | <Route path="/auth/signup/form" component={SignupScreen} /> | 103 | <Route path="/auth/signup/form" component={SignupScreen} /> |
@@ -114,7 +117,7 @@ window.addEventListener('load', () => { | |||
114 | render(preparedApp, document.getElementById('root')); | 117 | render(preparedApp, document.getElementById('root')); |
115 | }, | 118 | }, |
116 | }; | 119 | }; |
117 | window.franz.render(); | 120 | window.ferdi.render(); |
118 | }); | 121 | }); |
119 | 122 | ||
120 | // Prevent drag and drop into window from redirecting | 123 | // Prevent drag and drop into window from redirecting |