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(sql_console): note type switcher showing up
Elian Doran5053e7444733
diff --git a/apps/client/src/widgets/layout/InlineTitle.tsx b/apps/client/src/widgets/layout/InlineTitle.tsxindex ce44681e66..b0e7e4e8a5 100644--- a/apps/client/src/widgets/layout/InlineTitle.tsx+++ b/apps/client/src/widgets/layout/InlineTitle.tsx@@ -7,6 +7,7 @@ import { ComponentChild } from "preact";import { useLayoutEffect, useMemo, useRef, useState } from "preact/hooks";import { Trans } from "react-i18next";+import FNote from "../../entities/fnote";import { ViewScope } from "../../services/link";import { formatDateTime } from "../../utils/formatters";import NoteIcon from "../note_icon";@@ -69,9 +70,10 @@ export default function InlineTitle() {);}-function shouldShow(noteId: string | undefined, type: NoteType | undefined, viewScope: ViewScope | undefined) {+function shouldShow(note: FNote, type: NoteType | undefined, viewScope: ViewScope | undefined) {if (viewScope?.viewMode !== "default") return false;- if (noteId?.startsWith("_options")) return true;+ if (note.noteId?.startsWith("_options")) return true;+ if (note.isTriliumSqlite()) return false;return type && supportedNoteTypes.has(type);}diff --git a/apps/client/src/widgets/layout/NoteTypeSwitcher.tsx b/apps/client/src/widgets/layout/NoteTypeSwitcher.tsxindex 8ac68ae833..e345249add 100644--- a/apps/client/src/widgets/layout/NoteTypeSwitcher.tsx+++ b/apps/client/src/widgets/layout/NoteTypeSwitcher.tsx@@ -39,7 +39,7 @@ export default function NoteTypeSwitcher() {const currentNoteTypeData = useMemo(() => NOTE_TYPES.find(t => t.type === currentNoteType), [ currentNoteType ]);const { builtinTemplates, collectionTemplates } = useBuiltinTemplates();- return (currentNoteType && supportedNoteTypes.has(currentNoteType) &&+ return (currentNoteType && supportedNoteTypes.has(currentNoteType) && !note?.isTriliumSqlite() &&<divclassName="note-type-switcher"onWheel={onWheelHorizontalScroll}