Skip to content

Commit 6ebe645

Browse files
committed
fix: Hide User Setting Applications when advanced settings displayed - MEED-7311 - Meeds-io/meeds#2297 (#3964)
Prior to this change, when displaying a window detail in user settings, like notification settings, an extra top margin is displayed. This change ensures to hide all other portlets when a user setting widget is displayed.
1 parent 0eb318a commit 6ebe645

File tree

3 files changed

+58
-36
lines changed

3 files changed

+58
-36
lines changed

webapp/portlet/src/main/webapp/vue-apps/notification-user-settings/components/UserSettingNotifications.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<v-app v-if="displayed">
2+
<v-app>
33
<user-setting-notifications-window
44
v-if="displayDetails"
55
:settings="notificationSettings"
@@ -85,6 +85,14 @@ export default {
8585
displayDetails: false,
8686
displayed: true,
8787
}),
88+
watch: {
89+
displayed() {
90+
if (this.displayed) {
91+
this.$nextTick().then(() => this.$root.$emit('application-cache'));
92+
}
93+
this.$root.$updateApplicationVisibility(this.displayed);
94+
},
95+
},
8896
created() {
8997
document.addEventListener('hideSettingsApps', (event) => {
9098
if (event && event.detail && this.id !== event.detail) {
@@ -101,6 +109,9 @@ export default {
101109
}
102110
});
103111
},
112+
mounted() {
113+
this.$root.$updateApplicationVisibility(this.displayed);
114+
},
104115
methods: {
105116
refresh() {
106117
return fetch(`${eXo.env.portal.context}/${eXo.env.portal.rest}/notifications/settings/${eXo.env.portal.userName}`, {

webapp/portlet/src/main/webapp/vue-apps/user-setting-language/components/UserSettingLanguage.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<v-app v-if="displayed">
2+
<v-app>
33
<div class="application-body">
44
<v-list two-line>
55
<v-list-item>
@@ -50,6 +50,14 @@ export default {
5050
return language && language.text;
5151
},
5252
},
53+
watch: {
54+
displayed() {
55+
if (this.displayed) {
56+
this.$nextTick().then(() => this.$root.$emit('application-cache'));
57+
}
58+
this.$root.$updateApplicationVisibility(this.displayed);
59+
},
60+
},
5361
created() {
5462
this.languages = this.languages.sort((a, b) => a.text.localeCompare(b.text));
5563
document.addEventListener('hideSettingsApps', (event) => {
@@ -61,6 +69,7 @@ export default {
6169
},
6270
mounted() {
6371
this.$nextTick().then(() => this.$root.$applicationLoaded());
72+
this.$root.$updateApplicationVisibility(this.displayed);
6473
},
6574
methods: {
6675
openDrawer() {

webapp/portlet/src/main/webapp/vue-apps/user-setting-security/components/UserSettingSecurity.vue

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,36 @@
11
<template>
22
<v-app>
3-
<template v-if="displayed">
4-
<user-setting-security-window
5-
v-if="displayDetails"
6-
@back="closeSecurityDetail" />
7-
<v-card
8-
v-else
9-
class="application-body"
10-
flat>
11-
<v-list>
12-
<v-list-item>
13-
<v-list-item-content>
14-
<v-list-item-title class="text-title">
15-
{{ $t('UserSettings.security') }}
16-
</v-list-item-title>
17-
</v-list-item-content>
18-
<v-list-item-action>
19-
<span
20-
:title="allowedToChangePassword ? $t('UserSettings.button.tooltip.enabled') : $t('UserSettings.button.tooltip.disabled')">
21-
<v-btn
22-
:disabled="!allowedToChangePassword"
23-
small
24-
icon
25-
@click="openSecurityDetail">
26-
<v-icon size="24" class="icon-default-color">
27-
{{ $vuetify.rtl && 'fa-caret-left' || 'fa-caret-right' }}
28-
</v-icon>
29-
</v-btn>
30-
</span>
31-
</v-list-item-action>
32-
</v-list-item>
33-
</v-list>
34-
</v-card>
35-
</template>
3+
<user-setting-security-window
4+
v-if="displayDetails"
5+
@back="closeSecurityDetail" />
6+
<v-card
7+
v-else
8+
class="application-body"
9+
flat>
10+
<v-list>
11+
<v-list-item>
12+
<v-list-item-content>
13+
<v-list-item-title class="text-title">
14+
{{ $t('UserSettings.security') }}
15+
</v-list-item-title>
16+
</v-list-item-content>
17+
<v-list-item-action>
18+
<span
19+
:title="allowedToChangePassword ? $t('UserSettings.button.tooltip.enabled') : $t('UserSettings.button.tooltip.disabled')">
20+
<v-btn
21+
:disabled="!allowedToChangePassword"
22+
small
23+
icon
24+
@click="openSecurityDetail">
25+
<v-icon size="24" class="icon-default-color">
26+
{{ $vuetify.rtl && 'fa-caret-left' || 'fa-caret-right' }}
27+
</v-icon>
28+
</v-btn>
29+
</span>
30+
</v-list-item-action>
31+
</v-list-item>
32+
</v-list>
33+
</v-card>
3634
</v-app>
3735
</template>
3836

@@ -48,7 +46,10 @@ export default {
4846
}),
4947
watch: {
5048
displayed() {
51-
this.$nextTick().then(() => this.$root.$emit('application-cache'));
49+
if (this.displayed) {
50+
this.$nextTick().then(() => this.$root.$emit('application-cache'));
51+
}
52+
this.$root.$updateApplicationVisibility(this.displayed);
5253
},
5354
},
5455
created() {
@@ -65,6 +66,7 @@ export default {
6566
},
6667
mounted() {
6768
this.$nextTick().then(() => this.$root.$applicationLoaded());
69+
this.$root.$updateApplicationVisibility(this.displayed);
6870
},
6971
methods: {
7072
openSecurityDetail() {

0 commit comments

Comments
 (0)