Skip to content

Commit

Permalink
feat: Review UX to add node - MEED-6834 - Meeds-io/MIPs#137 (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
SaraBoutej authored and exo-swf committed Aug 22, 2024
1 parent d5e7066 commit 1813609
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default {
navigationNode: null,
elementName: null,
elementTitle: null,
pageTemplate: 'empty',
pageTemplate: null,
selectedPage: null,
loading: false,
resetDrawer: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@
v-if="!allSites"
v-model="selectedSiteNavigation"
:all-sites="allSites"
class="mb-6" />
:class="!allSites && 'mb-8'" />
<site-navigation-page-suggester
:page="selectedPage"
:all-sites="allSites"
:site-type="selectedSiteNavigation?.siteType"
:site-name="selectedSiteNavigation?.name"
class="mb-8" />
:site-name="selectedSiteNavigation?.name" />
</div>
</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<div>
<div
:style="imageContainerStyle"
class="overflow-hidden border-color rounded pa-1 hover-elevation"
:class="selected && 'primary-border-color' || 'border-color'"
class="overflow-hidden rounded pa-1 hover-elevation"
@click="selectTemplate">
<img
:src="illustrationSrc"
Expand All @@ -32,11 +33,11 @@
<p
v-if="title"
v-sanitized-html="title"
class="mb-0 font-weight-regular text-truncate subtitle-2"></p>
class="mb-0 font-weight-regular text-truncate"></p>
<p
v-if="description"
v-sanitized-html="description"
class="mb-0 caption text-truncate-2"></p>
class="mb-0 text-subtitle text-truncate-2"></p>
</div>
</div>
</template>
Expand All @@ -48,6 +49,11 @@ export default {
default: null
},
},
data() {
return {
selected: false
};
},
computed: {
title() {
return this.pageTemplate?.name;
Expand Down Expand Up @@ -79,11 +85,12 @@ export default {
'max-height': '100px',
'height': '100px'
};
},
}
},
methods: {
selectTemplate() {
this.$root.$emit('page-template-changed', this.pageTemplate);
this.selected = !this.selected;
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<site-navigation-existing-page-element
v-if="!isNewPageElement"
:selected-page="selectedPage" />
<div class="d-flex align-center justify-space-between flex-row ms-8 pb-2">
<div class="d-flex align-center justify-space-between flex-row ms-8 pb-2 mt-2">
<span>
{{ $t('siteNavigation.label.openSameTab') }}
</span>
Expand Down Expand Up @@ -272,7 +272,7 @@ export default {
isScheduled: false,
disableNodeId: false,
displayNodeName: false,
elementType: 'Group',
elementType: 'PAGE',
allSites: true,
nodeTarget: true,
parentNavigationNodeUrl: '',
Expand Down Expand Up @@ -388,7 +388,7 @@ export default {
this.visible = true;
this.isScheduled = false;
this.displayNodeName = false;
this.elementType = 'Group';
this.elementType = 'PAGE';
this.nodeTarget = true;
this.disableNodeId = false;
this.editMode= false;
Expand Down

0 comments on commit 1813609

Please sign in to comment.