Skip to content

Commit

Permalink
feat: Adjust notes action menu ui revamping - EXO-72270 - Meeds-io/MI…
Browse files Browse the repository at this point in the history
  • Loading branch information
hakermi authored Jun 21, 2024
1 parent 2368c26 commit 1dfc09c
Show file tree
Hide file tree
Showing 7 changed files with 339 additions and 150 deletions.
23 changes: 17 additions & 6 deletions notes-webapp/src/main/webapp/skin/less/notes/notes.less
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,22 @@
}
}

#notesActionMenuBottomDrawer, #notesOverviewApplication,
.notesApplication .notes-application-header .note-actions-menu {
.action-menu-item {
min-height: 28px !important;
}

.delete-option-color {
color: @errorColor;
}

.icon-menu {
width: 28px;
height: 36px;
}
}

#notesOverviewApplication, .notesApplication {
max-width: 100%;

Expand Down Expand Up @@ -232,14 +248,9 @@
}

.note-actions-menu {
min-width: 150px !important;
right: 7px;
top: 25px !important;
top: 30px !important;
left: auto !important;

.action-menu-item {
min-height: 30px !important;
}
}
}
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,14 @@
</div>
</div>
<notes-actions-menu
v-if="!isMobile"
:note="note"
:default-path="defaultPath"
@open-treeview="$refs.notesBreadcrumb.open(note, 'movePage')"
@export-pdf="createPDF(note)"
@open-history="openNoteVersionsHistoryDrawer()"
@open-treeview-export="$refs.notesBreadcrumb.open(note.id, 'exportNotes')"
@open-import-drawer="$refs.noteImportDrawer.open()" />
:default-path="defaultPath" />
<notes-mobile-action-menu
v-else
ref="notesMobileActionMenu"
:note="note"
:default-path="defaultPath" />
<note-treeview-drawer
ref="notesBreadcrumb"
:selected-translation="selectedTranslation.value" />
Expand Down Expand Up @@ -466,7 +467,7 @@ export default {
}
},
isMobile() {
return this.$vuetify.breakpoint.name === 'xs';
return this.$vuetify?.breakpoint?.smAndDown;
},
isAvailableNote() {
Expand Down Expand Up @@ -577,6 +578,12 @@ export default {
this.$root.$on('update-note-content', this.updateNoteContent);
this.$root.$on('update-selected-translation', this.updateSelectedTranslation);
this.$root.$on('open-note-treeview', this.openNoteTreeView);
this.$root.$on('note-export-pdf', this.createPDF);
this.$root.$on('open-note-history', this.openNoteVersionsHistoryDrawer);
this.$root.$on('open-note-treeview-export', this.openNoteTreeView);
this.$root.$on('open-note-import-drawer', this.openImportDrawer);
},
mounted() {
this.handleChangePages();
Expand All @@ -585,6 +592,19 @@ export default {
});
},
methods: {
closeMobileActionMenu() {
setTimeout(() => {
this.$refs.notesMobileActionMenu.close();
}, 200);
},
openNoteTreeView(note, action) {
this.$refs.notesBreadcrumb.open(note, action);
this.closeMobileActionMenu();
},
openImportDrawer() {
this.$refs.noteImportDrawer.open();
this.closeMobileActionMenu();
},
updateNoteTitle(title) {
this.noteTitle = title;
},
Expand Down Expand Up @@ -850,6 +870,7 @@ export default {
console.error('Error when exporting note: ', e);
});
});
this.closeMobileActionMenu();
},
displayMessage(message) {
this.$root.$emit('alert-message', message?.message, message?.type || 'success');
Expand Down Expand Up @@ -897,6 +918,7 @@ export default {
}
this.$refs.noteVersionsHistoryDrawer.open();
}
this.closeMobileActionMenu();
},
retrieveNoteTreeById() {
this.note.wikiOwner = this.note.wikiOwner.substring(1);
Expand Down
Loading

0 comments on commit 1dfc09c

Please sign in to comment.