aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.js')
-rw-r--r--src/app.js13
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';
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';
@@ -33,6 +32,7 @@ import EditSettingsScreen from './containers/settings/EditSettingsScreen';
33import InviteSettingsScreen from './containers/settings/InviteScreen'; 32import InviteSettingsScreen from './containers/settings/InviteScreen';
34import WelcomeScreen from './containers/auth/WelcomeScreen'; 33import WelcomeScreen from './containers/auth/WelcomeScreen';
35import LoginScreen from './containers/auth/LoginScreen'; 34import LoginScreen from './containers/auth/LoginScreen';
35import LockedScreen from './containers/auth/LockedScreen';
36import PasswordScreen from './containers/auth/PasswordScreen'; 36import PasswordScreen from './containers/auth/PasswordScreen';
37import SignupScreen from './containers/auth/SignupScreen'; 37import SignupScreen from './containers/auth/SignupScreen';
38import ImportScreen from './containers/auth/ImportScreen'; 38import ImportScreen from './containers/auth/ImportScreen';
@@ -54,20 +54,20 @@ webFrame.setVisualZoomLevelLimits(1, 1);
54webFrame.setLayoutZoomLevelLimits(0, 0); 54webFrame.setLayoutZoomLevelLimits(0, 0);
55 55
56window.addEventListener('load', () => { 56window.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