Skip to content

Commit

Permalink
Merge pull request #221 from ymaheshwari1/#219
Browse files Browse the repository at this point in the history
Improved: code to disable the goToOms button when redirectionUrl is not found and added go to launchpad button(#219)
  • Loading branch information
ymaheshwari1 authored May 23, 2024
2 parents c63539f + 9f83ab2 commit 57e98fe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"Group": "Group",
"Group history": "Group history",
"Group status updated": "Group status updated",
"Go to Launchpad": "Go to Launchpad",
"Go to OMS": "Go to OMS",
"greater": "greater",
"greater than or equal to": "greater than or equal to",
Expand Down
10 changes: 9 additions & 1 deletion src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
</ion-card-header>
</ion-item>
<ion-button color="danger" @click="logout()">{{ translate("Logout") }}</ion-button>
<ion-button fill="outline" @click="goToLaunchpad()">
{{ translate("Go to Launchpad") }}
<ion-icon slot="end" :icon="openOutline" />
</ion-button>
<!-- Commenting this code as we currently do not have reset password functionality -->
<!-- <ion-button fill="outline" color="medium">{{ "Reset password") }}</ion-button> -->
</ion-card>
Expand All @@ -43,7 +47,7 @@
<ion-card-content>
{{ $t('This is the name of the OMS you are connected to right now. Make sure that you are connected to the right instance before proceeding.') }}
</ion-card-content>
<ion-button @click="goToOms(omsRedirectionInfo.token, omsRedirectionInfo.url)" fill="clear">
<ion-button :disabled="!omsRedirectionInfo.token || !omsRedirectionInfo.url" @click="goToOms(omsRedirectionInfo.token, omsRedirectionInfo.url)" fill="clear">
{{ $t('Go to OMS') }}
<ion-icon slot="end" :icon="openOutline" />
</ion-button>
Expand Down Expand Up @@ -144,6 +148,10 @@ function logout() {
function getDateTime(time: any) {
return time ? DateTime.fromMillis(time).toLocaleString({ ...DateTime.DATETIME_MED, hourCycle: "h12" }) : "";
}
function goToLaunchpad() {
window.location.href = `${process.env.VUE_APP_LOGIN_URL}`
}
</script>

<style scoped>
Expand Down

0 comments on commit 57e98fe

Please sign in to comment.