From 7d5794b9fa5db8fcf2a6169ab3d3dcda17b04326 Mon Sep 17 00:00:00 2001 From: Maxim Filippov Date: Thu, 6 Dec 2018 20:23:47 +0300 Subject: [PATCH] Fix redirect paths --- src/components/login_form/login_form.js | 2 +- src/components/oauth_callback/oauth_callback.js | 2 +- src/components/registration/registration.js | 4 ++-- src/components/user_settings/user_settings.js | 2 +- src/modules/instance.js | 4 ++-- static/config.json | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/login_form/login_form.js b/src/components/login_form/login_form.js index 49868aed10..622389d7c8 100644 --- a/src/components/login_form/login_form.js +++ b/src/components/login_form/login_form.js @@ -32,7 +32,7 @@ const LoginForm = { .then((result) => { this.$store.commit('setToken', result.access_token) this.$store.dispatch('loginUser', result.access_token) - this.$router.push('/main/friends') + this.$router.push('/p/main/friends') }) }) } diff --git a/src/components/oauth_callback/oauth_callback.js b/src/components/oauth_callback/oauth_callback.js index 7a5132ad88..d5a8cd7d56 100644 --- a/src/components/oauth_callback/oauth_callback.js +++ b/src/components/oauth_callback/oauth_callback.js @@ -11,7 +11,7 @@ const oac = { }).then((result) => { this.$store.commit('setToken', result.access_token) this.$store.dispatch('loginUser', result.access_token) - this.$router.push('/main/friends') + this.$router.push('/p/main/friends') }) } } diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js index e5ead8bc10..b714c38e4a 100644 --- a/src/components/registration/registration.js +++ b/src/components/registration/registration.js @@ -27,7 +27,7 @@ const registration = { }, created () { if ((!this.registrationOpen && !this.token) || this.signedIn) { - this.$router.push('/main/all') + this.$router.push('/p/main/all') } }, computed: { @@ -51,7 +51,7 @@ const registration = { if (!this.$v.$invalid) { try { await this.signUp(this.user) - this.$router.push('/main/friends') + this.$router.push('/p/main/friends') } catch (error) { console.warn('Registration failed: ' + error) } diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index 761e674ad0..ef7ba56a40 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -218,7 +218,7 @@ const UserSettings = { .then((res) => { if (res.status === 'success') { this.$store.dispatch('logout') - this.$router.push('/main/all') + this.$router.push('/p/main/all') } else { this.deleteAccountError = res.error } diff --git a/src/modules/instance.js b/src/modules/instance.js index 641424b6f5..65f001b212 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -12,8 +12,8 @@ const defaultState = { logo: '/static/logo.png', logoMask: true, logoMargin: '.2em', - redirectRootNoLogin: '/main/all', - redirectRootLogin: '/main/friends', + redirectRootNoLogin: '/p/main/all', + redirectRootLogin: '/p/main/friends', showInstanceSpecificPanel: false, scopeOptionsEnabled: true, formattingOptionsEnabled: false, diff --git a/static/config.json b/static/config.json index c49930efd3..5f5686ca83 100644 --- a/static/config.json +++ b/static/config.json @@ -4,8 +4,8 @@ "logo": "/static/logo.png", "logoMask": true, "logoMargin": ".1em", - "redirectRootNoLogin": "/main/all", - "redirectRootLogin": "/main/friends", + "redirectRootNoLogin": "/p/main/all", + "redirectRootLogin": "/p/main/friends", "chatDisabled": false, "showInstanceSpecificPanel": false, "scopeOptionsEnabled": false,