mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
feat(views/table): format note ID as monospace
This commit is contained in:
parent
aa8902f5b9
commit
cf8063f311
@ -1,6 +1,6 @@
|
||||
import { RelationEditor } from "./relation_editor.js";
|
||||
import { NoteFormatter, NoteTitleFormatter, RowNumberFormatter } from "./formatters.js";
|
||||
import type { ColumnDefinition, Tabulator } from "tabulator-tables";
|
||||
import { MonospaceFormatter, NoteFormatter, NoteTitleFormatter, RowNumberFormatter } from "./formatters.js";
|
||||
import type { ColumnDefinition } from "tabulator-tables";
|
||||
import { LabelType } from "../../../services/promoted_attribute_definition_parser.js";
|
||||
|
||||
type ColumnType = LabelType | "relation";
|
||||
@ -55,6 +55,7 @@ export function buildColumnDefinitions(info: AttributeDefinitionInformation[], m
|
||||
{
|
||||
field: "noteId",
|
||||
title: "Note ID",
|
||||
formatter: MonospaceFormatter,
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
|
@ -47,6 +47,10 @@ export function RowNumberFormatter(draggableRows: boolean) {
|
||||
};
|
||||
}
|
||||
|
||||
export function MonospaceFormatter(cell: CellComponent) {
|
||||
return `<code>${cell.getValue()}</code>`;
|
||||
}
|
||||
|
||||
function buildNoteLink(noteId: string) {
|
||||
const $noteRef = $("<span>");
|
||||
const href = `#root/${noteId}`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user