aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.js')
-rw-r--r--src/app.js15
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';
18import actions from './actions'; 18import actions from './actions';
19import MenuFactory from './lib/Menu'; 19import MenuFactory from './lib/Menu';
20import TouchBarFactory from './lib/TouchBar'; 20import TouchBarFactory from './lib/TouchBar';
21import * as analytics from './lib/analytics';
22 21
23import I18N from './I18n'; 22import I18N from './I18n';
24import AppLayoutContainer from './containers/layout/AppLayoutContainer'; 23import AppLayoutContainer from './containers/layout/AppLayoutContainer';
@@ -31,8 +30,10 @@ import TeamScreen from './containers/settings/TeamScreen';
31import EditUserScreen from './containers/settings/EditUserScreen'; 30import EditUserScreen from './containers/settings/EditUserScreen';
32import EditSettingsScreen from './containers/settings/EditSettingsScreen'; 31import EditSettingsScreen from './containers/settings/EditSettingsScreen';
33import InviteSettingsScreen from './containers/settings/InviteScreen'; 32import InviteSettingsScreen from './containers/settings/InviteScreen';
33import SupportFerdiScreen from './containers/settings/SupportScreen';
34import WelcomeScreen from './containers/auth/WelcomeScreen'; 34import WelcomeScreen from './containers/auth/WelcomeScreen';
35import LoginScreen from './containers/auth/LoginScreen'; 35import LoginScreen from './containers/auth/LoginScreen';
36import LockedScreen from './containers/auth/LockedScreen';
36import PasswordScreen from './containers/auth/PasswordScreen'; 37import PasswordScreen from './containers/auth/PasswordScreen';
37import SignupScreen from './containers/auth/SignupScreen'; 38import SignupScreen from './containers/auth/SignupScreen';
38import ImportScreen from './containers/auth/ImportScreen'; 39import ImportScreen from './containers/auth/ImportScreen';
@@ -54,20 +55,20 @@ webFrame.setVisualZoomLevelLimits(1, 1);
54webFrame.setLayoutZoomLevelLimits(0, 0); 55webFrame.setLayoutZoomLevelLimits(0, 0);
55 56
56window.addEventListener('load', () => { 57window.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