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
fix(note_title_actions): edited notes link looking strange
Elian Doran1ac7db41d322
diff --git a/apps/client/src/widgets/layout/NoteTitleActions.css b/apps/client/src/widgets/layout/NoteTitleActions.cssindex 1ec632e86e..08426c19a6 100644--- a/apps/client/src/widgets/layout/NoteTitleActions.css+++ b/apps/client/src/widgets/layout/NoteTitleActions.css@@ -20,11 +20,15 @@ body.experimental-feature-new-layout {.badge {margin: 0;- a.tn-link {- color: inherit;- text-transform: none;- text-decoration: none;- display: inline-block;+ color: inherit;+ text-transform: none;+ text-decoration: none;+ display: inline-block;+ transition: background-color 250ms ease-in, color 250ms ease-in;++ &:hover {+ background-color: var(--link-hover-background);+ color: var(--link-hover-color);}}}diff --git a/apps/client/src/widgets/layout/NoteTitleActions.tsx b/apps/client/src/widgets/layout/NoteTitleActions.tsxindex db2e1b44e8..dd1ed2342c 100644--- a/apps/client/src/widgets/layout/NoteTitleActions.tsx+++ b/apps/client/src/widgets/layout/NoteTitleActions.tsx@@ -12,7 +12,7 @@ import { PromotedAttributesContent, usePromotedAttributeData } from "../Promotedimport SimpleBadge from "../react/Badge";import Collapsible, { ExternallyControlledCollapsible } from "../react/Collapsible";import { useNoteContext, useNoteLabel, useNoteProperty, useTriliumEvent, useTriliumOptionBool } from "../react/hooks";-import NoteLink from "../react/NoteLink";+import NoteLink, { NewNoteLink } from "../react/NoteLink";import { useEditedNotes } from "../ribbon/EditedNotesTab";import SearchDefinitionTab from "../ribbon/SearchDefinitionTab";import NoteTypeSwitcher from "./NoteTypeSwitcher";@@ -96,14 +96,10 @@ function EditedNotesContent({ note }: { note: FNote }) {return (editedNotes !== undefined &&(editedNotes.length > 0 ? editedNotes?.map(editedNote => (- <SimpleBadge- key={editedNote.noteId}- title={(- <NoteLink- notePath={editedNote.noteId}- showNoteIcon- />- )}+ <NewNoteLink+ className="badge"+ notePath={editedNote.noteId}+ showNoteIcon/>)) : (<div className="no-edited-notes-found">{t("edited_notes.no_edited_notes_found")}</div>diff --git a/apps/client/src/widgets/react/NoteLink.tsx b/apps/client/src/widgets/react/NoteLink.tsxindex a415c8b862..7a86be7ef4 100644--- a/apps/client/src/widgets/react/NoteLink.tsx+++ b/apps/client/src/widgets/react/NoteLink.tsx@@ -105,22 +105,17 @@ export function NewNoteLink({ notePath, viewScope, noContextMenu, showNoteIcon,const [ archived ] = useNoteLabelBoolean(note, "archived");return (- <span>- <span>- {icon && <Icon icon={icon} />}-- <a- className={clsx("tn-link", colorClass, {- "no-tooltip-preview": noPreview,- archived- })}- href={calculateHash({ notePath, viewScope })}- data-no-context-menu={noContextMenu}- {...linkProps}- >- {title}- </a>- </span>- </span>+ <a+ className={clsx("tn-link", colorClass, {+ "no-tooltip-preview": noPreview,+ archived+ })}+ href={calculateHash({ notePath, viewScope })}+ data-no-context-menu={noContextMenu}+ {...linkProps}+ >+ {icon && <><Icon icon={icon} /> </>}+ {title}+ </a>);}