Skip to content

Commit

Permalink
fix(webapp): show password reset only if not logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
Rotzbua authored and peterthomassen committed Jul 3, 2023
1 parent 6e3e47a commit bb7f2a6
Showing 1 changed file with 50 additions and 39 deletions.
89 changes: 50 additions & 39 deletions www/webapp/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -202,45 +202,6 @@ export default {
email: process.env.VUE_APP_EMAIL,
mdiHeart,
mdiMenuDown,
menu: {
'home': {
'name': 'home',
'icon': mdiHome,
'text': 'Home',
},
'docs': {
'name': 'docs',
'icon': mdiBookOpenPageVariant,
'text': 'Docs',
},
'roadmap': {
'name': 'roadmap',
'icon': mdiRoadVariant,
'text': 'Roadmap',
},
'talk': {
'name': 'talk',
'icon': mdiForumOutline,
'text': 'Talk',
},
'donate': {
'name': 'donate',
'icon': mdiGiftOutline,
'text': 'Donate',
'post_icon': mdiHeart,
'post_icon_color': 'red',
},
'about': {
'name': 'about',
'icon': mdiUmbrella,
'text': 'About',
},
'reset-password': {
'name': 'reset-password',
'icon': mdiLockReset,
'text': 'Reset Account Password',
},
},
tabmenu: {
'domains': {
'name': 'domains',
Expand All @@ -266,6 +227,56 @@ export default {
},
},
}),
computed: {
menu: () => {
const user = useUserStore();
const menu_perma = {
'home': {
'name': 'home',
'icon': mdiHome,
'text': 'Home',
},
'docs': {
'name': 'docs',
'icon': mdiBookOpenPageVariant,
'text': 'Docs',
},
'roadmap': {
'name': 'roadmap',
'icon': mdiRoadVariant,
'text': 'Roadmap',
},
'talk': {
'name': 'talk',
'icon': mdiForumOutline,
'text': 'Talk',
},
'donate': {
'name': 'donate',
'icon': mdiGiftOutline,
'text': 'Donate',
'post_icon': mdiHeart,
'post_icon_color': 'red',
},
'about': {
'name': 'about',
'icon': mdiUmbrella,
'text': 'About',
},
};
let menu_opt = {};
if(!user.authenticated) {
menu_opt = {
'reset-password': {
'name': 'reset-password',
'icon': mdiLockReset,
'text': 'Reset Account Password',
},
};
}
return {...menu_perma, ...menu_opt};
},
},
methods: {
async logout() {
await logout();
Expand Down

0 comments on commit bb7f2a6

Please sign in to comment.