aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
authorLibravatar Bennett <hello@vantezzen.io>2020-03-25 10:30:08 +0100
committerLibravatar GitHub <noreply@github.com>2020-03-25 10:30:08 +0100
commit1cc9c70e4774f4da8b1ad927d6cb7f74c0ce730a (patch)
treec66660ee310029431c6943b31d6f8c53fcc59616 /src/stores
parentSupport new recipe repository hierarchy (#492) (diff)
downloadferdium-app-1cc9c70e4774f4da8b1ad927d6cb7f74c0ce730a.tar.gz
ferdium-app-1cc9c70e4774f4da8b1ad927d6cb7f74c0ce730a.tar.zst
ferdium-app-1cc9c70e4774f4da8b1ad927d6cb7f74c0ce730a.zip
Improve user onboarding (#493)
Until now, new users have started on the Ferdi dashboard and not on the Welcome screen like Franz does it. This change was made, as users needed to be ablet to change their server before logging in. This commit will change this onboarding process to bring users to the welcome screen on first login and it adds a new "Change Server" screen during authentication that allows the user to change the server without going to the full settings screen. This way, the onboarding experience for new users is a lot easier to go though while also improving the experience for experienced users who want to change their server as they only get the option they are looking for and not the whole settings list.
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/UserStore.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/stores/UserStore.js b/src/stores/UserStore.js
index ec0b0cf8d..3a53d150d 100644
--- a/src/stores/UserStore.js
+++ b/src/stores/UserStore.js
@@ -34,6 +34,8 @@ export default class UserStore extends Store {
34 34
35 PASSWORD_ROUTE = `${this.BASE_ROUTE}/password`; 35 PASSWORD_ROUTE = `${this.BASE_ROUTE}/password`;
36 36
37 CHANGE_SERVER_ROUTE = `${this.BASE_ROUTE}/server`;
38
37 @observable loginRequest = new Request(this.api.user, 'login'); 39 @observable loginRequest = new Request(this.api.user, 'login');
38 40
39 @observable signupRequest = new Request(this.api.user, 'signup'); 41 @observable signupRequest = new Request(this.api.user, 'signup');
@@ -97,7 +99,7 @@ export default class UserStore extends Store {
97 99
98 // Reactions 100 // Reactions
99 this.registerReactions([ 101 this.registerReactions([
100 // this._requireAuthenticatedUser, 102 this._requireAuthenticatedUser,
101 this._getUserData.bind(this), 103 this._getUserData.bind(this),
102 this._resetTrialActivationState.bind(this), 104 this._resetTrialActivationState.bind(this),
103 ]); 105 ]);
@@ -137,6 +139,10 @@ export default class UserStore extends Store {
137 return this.PASSWORD_ROUTE; 139 return this.PASSWORD_ROUTE;
138 } 140 }
139 141
142 get changeServerRoute() {
143 return this.CHANGE_SERVER_ROUTE;
144 }
145
140 // Data 146 // Data
141 @computed get isLoggedIn() { 147 @computed get isLoggedIn() {
142 return Boolean(localStorage.getItem('authToken')); 148 return Boolean(localStorage.getItem('authToken'));