Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(react/ribbon): add CSS for context menu
Elian Doran36fb097d1da2
diff --git a/apps/client/src/widgets/buttons/note_actions.ts b/apps/client/src/widgets/buttons/note_actions.tsdeleted file mode 100644index 44e7a244dc..0000000000--- a/apps/client/src/widgets/buttons/note_actions.ts+++ /dev/null@@ -1,39 +0,0 @@-import NoteContextAwareWidget from "../note_context_aware_widget.js";-import utils from "../../services/utils.js";-import branchService from "../../services/branches.js";-import dialogService from "../../services/dialog.js";-import server from "../../services/server.js";-import toastService from "../../services/toast.js";-import ws from "../../services/ws.js";-import appContext, { type EventData } from "../../components/app_context.js";-import { t } from "../../services/i18n.js";-import type FNote from "../../entities/fnote.js";-import type { FAttachmentRow } from "../../entities/fattachment.js";--const TPL = /*html*/`-<div class="dropdown note-actions">- <style>- .note-actions {- width: 35px;- height: 35px;- }-- .note-actions .dropdown-menu {- min-width: 15em;- }-- .note-actions .dropdown-item .bx {- position: relative;- top: 3px;- font-size: 120%;- margin-right: 5px;- }-- .note-actions .dropdown-item[disabled], .note-actions .dropdown-item[disabled]:hover {- color: var(--muted-text-color) !important;- background-color: transparent !important;- pointer-events: none; /* makes it unclickable */- }-- </style>-</div>`;diff --git a/apps/client/src/widgets/ribbon/NoteActions.tsx b/apps/client/src/widgets/ribbon/NoteActions.tsxindex ec9835936e..6a6a0f2d38 100644--- a/apps/client/src/widgets/ribbon/NoteActions.tsx+++ b/apps/client/src/widgets/ribbon/NoteActions.tsx@@ -61,6 +61,7 @@ function NoteContextMenu(props: NoteActionsProps) {return (<DropdownbuttonClassName="bx bx-dots-vertical-rounded"+ className="note-actions"hideToggleArrownoSelectButtonStyle>diff --git a/apps/client/src/widgets/ribbon/style.css b/apps/client/src/widgets/ribbon/style.cssindex 9e49abef08..7d7b106526 100644--- a/apps/client/src/widgets/ribbon/style.css+++ b/apps/client/src/widgets/ribbon/style.css@@ -448,4 +448,28 @@.dropdown-header {background-color: var(--accented-background-color);}+/* #endregion */++/* #region Note actions */+.note-actions {+ width: 35px;+ height: 35px;+}++.note-actions .dropdown-menu {+ min-width: 15em;+}++.note-actions .dropdown-item .bx {+ position: relative;+ top: 3px;+ font-size: 120%;+ margin-right: 5px;+}++.note-actions .dropdown-item[disabled], .note-actions .dropdown-item[disabled]:hover {+ color: var(--muted-text-color) !important;+ background-color: transparent !important;+ pointer-events: none; /* makes it unclickable */+}/* #endregion */\ No newline at end of file