Skip to content

Commit

Permalink
Replace data privacy 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 557b06e commit 88e24e1
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions client/src/components/User/UserPreferences.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,17 @@
icon="fa-sign-out"
title="Sign Out"
description="Click here to sign out of all sessions."
@click="toggleLogout = !toggleLogout" />
@click="showLogoutModal = true" />
<b-modal v-model="showDataPrivateModal" title="Datasets are now private" title-class="font-weight-bold" ok-only>
<span v-localize>
All of your histories and datasets have been made private. If you'd like to make all *future* histories
private please use the
</span>
<a :href="userPermissionsUrl">User Permissions</a>
<span v-localize>interface</span>.
</b-modal>
<b-modal
v-model="toggleLogout"
v-model="showLogoutModal"
title="Sign out"
title-class="font-weight-bold"
ok-title="Sign out"
Expand Down Expand Up @@ -173,8 +181,9 @@ export default {
diskQuota: "",
messageVariant: null,
message: null,
showLogoutModal: false,
showDataPrivateModal: false,
toggleActivityBar: false,
toggleLogout: false,
toggleTheme: false,
};
},
Expand All @@ -195,6 +204,9 @@ export default {
const themes = Object.keys(this.config.themes);
return themes?.length > 1 ?? false;
},
userPermissionsUrl() {
return withPrefix("/user/permissions");
},
},
created() {
const message = QueryStringParsing.get("message");
Expand All @@ -211,7 +223,6 @@ export default {
},
methods: {
makeDataPrivate() {
const Galaxy = getGalaxyInstance();
if (
confirm(
_l(
Expand All @@ -225,18 +236,8 @@ export default {
)
)
) {
axios.post(withPrefix(`/history/make_private?all_histories=true`)).then((response) => {
Galaxy.modal.show({
title: _l("Datasets are now private"),
body: `All of your histories and datasets have been made private. If you'd like to make all *future* histories private please use the <a href="${withPrefix(
"/user/permissions"
)}">User Permissions</a> interface.`,
buttons: {
Close: () => {
Galaxy.modal.hide();
},
},
});
axios.post(withPrefix(`/history/make_private?all_histories=true`)).then(() => {
this.showDataPrivateModal = true;
});
}
},
Expand Down

0 comments on commit 88e24e1

Please sign in to comment.