mirror of
https://github.com/zadam/trilium.git
synced 2026-02-07 22:34:24 +01:00
chore(mobile): address requested changes
This commit is contained in:
parent
ac3b289c9e
commit
e0b4ebed93
@ -1,7 +1,6 @@
|
||||
import "./NoteDetail.css";
|
||||
|
||||
import clsx from "clsx";
|
||||
import { use } from "i18next";
|
||||
import { isValidElement, VNode } from "preact";
|
||||
import { useEffect, useRef, useState } from "preact/hooks";
|
||||
|
||||
@ -16,7 +15,7 @@ import toast from "../services/toast.js";
|
||||
import { dynamicRequire, isElectron, isMobile } from "../services/utils";
|
||||
import NoteTreeWidget from "./note_tree";
|
||||
import { ExtendedNoteType, TYPE_MAPPINGS, TypeWidget } from "./note_types";
|
||||
import { useLegacyWidget, useNote, useNoteContext, useTriliumEvent } from "./react/hooks";
|
||||
import { useLegacyWidget, useNoteContext, useTriliumEvent } from "./react/hooks";
|
||||
import { NoteListWithLinks } from "./react/NoteList";
|
||||
import { TypeWidgetProps } from "./type_widgets/type_widget";
|
||||
|
||||
|
||||
@ -211,7 +211,7 @@ function TabPreviewContent({ note, viewScope }: {
|
||||
el = <PreviewPlaceholder icon="bx bx-plus" />;
|
||||
} else if (note.type === "book") {
|
||||
el = <PreviewPlaceholder icon={ICON_MAPPINGS[note.getLabelValue("viewType") ?? ""] ?? "bx bx-book"} />;
|
||||
} else if (viewScope?.viewMode !== "default") {
|
||||
} else if (viewScope?.viewMode && viewScope.viewMode !== "default") {
|
||||
el = <PreviewPlaceholder icon={VIEW_MODE_ICON_MAPPINGS[viewScope?.viewMode ?? ""] ?? "bx bx-empty"} />;
|
||||
} else {
|
||||
el = <NoteContent
|
||||
|
||||
@ -21,7 +21,7 @@ export default function MobileEditorToolbar({ inPopupEditor }: MobileEditorToolb
|
||||
const { note, noteContext, ntxId } = useNoteContext();
|
||||
const noteType = useNoteProperty(note, "type");
|
||||
const { isReadOnly } = useIsNoteReadOnly(note, noteContext);
|
||||
const shouldDisplay = noteType === "text" && !isReadOnly;
|
||||
const shouldDisplay = noteType === "text" && isReadOnly === false;
|
||||
const [ dropdownActive, setDropdownActive ] = useState(false);
|
||||
|
||||
usePositioningOniOS(!inPopupEditor, containerRef);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user