Skip to content

Commit

Permalink
Merge pull request #285 from SelfhostedPro/nightly
Browse files Browse the repository at this point in the history
working on logout after update
  • Loading branch information
SelfhostedPro authored Feb 18, 2021
2 parents 9322595 + b28323f commit 3a38365
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions frontend/src/components/serverSettings/ServerUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<script>
import axios from "axios";
import { mapMutations, mapActions } from "vuex";
import { mapMutations, mapActions, mapState } from "vuex";
export default {
data() {
return {
Expand All @@ -47,6 +47,9 @@ export default {
setMessage: "snackbar/setMessage",
setErr: "snackbar/setErr"
}),
...mapState({
authDisabled: "auth/authDisabled"
}),
...mapActions({
logout: "auth/AUTH_LOGOUT"
}),
Expand Down Expand Up @@ -85,7 +88,12 @@ export default {
const sleep = delay =>
new Promise(resolve => setTimeout(resolve, delay));
sleep(5000);
this.logout();
if (this.authDisabled == true){
this.$forceUpdate();
} else {
this.logout();
this.$forceUpdate();
}
})
.catch(err => {
this.isLoading = false;
Expand Down

0 comments on commit 3a38365

Please sign in to comment.