Skip to content

Add a success modal that renders on the Login page when redirected from the Logout link #1277

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion src/containers/DefaultHeaderProfileDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default {
localStorage.removeItem('sessionInvalidate');
// Removes the token from session storage and reload
EventBus.$emit('authenticated', null);
this.$router.replace({ name: 'Login' });
this.$router.replace({ name: 'Login', query: { "fromLogout": "true" }});
},
canChangePassword: function () {
return this.identityProvider == 'LOCAL';
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@
"login_more_options": "Mehr Optionen",
"login_unauthorized": "ungültiger Benutzername oder Passwort",
"logout": "Ausloggen",
"logout_confirmation": "Sie haben sich erfolgreich abgemeldet.",
"manufacturer": "Hersteller",
"manufacturer_name": "Herstellername",
"manufacturer_name_desc": "Die Organisation, die die im Projekt beschriebene Komponente hergestellt hat",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@
"login_more_options": "More options",
"login_unauthorized": "Invalid username or password",
"logout": "Logout",
"logout_confirmation": "You have logged out successfully.",
"manufacturer": "Manufacturer",
"manufacturer_name": "Manufacturer name",
"manufacturer_name_desc": "The organization that manufactured the component that the project describes",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@
"login_more_options": "Mas opciones",
"login_unauthorized": "usuario o contraseña invalido",
"logout": "Cerrar sesión",
"logout_confirmation": "Has cerrado sesión exitosamente.",
"manufacturer": "Fabricante",
"manufacturer_name": "Nombre del Fabricante",
"manufacturer_name_desc": "La organización que fabricó el componente que describe el proyecto.",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@
"login_more_options": "Plus d'options",
"login_unauthorized": "Nom d'utilisateur ou mot de passe invalide",
"logout": "Se déconnecter",
"logout_confirmation": "Vous vous êtes déconnecté avec succès.",
"manufacturer": "Fabricant",
"manufacturer_name": "Nom du Fabricant",
"manufacturer_name_desc": "L'organisation qui a fabriqué le composant décrit par le projet",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@
"login_more_options": "अधिक विकल्प",
"login_unauthorized": "अमान्य उपयोगकर्ता नाम या पासवर्ड",
"logout": "लॉग आउट",
"logout_confirmation": "आपने सफलतापूर्वक लॉग आउट कर लिया है।",
"manufacturer": "उत्पादक",
"manufacturer_name": "निर्माता नाम",
"manufacturer_name_desc": "वह संगठन जिसने परियोजना में वर्णित घटक का निर्माण किया",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@
"login_more_options": "Più opzioni",
"login_unauthorized": "Nome utente o password errati",
"logout": "Disconnettersi",
"logout_confirmation": "Hai effettuato correttamente il logout.",
"manufacturer": "Produttore",
"manufacturer_name": "Nome del produttore",
"manufacturer_name_desc": "L'organizzazione che ha prodotto il componente descritto dal progetto",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@
"login_more_options": "より多くのオプション",
"login_unauthorized": "ユーザー名かパスワードが無効",
"logout": "ログアウト",
"logout_confirmation": "ログアウトに成功しました。",
"manufacturer": "メーカー",
"manufacturer_name": "メーカー名",
"manufacturer_name_desc": "プロジェクトで説明されているコンポーネントを製造した組織",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@
"login_more_options": "Więcej możliwości",
"login_unauthorized": "Nieprawidłowa nazwa użytkownika lub hasło",
"logout": "Wyloguj",
"logout_confirmation": "Wylogowano pomyślnie.",
"manufacturer": "Producent",
"manufacturer_name": "Nazwa producenta",
"manufacturer_name_desc": "Organizacja, która wyprodukowała komponent opisany w projekcie",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@
"login_more_options": "Mais opções",
"login_unauthorized": "nome de usuário ou senha inválidos",
"logout": "Sair",
"logout_confirmation": "Você efetuou logout com sucesso.",
"manufacturer": "Fabricante",
"manufacturer_name": "Nome do fabricante",
"manufacturer_name_desc": "A organização que fabricou o componente que o projeto descreve",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@
"login_more_options": "Mais opções",
"login_unauthorized": "nome de utilizador ou palavra passe inválidos",
"logout": "Sair",
"logout_confirmation": "Efetuou logout com sucesso.",
"manufacturer": "Fabricante",
"manufacturer_name": "Nome do fabricante",
"manufacturer_name_desc": "A organização que fabricou o componente que o projeto descreve",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@
"login_more_options": "Больше опций",
"login_unauthorized": "Неверное имя пользователя или пароль",
"logout": "Выход",
"logout_confirmation": "Вы успешно вышли из системы.",
"manufacturer": "Производитель",
"manufacturer_name": "Имя производителя",
"manufacturer_name_desc": "Организация, которая произвела компонент, описанный проектом",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/uk-UA.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@
"login_more_options": "Більше варіантів",
"login_unauthorized": "Неправильне ім'я користувача або пароль",
"logout": "Вийти",
"logout_confirmation": "Ви успішно вийшли з системи.",
"manufacturer": "Виробник",
"manufacturer_name": "Назва виробника",
"manufacturer_name_desc": "Організація, яка виготовила компонент, описаний у проекті",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@
"login_more_options": "更多的选择",
"login_unauthorized": "用户名或密码无效",
"logout": "登出",
"logout_confirmation": "您已成功退出。",
"manufacturer": "厂商",
"manufacturer_name": "厂商名称",
"manufacturer_name_desc": "制造项目所述组件的组织",
Expand Down
5 changes: 5 additions & 0 deletions src/views/pages/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export default {
},
data() {
return {
isFromLogout: false,
isWelcomeMessage: true,
welcomeMessage: '',
loginError: '',
Expand All @@ -146,6 +147,7 @@ export default {
};
},
beforeMount() {
this.isFromLogout = this.$route.query.fromLogout === 'true';
let enabled_url = `${this.$api.BASE_URL}/${this.$api.URL_CONFIG_PROPERTY}/public/general/welcome.message.enabled`;
axios
.get(enabled_url)
Expand Down Expand Up @@ -252,6 +254,9 @@ export default {
},
},
mounted() {
if (this.isFromLogout) {
this.$toastr.s(this.$t('message.logout_confirmation'));
}
this.checkOidcAvailability()
.then((oidcAvailable) => {
this.oidcAvailable = oidcAvailable;
Expand Down