Browse Source

Redirect to restore page in restoring mode

pull/8/head
Kristijan Mitrovic 4 years ago
parent
commit
f1b96e7e6b
2 changed files with 11 additions and 4 deletions
  1. +11
    -3
      src/app/App.vue
  2. +0
    -1
      src/auth/LoginPage.vue

+ 11
- 3
src/app/App.vue View File

@@ -1,6 +1,8 @@
<!-- Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ -->
<template>
<div class="jumbotron">
<div v-if="!configs"><img :src="loadingImgSrc" /></div>

<div v-else class="jumbotron">
<totp-modal/>

<router-link v-if="status.loggedIn && activated && path && path !== '' && path !== '/'" to="/" class="icon-dash-cell">
@@ -40,13 +42,15 @@
<script>
import { mapState, mapActions } from 'vuex'
import { util } from '../_helpers'
import { loadingImgSrc } from '../_store';

export default {
name: 'app',
data() {
return {
showLocaleSelector: false,
selectedLocale: 'detect'
selectedLocale: 'detect',
loadingImgSrc: loadingImgSrc
}
},
computed: {
@@ -56,7 +60,8 @@ export default {
alert: state => state.alert
}),
locales () { return this.configs.locales; },
path () { return this.$route.path; }
path () { return this.$route.path; },
isInRestoringMode () { return this.configs ? this.configs.isInRestoringStatus : undefined; }
},
methods: {
...mapActions({ clearAlert: 'alert/clear' }),
@@ -101,6 +106,9 @@ export default {
locale (loc) {
this.selectedLocale = loc;
this.reloadMessages()
},
isInRestoringMode (restoringMode) {
if (restoringMode === true && this.path !== '/restore') this.$router.replace('/restore');
}
},
created() {


+ 0
- 1
src/auth/LoginPage.vue View File

@@ -60,7 +60,6 @@ export default {
},
created () {
this.loadSystemConfigs();
if (this.configs && this.configs.isInRestoringStatus) this.$router.replace('/restore');
},
computed: {
...mapState('account', ['status', 'loginError', 'resetPasswordMessageSent']),


Loading…
Cancel
Save