mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 15:49:00 +02:00
feat(collections): hide book default note type
This commit is contained in:
parent
1a72eb91ee
commit
5a2da62992
@ -89,26 +89,28 @@ async function getNoteTypeItems(command?: TreeCommandNames) {
|
|||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBlankNoteTypes(command): MenuItem<TreeCommandNames>[] {
|
function getBlankNoteTypes(command?: TreeCommandNames): MenuItem<TreeCommandNames>[] {
|
||||||
return NOTE_TYPES.filter((nt) => !nt.reserved).map((nt) => {
|
return NOTE_TYPES
|
||||||
const menuItem: MenuCommandItem<TreeCommandNames> = {
|
.filter((nt) => !nt.reserved && nt.type !== "book")
|
||||||
title: nt.title,
|
.map((nt) => {
|
||||||
command,
|
const menuItem: MenuCommandItem<TreeCommandNames> = {
|
||||||
type: nt.type,
|
title: nt.title,
|
||||||
uiIcon: "bx " + nt.icon,
|
command,
|
||||||
badges: []
|
type: nt.type,
|
||||||
}
|
uiIcon: "bx " + nt.icon,
|
||||||
|
badges: []
|
||||||
|
}
|
||||||
|
|
||||||
if (nt.isNew) {
|
if (nt.isNew) {
|
||||||
menuItem.badges?.push(NEW_BADGE);
|
menuItem.badges?.push(NEW_BADGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nt.isBeta) {
|
if (nt.isBeta) {
|
||||||
menuItem.badges?.push(BETA_BADGE);
|
menuItem.badges?.push(BETA_BADGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return menuItem;
|
return menuItem;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getUserTemplates(command?: TreeCommandNames) {
|
async function getUserTemplates(command?: TreeCommandNames) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user