diff options
author | 2020-05-01 12:49:22 +0200 | |
---|---|---|
committer | 2020-05-01 12:49:22 +0200 | |
commit | b479acc0a7d2aa06d8adc7a030691447a36e9cfb (patch) | |
tree | 9bdc5a9420fc38920b402bb7c8a78d5db0bca6dc /src/app.js | |
parent | Restore delete service in sidebar (#692) (diff) | |
download | ferdium-app-b479acc0a7d2aa06d8adc7a030691447a36e9cfb.tar.gz ferdium-app-b479acc0a7d2aa06d8adc7a030691447a36e9cfb.tar.zst ferdium-app-b479acc0a7d2aa06d8adc7a030691447a36e9cfb.zip |
Refactor locking feature (#693)
Diffstat (limited to 'src/app.js')
-rw-r--r-- | src/app.js | 69 |
1 files changed, 3 insertions, 66 deletions
diff --git a/src/app.js b/src/app.js index 0e24420c3..aab1729d7 100644 --- a/src/app.js +++ b/src/app.js | |||
@@ -5,7 +5,7 @@ import { render } from 'react-dom'; | |||
5 | import { Provider } from 'mobx-react'; | 5 | import { Provider } from 'mobx-react'; |
6 | import { syncHistoryWithStore, RouterStore } from 'mobx-react-router'; | 6 | import { syncHistoryWithStore, RouterStore } from 'mobx-react-router'; |
7 | import { | 7 | import { |
8 | Router, Route, hashHistory, IndexRedirect, | 8 | hashHistory, |
9 | } from 'react-router'; | 9 | } from 'react-router'; |
10 | 10 | ||
11 | import '@babel/polyfill'; | 11 | import '@babel/polyfill'; |
@@ -20,33 +20,7 @@ import MenuFactory from './lib/Menu'; | |||
20 | import TouchBarFactory from './lib/TouchBar'; | 20 | import TouchBarFactory from './lib/TouchBar'; |
21 | 21 | ||
22 | import I18N from './I18n'; | 22 | import I18N from './I18n'; |
23 | import AppLayoutContainer from './containers/layout/AppLayoutContainer'; | 23 | import Routes from './routes'; |
24 | import SettingsWindow from './containers/settings/SettingsWindow'; | ||
25 | import RecipesScreen from './containers/settings/RecipesScreen'; | ||
26 | import ServicesScreen from './containers/settings/ServicesScreen'; | ||
27 | import EditServiceScreen from './containers/settings/EditServiceScreen'; | ||
28 | import AccountScreen from './containers/settings/AccountScreen'; | ||
29 | import TeamScreen from './containers/settings/TeamScreen'; | ||
30 | import EditUserScreen from './containers/settings/EditUserScreen'; | ||
31 | import EditSettingsScreen from './containers/settings/EditSettingsScreen'; | ||
32 | import InviteSettingsScreen from './containers/settings/InviteScreen'; | ||
33 | import SupportFerdiScreen from './containers/settings/SupportScreen'; | ||
34 | import WelcomeScreen from './containers/auth/WelcomeScreen'; | ||
35 | import LoginScreen from './containers/auth/LoginScreen'; | ||
36 | import LockedScreen from './containers/auth/LockedScreen'; | ||
37 | import PasswordScreen from './containers/auth/PasswordScreen'; | ||
38 | import ChangeServerScreen from './containers/auth/ChangeServerScreen'; | ||
39 | import SignupScreen from './containers/auth/SignupScreen'; | ||
40 | import ImportScreen from './containers/auth/ImportScreen'; | ||
41 | import PricingScreen from './containers/auth/PricingScreen'; | ||
42 | import InviteScreen from './containers/auth/InviteScreen'; | ||
43 | import AuthLayoutContainer from './containers/auth/AuthLayoutContainer'; | ||
44 | import SubscriptionPopupScreen from './containers/subscription/SubscriptionPopupScreen'; | ||
45 | import WorkspacesScreen from './features/workspaces/containers/WorkspacesScreen'; | ||
46 | import EditWorkspaceScreen from './features/workspaces/containers/EditWorkspaceScreen'; | ||
47 | import { WORKSPACES_ROUTES } from './features/workspaces'; | ||
48 | import AnnouncementScreen from './features/announcements/components/AnnouncementScreen'; | ||
49 | import { ANNOUNCEMENTS_ROUTES } from './features/announcements'; | ||
50 | 24 | ||
51 | // Add Polyfills | 25 | // Add Polyfills |
52 | smoothScroll.polyfill(); | 26 | smoothScroll.polyfill(); |
@@ -74,44 +48,7 @@ window.addEventListener('load', () => { | |||
74 | const preparedApp = ( | 48 | const preparedApp = ( |
75 | <Provider stores={stores} actions={actions}> | 49 | <Provider stores={stores} actions={actions}> |
76 | <I18N> | 50 | <I18N> |
77 | <Router history={history}> | 51 | <Routes history={history} /> |
78 | <Route path="/" component={AppLayoutContainer}> | ||
79 | <Route path={ANNOUNCEMENTS_ROUTES.TARGET} component={AnnouncementScreen} /> | ||
80 | <Route path="/settings" component={SettingsWindow}> | ||
81 | <IndexRedirect to="/settings/recipes" /> | ||
82 | <Route path="/settings/recipes" component={RecipesScreen} /> | ||
83 | <Route path="/settings/recipes/:filter" component={RecipesScreen} /> | ||
84 | <Route path="/settings/services" component={ServicesScreen} /> | ||
85 | <Route path="/settings/services/:action/:id" component={EditServiceScreen} /> | ||
86 | <Route path={WORKSPACES_ROUTES.ROOT} component={WorkspacesScreen} /> | ||
87 | <Route path={WORKSPACES_ROUTES.EDIT} component={EditWorkspaceScreen} /> | ||
88 | <Route path="/settings/user" component={AccountScreen} /> | ||
89 | <Route path="/settings/user/edit" component={EditUserScreen} /> | ||
90 | <Route path="/settings/team" component={TeamScreen} /> | ||
91 | <Route path="/settings/app" component={EditSettingsScreen} /> | ||
92 | <Route path="/settings/invite" component={InviteSettingsScreen} /> | ||
93 | <Route path="/settings/support" component={SupportFerdiScreen} /> | ||
94 | </Route> | ||
95 | </Route> | ||
96 | <Route path="/auth" component={AuthLayoutContainer}> | ||
97 | <IndexRedirect to="/auth/welcome" /> | ||
98 | <Route path="/auth/welcome" component={WelcomeScreen} /> | ||
99 | <Route path="/auth/login" component={LoginScreen} /> | ||
100 | <Route path="/auth/locked" component={LockedScreen} /> | ||
101 | <Route path="/auth/server" component={ChangeServerScreen} /> | ||
102 | <Route path="/auth/signup"> | ||
103 | <IndexRedirect to="/auth/signup/form" /> | ||
104 | <Route path="/auth/signup/form" component={SignupScreen} /> | ||
105 | <Route path="/auth/signup/pricing" component={PricingScreen} /> | ||
106 | <Route path="/auth/signup/import" component={ImportScreen} /> | ||
107 | <Route path="/auth/signup/invite" component={InviteScreen} /> | ||
108 | </Route> | ||
109 | <Route path="/auth/password" component={PasswordScreen} /> | ||
110 | <Route path="/auth/logout" component={LoginScreen} /> | ||
111 | </Route> | ||
112 | <Route path="/payment/:url" component={SubscriptionPopupScreen} /> | ||
113 | <Route path="*" component={AppLayoutContainer} /> | ||
114 | </Router> | ||
115 | </I18N> | 52 | </I18N> |
116 | </Provider> | 53 | </Provider> |
117 | ); | 54 | ); |