Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed login #670

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<v-app>
<Snackbar></Snackbar>

<Bcheader class="bcheader">
<div v-if="isAuthenticatedGet && dataReady">
<v-btn @click="dialog = true">{{ userInfoGet.userName }}</v-btn>
Expand Down Expand Up @@ -57,13 +58,13 @@
<v-card-text>
<p v-if="tokenExpired">Your session has expired. Please Login.</p>
<p v-else>
Your session is about to expire in {{ timerValue }} seconds. Are
you still there?
Your session is about to expire in {{ timerValue }} seconds. Do
you want to extend your session?
</p>
</v-card-text>

<v-card-actions>
<v-btn @click="login" v-if="tokenExpired">Login</v-btn>
<v-btn :href="authRoutes.LOGIN" v-if="tokenExpired">Login</v-btn>
<v-btn @click="resumeSession" v-else>Yes</v-btn>
<v-btn @click="logout">Logout</v-btn>
</v-card-actions>
Expand Down Expand Up @@ -133,8 +134,8 @@ export default {
dataReady: function () {
return this.userInfoGet;
},
loginUrl: function () {
return this.authRoutes.LOGIN;
timeRemaining: function () {
return Math.floor(this.timerValue);
},
},
methods: {
Expand Down Expand Up @@ -177,7 +178,7 @@ export default {
},
login() {
// Use Vue Router to navigate to the login route
this.$router.push(this.loginUrl);
this.$router.push(this.authRoutes.LOGIN);
},
},
};
Expand Down
Loading