Skip to content

Commit

Permalink
feat: Hide Rule Drawer Menu when anonymous - MEED-2852 - Meeds-io/MIP…
Browse files Browse the repository at this point in the history
  • Loading branch information
boubaker authored and rdenarie committed Nov 9, 2023
1 parent bb0c775 commit 6d83b5f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export function init(isAdministrator, isProgramManager) {
Vue.createApp({
data: {
now: Date.now(),
isAnonymous: !eXo.env.portal.userIdentityId?.length,
},
computed: {
isMobile() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export function init(isAdministrator, isProgramManager) {
Vue.createApp({
data: {
now: Date.now(),
isAnonymous: !eXo.env.portal.userIdentityId?.length,
},
computed: {
isMobile() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export function init(isAdministrator, isProgramManager) {
Vue.createApp({
data: {
now: Date.now(),
isAnonymous: !eXo.env.portal.userIdentityId?.length,
},
computed: {
isMobile() {
Expand Down
4 changes: 4 additions & 0 deletions portlets/src/main/webapp/vue-app/profileStats/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ export function init() {
Vue.createApp({
data: {
isAnonymous: !eXo.env.portal.userIdentityId?.length,
now: Date.now(),
actionValueExtensions: [],
},
template: `<profile-stats id="${appId}" v-cacheable="{cacheId: '${cacheId}'}" />`,
created() {
window.setInterval(() => this.now = Date.now(), 1000);
},
i18n,
vuetify,
}, appElement, 'Profile Stats');
Expand Down
4 changes: 4 additions & 0 deletions portlets/src/main/webapp/vue-app/programsOverview/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ export function init() {
.then(i18n => {
Vue.createApp({
data: {
now: Date.now(),
isAnonymous: !eXo.env.portal.userIdentityId?.length,
},
template: `<gamification-overview-programs id="${appId}" />`,
created() {
window.setInterval(() => this.now = Date.now(), 1000);
},
i18n,
vuetify: Vue.prototype.vuetifyOptions,
}, `#${appId}`, 'Program Overview');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{{ $t('rule.detail.letsSeeWhatToDo') }}
</span>
</template>
<template v-if="rule && !loading && drawer" #titleIcons>
<template v-if="rule && !loading && drawer && !$root.isAnonymous" #titleIcons>
<rule-favorite-button
v-if="isProgramMember"
:rule-id="rule.id"
Expand Down

0 comments on commit 6d83b5f

Please sign in to comment.