mirror of
https://github.com/zadam/trilium.git
synced 2026-02-19 20:24:28 +01:00
feat(help): add gallery view type to byBookType mapping
This commit is contained in:
parent
cfbb410ee0
commit
a58dae2c1e
@ -1,4 +1,5 @@
|
|||||||
import { NoteType } from "@triliumnext/commons";
|
import { NoteType } from "@triliumnext/commons";
|
||||||
|
|
||||||
import FNote from "../entities/fnote";
|
import FNote from "../entities/fnote";
|
||||||
import { ViewTypeOptions } from "../widgets/collections/interface";
|
import { ViewTypeOptions } from "../widgets/collections/interface";
|
||||||
|
|
||||||
@ -24,6 +25,7 @@ export const byNoteType: Record<Exclude<NoteType, "book">, string | null> = {
|
|||||||
export const byBookType: Record<ViewTypeOptions, string | null> = {
|
export const byBookType: Record<ViewTypeOptions, string | null> = {
|
||||||
list: "mULW0Q3VojwY",
|
list: "mULW0Q3VojwY",
|
||||||
grid: "8QqnMzx393bx",
|
grid: "8QqnMzx393bx",
|
||||||
|
gallery: null,
|
||||||
calendar: "xWbu3jpNWapp",
|
calendar: "xWbu3jpNWapp",
|
||||||
table: "2FvYrpmOXm29",
|
table: "2FvYrpmOXm29",
|
||||||
geoMap: "81SGnPGMk7Xc",
|
geoMap: "81SGnPGMk7Xc",
|
||||||
@ -39,6 +41,6 @@ export function getHelpUrlForNote(note: FNote | null | undefined) {
|
|||||||
} else if (note?.hasLabel("textSnippet")) {
|
} else if (note?.hasLabel("textSnippet")) {
|
||||||
return "pwc194wlRzcH";
|
return "pwc194wlRzcH";
|
||||||
} else if (note && note.type === "book") {
|
} else if (note && note.type === "book") {
|
||||||
return byBookType[note.getAttributeValue("label", "viewType") as ViewTypeOptions ?? ""]
|
return byBookType[note.getAttributeValue("label", "viewType") as ViewTypeOptions ?? ""];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user