mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 22:34:23 +01:00
feat(breadcrumb): indicate archived notes
This commit is contained in:
parent
d97b68fcd7
commit
f235839d03
@ -21,6 +21,10 @@
|
|||||||
&:hover {
|
&:hover {
|
||||||
color: var(--custom-color, inherit);
|
color: var(--custom-color, inherit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.archived {
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> span,
|
> span,
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { HTMLAttributes } from "preact";
|
|||||||
import { useEffect, useRef, useState } from "preact/hooks";
|
import { useEffect, useRef, useState } from "preact/hooks";
|
||||||
|
|
||||||
import link, { calculateHash, ViewScope } from "../../services/link";
|
import link, { calculateHash, ViewScope } from "../../services/link";
|
||||||
import { useImperativeSearchHighlighlighting, useNote, useNoteColorClass, useNoteIcon, useNoteProperty, useTriliumEvent } from "./hooks";
|
import { useImperativeSearchHighlighlighting, useNote, useNoteColorClass, useNoteIcon, useNoteLabel, useNoteLabelBoolean, useNoteProperty, useTriliumEvent } from "./hooks";
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
|
|
||||||
interface NoteLinkOpts {
|
interface NoteLinkOpts {
|
||||||
@ -88,6 +88,7 @@ export default function NoteLink({ className, containerClassName, notePath, show
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface NewNoteLinkProps extends Pick<HTMLAttributes<HTMLAnchorElement>, "onContextMenu"> {
|
interface NewNoteLinkProps extends Pick<HTMLAttributes<HTMLAnchorElement>, "onContextMenu"> {
|
||||||
|
className?: string;
|
||||||
notePath: string;
|
notePath: string;
|
||||||
viewScope?: ViewScope;
|
viewScope?: ViewScope;
|
||||||
noContextMenu?: boolean;
|
noContextMenu?: boolean;
|
||||||
@ -101,6 +102,7 @@ export function NewNoteLink({ notePath, viewScope, noContextMenu, showNoteIcon,
|
|||||||
const title = useNoteProperty(note, "title");
|
const title = useNoteProperty(note, "title");
|
||||||
const icon = useNoteIcon(showNoteIcon ? note : null);
|
const icon = useNoteIcon(showNoteIcon ? note : null);
|
||||||
const colorClass = useNoteColorClass(note);
|
const colorClass = useNoteColorClass(note);
|
||||||
|
const [ archived ] = useNoteLabelBoolean(note, "archived");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
@ -109,7 +111,8 @@ export function NewNoteLink({ notePath, viewScope, noContextMenu, showNoteIcon,
|
|||||||
|
|
||||||
<a
|
<a
|
||||||
className={clsx("tn-link", colorClass, {
|
className={clsx("tn-link", colorClass, {
|
||||||
"no-tooltip-preview": noPreview
|
"no-tooltip-preview": noPreview,
|
||||||
|
archived
|
||||||
})}
|
})}
|
||||||
href={calculateHash({ notePath, viewScope })}
|
href={calculateHash({ notePath, viewScope })}
|
||||||
data-no-context-menu={noContextMenu}
|
data-no-context-menu={noContextMenu}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user