Skip to content

Commit

Permalink
feat: Review UI of Navigation drawer - MEED-6831 - Meeds-io/MIPs#137 (#…
Browse files Browse the repository at this point in the history
…125)

This PR adds UI/Ux adjustment to the site navigation drawer
  • Loading branch information
SaraBoutej authored and exo-swf committed Jun 19, 2024
1 parent a51a5ad commit c1871a9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,26 @@
allow-expand
@closed="close">
<template slot="title">
<span>{{ $t('siteNavigation.drawer.title') }}<v-chip
v-if="isMetaSite"
class="ms-4 primary">
{{ siteName }}
</v-chip></span>
<span>{{ $t('siteNavigation.drawer.title') }}</span>
</template>
<template slot="content">
<div :class="$refs.siteNavigationDrawer?.expand ? 'singlePageApplication' : ' ' ">
<v-toolbar
color="white"
flat
dense>
<v-btn
v-if="isMetaSite"
@click="createNode"
class="btn btn-primary ms-2">
{{ $t('siteNavigation.label.btn.createNode') }}
</v-btn>
<v-chip
v-else
class="ms-4 mt-3 mb-4 primary">
{{ siteName }}
</v-chip>
<v-spacer />
<span
class="font-weight-bold">
{{ siteName }}
</span>
<v-spacer v-if="!$refs.siteNavigationDrawer?.expand" />
<v-btn
v-if="isMetaSite"
@click="createNode"
class="btn btn-primary ms-2">
{{ $t('siteNavigation.label.btn.createNode') }}
</v-btn>
<v-spacer v-if="$refs.siteNavigationDrawer?.expand" />
<select
id="siteNavigationDrawerFilterSelect"
v-model="filter"
Expand Down Expand Up @@ -107,6 +103,9 @@ export default {
},
isMetaSite() {
return this.site?.metaSite;
},
activeNode() {
return this.navigationNodesToDisplay.find(node => node.uri === eXo.env.portal.selectedNodeUri || this.site.rootNode);
}
},
watch: {
Expand Down Expand Up @@ -151,7 +150,7 @@ export default {
.finally(() => this.loading = false);
},
createNode() {
this.$root.$emit('open-site-navigation-add-node-drawer', this.site.rootNode);
this.$root.$emit('open-site-navigation-add-node-drawer', this.activeNode);
},
filterNavigationNodes(){
this.navigationNodesToDisplay = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,4 +497,4 @@ export default {
}
}
};
</script>
</script>

0 comments on commit c1871a9

Please sign in to comment.