Skip to content

Commit

Permalink
Replace logout modal in user preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Oct 11, 2023
1 parent 7d58fac commit 557b06e
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions client/src/components/User/UserPreferences.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,15 @@
icon="fa-sign-out"
title="Sign Out"
description="Click here to sign out of all sessions."
@click="signOut" />
@click="toggleLogout = !toggleLogout" />
<b-modal
v-model="toggleLogout"
title="Sign out"
title-class="font-weight-bold"
ok-title="Sign out"
@ok="signOut">
<span v-localize> Do you want to continue and sign out of all active sessions? </span>
</b-modal>
</b-container>
</template>

Expand Down Expand Up @@ -166,6 +174,7 @@ export default {
messageVariant: null,
message: null,
toggleActivityBar: false,
toggleLogout: false,
toggleTheme: false,
};
},
Expand Down Expand Up @@ -232,17 +241,7 @@ export default {
}
},
signOut() {
const Galaxy = getGalaxyInstance();
Galaxy.modal.show({
title: _l("Sign out"),
body: "Do you want to continue and sign out of all active sessions?",
buttons: {
Cancel: function () {
Galaxy.modal.hide();
},
"Sign out": userLogoutAll,
},
});
userLogoutAll();
},
},
};
Expand Down

0 comments on commit 557b06e

Please sign in to comment.