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

Improved: alert message for already active user (#54) #57

Merged
merged 4 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
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
5 changes: 2 additions & 3 deletions src/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"Already active session": "Already active session",
"A session for is already active for. Do you want to continue or login again?": "A session for {partyName} is already active for {oms}. Do you want to continue or login again?",
"Continue": "Continue",
"Re-login": "Re-login",
"Launch Pad": "Launch Pad",
"Login": "Login",
"Logout": "Logout",
Expand All @@ -12,7 +9,9 @@
"Please fill in the OMS": "Please fill in the OMS",
"Please fill in the user details": "Please fill in the user details",
"Processing": "Processing",
"Resume": "Resume",
"Something went wrong while login. Please contact administrator.": "Something went wrong while login. Please contact administrator.",
"Sorry, your username or password is incorrect. Please try again.": "Sorry, your username or password is incorrect. Please try again.",
"There is an already active session on for. Do you want to resume it, or would you prefer to log in again?": "There is an already active session on {oms} for {partyName}. Do you want to resume it, or would you prefer to log in again?",
"Username": "Username"
}
6 changes: 3 additions & 3 deletions src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
this.loginOption = resp.data
}
} catch (error) {
console.error(error)

Check warning on line 227 in src/views/Login.vue

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (16.x)

Unexpected console statement
}
},
async login() {
Expand All @@ -245,7 +245,7 @@
this.router.push('/')
}
} catch (error) {
console.error(error)

Check warning on line 248 in src/views/Login.vue

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (16.x)

Unexpected console statement
}
},
async samlLogin() {
Expand All @@ -258,7 +258,7 @@
this.router.push('/')
}
} catch (error) {
console.error(error)

Check warning on line 261 in src/views/Login.vue

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (16.x)

Unexpected console statement
}
},
async confirmActvSessnLoginOnRedrct() {
Expand All @@ -268,15 +268,15 @@
translucent: true,
backdropDismiss: false,
header: translate('Already active session'),
message: translate(`A session for is already active for. Do you want to continue or login again?`, { partyName: this.authStore.current.partyName, oms: this.authStore.getOMS }),
message: translate(`There is an already active session on for. Do you want to resume it, or would you prefer to log in again?`, { partyName: this.authStore.current.partyName, oms: this.authStore.getOMS }),
buttons: [{
text: translate('Continue'),
text: translate('Resume'),
handler: () => {
window.location.href = `${this.authStore.getRedirectUrl}?oms=${this.authStore.oms}&token=${this.authStore.token.value}&expirationTime=${this.authStore.token.expiration}`
this.isConfirmingForActiveSession = false;
}
}, {
text: translate('Re-login'),
text: translate('Login'),
handler: async () => {
const redirectUrl = this.authStore.getRedirectUrl
await this.authStore.logout()
Expand Down
Loading