Improve the sub-menu arrows for the tree context menu

This commit is contained in:
Adorian Doran 2024-11-20 02:56:18 +02:00
parent 35faba2c2f
commit 4179f9c155
3 changed files with 8 additions and 2 deletions

View File

@ -3,6 +3,7 @@ import keyboardActionService from '../services/keyboard_actions.js';
class ContextMenu {
constructor() {
this.$widget = $("#context-menu-container");
this.$widget.addClass("dropend");
this.dateContextMenuOpenedMs = 0;
$(document).on('click', () => this.hide());

View File

@ -60,11 +60,11 @@ export default class TreeContextMenu {
{ title: "----" },
{ title: `${t("tree-context-menu.insert-note-after")} <kbd data-command="createNoteAfter"></kbd>`, command: "insertNoteAfter", uiIcon: "bx bx-plus",
{ title: `${t("tree-context-menu.insert-note-after")}<kbd data-command="createNoteAfter"></kbd>`, command: "insertNoteAfter", uiIcon: "bx bx-plus",
items: insertNoteAfterEnabled ? await noteTypesService.getNoteTypeItems("insertNoteAfter") : null,
enabled: insertNoteAfterEnabled && noSelectedNotes && notOptions },
{ title: `${t("tree-context-menu.insert-child-note")} <kbd data-command="createNoteInto"></kbd>`, command: "insertChildNote", uiIcon: "bx bx-plus",
{ title: `${t("tree-context-menu.insert-child-note")}<kbd data-command="createNoteInto"></kbd>`, command: "insertChildNote", uiIcon: "bx bx-plus",
items: notSearch ? await noteTypesService.getNoteTypeItems("insertChildNote") : null,
enabled: notSearch && noSelectedNotes && notOptions },

View File

@ -244,6 +244,11 @@ div.ui-tooltip {
box-shadow: unset;
}
.dropend .dropdown-toggle::after {
margin-left: .5em;
color: var(--muted-text-color);
}
.dropdown-menu .disabled {
color: #888 !important;
pointer-events: none;