AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
Improve desktop memo selection actions
tianmacb208d395146
diff --git a/apps/web/src/components/EditorPane.tsx b/apps/web/src/components/EditorPane.tsxindex 50fad5b9..916e4571 100644--- a/apps/web/src/components/EditorPane.tsx+++ b/apps/web/src/components/EditorPane.tsx@@ -1,4 +1,4 @@-import { useRef, useState, useEffect, useCallback, useMemo } from "react";+import { useRef, useState, useEffect, useCallback, useMemo, type ReactNode } from "react";import { useQueryClient, useMutation } from "@tanstack/react-query";import { useEditor, EditorContent, type Editor } from "@tiptap/react";import StarterKit from "@tiptap/starter-kit";@@ -242,6 +242,7 @@ export const EditorPane = ({onMobileDefaultEditConsumed,searchFocusToken,replaceFocusToken,+ selectionActionBar,}: {memo: MemoDetail | null;mobileDefaultEditMemoId: string | null;@@ -261,8 +262,10 @@ export const EditorPane = ({onMobileDefaultEditConsumed: () => void;searchFocusToken: number;replaceFocusToken: number;+ selectionActionBar?: ReactNode;}) => {const queryClient = useQueryClient();+ const isSelectionMode = Boolean(selectionActionBar);const [title, setTitle] = useState("");const [tagsText, setTagsText] = useState("");const [saveState, setSaveState] = useState<"idle" | "saving" | "saved" | "queued" | "error" | "conflict">("idle");@@ -858,16 +861,32 @@ export const EditorPane = ({return () => window.clearTimeout(timer);}, [dirtyVersion, editor, hasUnsavedChanges, memo, saveMutation, saveState]);+ if (isSelectionMode) {+ return (+ <div className="flex h-full min-w-0 flex-col bg-white">+ {selectionActionBar}+ </div>+ );+ }+if (isLoading) {- return <div className="flex h-full items-center justify-center text-sm text-slate-500">加载中</div>;+ return (+ <div className="flex h-full min-w-0 flex-col bg-white">+ {selectionActionBar}+ <div className="flex min-h-0 flex-1 items-center justify-center text-sm text-slate-500">加载中</div>+ </div>+ );}if (!memo) {return (- <div className="flex h-full items-center justify-center bg-white px-8 text-center">- <div>- <Sparkles className="mx-auto mb-3 h-8 w-8 text-slate-300 animate-pulse" />- <div className="text-sm font-medium text-slate-400">选择或新建一条笔记</div>+ <div className="flex h-full min-w-0 flex-col bg-white">+ {selectionActionBar}+ <div className="flex min-h-0 flex-1 items-center justify-center px-8 text-center">+ <div>+ <Sparkles className="mx-auto mb-3 h-8 w-8 text-slate-300 animate-pulse" />+ <div className="text-sm font-medium text-slate-400">选择或新建一条笔记</div>+ </div></div></div>);@@ -1005,6 +1024,7 @@ export const EditorPane = ({return (<div className="relative flex h-full min-w-0 flex-col bg-white">+ {selectionActionBar}<header className="shrink-0 border-b border-slate-200 bg-white"><div className="flex min-h-12 items-center justify-between gap-2 border-b border-slate-100 px-3 py-2 sm:px-5"><div className="flex min-w-0 items-center gap-2 text-sm">diff --git a/apps/web/src/components/MemoListPane.tsx b/apps/web/src/components/MemoListPane.tsxindex 5db49446..56e183a6 100644--- a/apps/web/src/components/MemoListPane.tsx+++ b/apps/web/src/components/MemoListPane.tsx@@ -55,7 +55,7 @@ import type {MemoSortMode,MemoListDensity,MemoContextMenuState,- MemoSelectionContextMenuState,+ NotebookMoveOption,} from "@/lib/app-helpers";import type { SyncQueueSummary } from "@/lib/sync-queue";import {@@ -82,6 +82,128 @@ const MobileSelectionMoreSheet = lazy(() =>const getSelectionCountLabel = (count: number) => (count > 0 ? `已选择 ${count} 条` : "选择笔记");+export const MemoSelectionActionBar = ({+ deleteTitle,+ isDeleting,+ isMerging,+ isMoving,+ isPinning,+ isTrashView,+ mergeTitle,+ moveNotebookOptions,+ moveTargetNotebookId,+ moveTitle,+ onClearSelection,+ onDelete,+ onMerge,+ onMove,+ onPin,+ pinLabel,+ pinTarget,+ pinTitle,+ selectedCount,+ onMoveTargetChange,+}: {+ deleteTitle: string;+ isDeleting: boolean;+ isMerging: boolean;+ isMoving: boolean;+ isPinning: boolean;+ isTrashView: boolean;+ mergeTitle: string;+ moveNotebookOptions: NotebookMoveOption[];+ moveTargetNotebookId: string;+ moveTitle: string;+ onClearSelection: () => void;+ onDelete: () => void;+ onMerge: () => void;+ onMove: () => void;+ onPin: () => void;+ pinLabel: string;+ pinTarget: boolean;+ pinTitle: string;+ selectedCount: number;+ onMoveTargetChange: (notebookId: string) => void;+}) => (+ <div className="hidden h-full min-h-0 flex-1 items-center justify-start bg-white px-16 py-10 lg:flex xl:px-24">+ <div className="w-72 overflow-hidden rounded-md border border-slate-200 bg-white py-1 shadow-lg">+ <div className="flex h-9 items-center gap-2 px-3 text-xs font-semibold text-slate-400">+ <CheckSquare className="h-4 w-4" />+ {getSelectionCountLabel(selectedCount)}+ </div>+ {!isTrashView && moveNotebookOptions.length > 0 && (+ <div className="border-t border-slate-100 px-3 py-2">+ <div className="flex items-center gap-2">+ <Select value={moveTargetNotebookId} disabled={isMoving} onValueChange={onMoveTargetChange}>+ <SelectTrigger className="h-8 min-w-0 flex-1 text-xs text-slate-700 border-slate-200">+ <SelectValue placeholder="选择笔记本" />+ </SelectTrigger>+ <SelectContent className="max-h-60 bg-white border border-slate-200 rounded-md py-1 shadow-md">+ {moveNotebookOptions.map((item) => (+ <SelectItem key={item.id} value={item.id}>+ {item.selectLabel}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ <Button+ size="sm"+ variant="soft"+ title={moveTitle}+ onClick={onMove}+ disabled={selectedCount === 0 || !moveTargetNotebookId || isMoving || isTrashView}+ >+ <Folder className="h-4 w-4" />+ 移动+ </Button>+ </div>+ </div>+ )}+ <Button+ className="h-11 w-full justify-start rounded-none px-3 text-slate-700 hover:bg-slate-50"+ variant="ghost"+ title={pinTitle}+ onClick={onPin}+ disabled={selectedCount === 0 || isPinning || isTrashView}+ >+ <Star className={cn("h-4 w-4", !pinTarget && "fill-current text-slate-700")} />+ {pinLabel}+ </Button>+ <Button+ className="h-11 w-full justify-start rounded-none px-3 text-slate-700 hover:bg-slate-50"+ variant="ghost"+ title={mergeTitle}+ onClick={onMerge}+ disabled={selectedCount < 2 || isMerging || isTrashView}+ >+ <Merge className="h-4 w-4" />+ 合并笔记+ </Button>+ <div className="h-px bg-slate-100" />+ <Button+ className="h-11 w-full justify-start rounded-none px-3 text-rose-700 hover:bg-rose-50 hover:text-rose-700"+ variant="ghost"+ title={deleteTitle}+ onClick={onDelete}+ disabled={selectedCount === 0 || isDeleting}+ >+ <Trash2 className="h-4 w-4" />+ {isTrashView ? "永久删除" : "删除"}+ </Button>+ <div className="h-px bg-slate-100" />+ <Button+ className="h-11 w-full justify-start rounded-none px-3 text-slate-700 hover:bg-slate-50"+ variant="ghost"+ title="取消选择"+ onClick={onClearSelection}+ >+ <X className="h-4 w-4" />+ 取消选择+ </Button>+ </div>+ </div>+);+const getMobileFilterIcon = (filterMode: MemoFilterMode) => {if (filterMode === "tagged") {return <Tags className="h-4 w-4" />;@@ -292,7 +414,6 @@ export const MemoListPane = ({onRetry: () => void;}) => {const [memoContextMenu, setMemoContextMenu] = useState<MemoContextMenuState | null>(null);- const [selectionContextMenu, setSelectionContextMenu] = useState<MemoSelectionContextMenuState | null>(null);const [contextMoveOpen, setContextMoveOpen] = useState(false);const [filterMode, setFilterMode] = useState<MemoFilterMode>("all");const [sortMode, setSortMode] = useState<MemoSortMode>("updated-desc");@@ -514,7 +635,6 @@ export const MemoListPane = ({setDesktopSortOpen(false);setContextMoveOpen(false);setMemoContextMenu(null);- setSelectionContextMenu(null);setMobileListActionsOpen(false);setMobileMoveOpen(false);setMobileMoreOpen(false);@@ -557,21 +677,9 @@ export const MemoListPane = ({const y = Math.min(clientY, Math.max(12, window.innerHeight - menuHeight - 12));setContextMoveOpen(false);- setSelectionContextMenu(null);setMemoContextMenu({ memo, x, y });};- const openSelectionContextMenuAt = (clientX: number, clientY: number) => {- const menuWidth = 224;- const menuHeight = view === "trash" ? 128 : 272;- const x = Math.min(clientX, Math.max(12, window.innerWidth - menuWidth - 12));- const y = Math.min(clientY, Math.max(12, window.innerHeight - menuHeight - 12));-- setContextMoveOpen(false);- setMemoContextMenu(null);- setSelectionContextMenu({ x, y });- };-const handleOpenMemoContextMenu = (memo: MemoSummary, event: MouseEvent<HTMLElement>) => {openMemoContextMenuAt(memo, event.clientX, event.clientY);};@@ -585,7 +693,9 @@ export const MemoListPane = ({handleToggleMemo(memo.id, event);}- openSelectionContextMenuAt(event.clientX, event.clientY);+ event.preventDefault();+ setContextMoveOpen(false);+ setMemoContextMenu(null);};const handleOpenSelectionKeyboardContextMenu = (memo: MemoSummary, target: HTMLElement) => {@@ -597,8 +707,8 @@ export const MemoListPane = ({handleToggleMemo(memo.id);}- const rect = target.getBoundingClientRect();- openSelectionContextMenuAt(rect.left + Math.min(rect.width, 224), rect.top + Math.min(rect.height, 96));+ setContextMoveOpen(false);+ setMemoContextMenu(null);};const handleOpenMemoKeyboardContextMenu = (memo: MemoSummary, target: HTMLElement) => {@@ -684,7 +794,6 @@ export const MemoListPane = ({event.preventDefault();event.stopPropagation();setMemoContextMenu(null);- setSelectionContextMenu(null);onClearSelection();setLastSelectedMemoId(null);return;@@ -696,7 +805,6 @@ export const MemoListPane = ({}event.preventDefault();setMemoContextMenu(null);- setSelectionContextMenu(null);handleSelectAllVisibleMemos();return;}@@ -709,7 +817,6 @@ export const MemoListPane = ({if (selectionMode && selectedMemoIds.size > 0) {event.preventDefault();setMemoContextMenu(null);- setSelectionContextMenu(null);onDeleteSelectedMemos();return;}@@ -720,7 +827,6 @@ export const MemoListPane = ({event.preventDefault();setMemoContextMenu(null);- setSelectionContextMenu(null);onDeleteMemo(selectedMemoId);return;}@@ -1080,89 +1186,6 @@ export const MemoListPane = ({ref={listScrollRef}className="relative min-h-0 flex-1 overflow-y-auto p-3 pb-[calc(7rem+env(safe-area-inset-bottom))] lg:pb-3">- {selectionMode && (- <div className="sticky top-0 z-10 mb-3 hidden flex-wrap items-center justify-between gap-2 rounded-md border border-slate-200 bg-white px-3 py-2 shadow-panel lg:flex">- <div className="flex items-center gap-2 text-sm font-medium text-slate-700">- <CheckSquare className="h-4 w-4 text-slate-500" />- {selectionCountLabel}- </div>- <div className="flex min-w-0 flex-wrap items-center gap-2">- <Button- size="sm"- variant="ghost"- title={selectionToggleTitle}- onClick={allVisibleMemosSelected ? handleClearVisibleMemos : handleSelectAllVisibleMemos}- disabled={!canToggleVisibleMemoSelection}- >- <CheckSquare className="h-4 w-4" />- {allVisibleMemosSelected ? "全不选" : "全选"}- </Button>- <Button size="sm" variant="ghost" title="取消选择" onClick={onClearSelection}>- <X className="h-4 w-4" />- 取消- </Button>- <Button- size="sm"- variant="ghost"- title={selectionPinTitle}- onClick={() => onPinSelectedMemos(selectedPinTarget)}- disabled={selectedMemoIds.size === 0 || isPinning || view === "trash"}- >- <Star className="h-4 w-4" />- {selectionPinLabel}- </Button>- {view !== "trash" && notebooks.length > 0 && (- <Select- value={moveTargetNotebookId}- disabled={isMoving}- onValueChange={(value) => setMoveTargetNotebookId(value)}- >- <SelectTrigger className="h-8 max-w-40 text-xs text-slate-700 border-slate-200">- <SelectValue placeholder="选择笔记本" />- </SelectTrigger>- <SelectContent className="max-h-60 bg-white border border-slate-200 rounded-md py-1 shadow-md">- {moveNotebookOptions.map((item) => (- <SelectItem key={item.id} value={item.id} disabled={item.id === notebook?.id}>- {item.selectLabel}- </SelectItem>- ))}- </SelectContent>- </Select>- )}- <Button- size="sm"- variant="soft"- title={selectionMoveTitle}- onClick={() => onMoveSelectedMemos(moveTargetNotebookId)}- disabled={selectedMemoIds.size === 0 || !moveTargetNotebookId || isMoving || view === "trash"}- >- <Folder className="h-4 w-4" />- 移动- </Button>- <Button- size="sm"- variant="solid"- title={selectionMergeTitle}- onClick={onMerge}- disabled={selectedMemoIds.size < 2 || isMerging || view === "trash"}- >- <Merge className="h-4 w-4" />- 合并- </Button>- <Button- size="sm"- variant="danger"- title={selectionDeleteTitle}- onClick={onDeleteSelectedMemos}- disabled={selectedMemoIds.size === 0 || isDeleting}- >- <Trash2 className="h-4 w-4" />- {view === "trash" ? "永久删除" : "删除"}- </Button>- </div>- </div>- )}-{isLoading || (isRefreshing && memos.length === 0) ? (<div className="px-2 py-4 text-sm text-slate-500">正在拉取最新笔记</div>) : isError && memos.length === 0 ? (@@ -1348,99 +1371,6 @@ export const MemoListPane = ({</div>)}- {/* Controlled Right Click context menu for bulk selection on Desktop using absolute placement */}- {selectionContextMenu && selectedMemoIds.size > 0 && (- <div style={{ position: "fixed", left: selectionContextMenu.x, top: selectionContextMenu.y, zIndex: 100 }}>- <DropdownMenu open={true} onOpenChange={(open) => { if (!open) setSelectionContextMenu(null); }}>- <DropdownMenuTrigger asChild>- <span className="sr-only" />- </DropdownMenuTrigger>- <DropdownMenuContent align="start" className="w-56 bg-white border border-slate-200 rounded-md py-1 shadow-md">- <div className="px-3 py-1.5 text-xs font-semibold text-slate-400">{selectionCountLabel}</div>- {view !== "trash" ? (- <>- <DropdownMenuItem- className="flex h-9 w-full items-center gap-2 px-3 text-left text-sm text-slate-700 hover:bg-slate-50 cursor-pointer outline-none"- disabled={moveNotebookOptions.length === 0 || isMoving}- onClick={() => setContextMoveOpen((value) => !value)}- >- <Folder className="h-4 w-4" />- <span className="min-w-0 flex-1 truncate">移动到笔记本</span>- <ChevronRight className={cn("h-4 w-4 transition-transform duration-200", contextMoveOpen && "rotate-90")} />- </DropdownMenuItem>- {contextMoveOpen && (- <div className="max-h-52 overflow-y-auto border-y border-slate-100 bg-slate-50/60 py-1">- {moveNotebookOptions.map((option: any) => (- <button- key={option.id}- className="flex h-9 w-full items-center gap-2 px-3 text-left text-sm text-slate-700 transition hover:bg-white"- style={{ paddingLeft: `${12 + option.depth * 14}px` }}- type="button"- disabled={isMoving}- onClick={() => {- setContextMoveOpen(false);- setSelectionContextMenu(null);- onMoveSelectedMemos(option.id);- }}- >- <NotebookIcon className="h-4 w-4 shrink-0" />- <span className="min-w-0 flex-1 truncate">{option.name}</span>- </button>- ))}- </div>- )}- <DropdownMenuItem- className="flex h-9 w-full items-center gap-2 px-3 text-left text-sm text-slate-700 hover:bg-slate-50 cursor-pointer outline-none"- disabled={selectedMemoIds.size === 0 || isPinning}- onClick={() => {- setSelectionContextMenu(null);- onPinSelectedMemos(selectedPinTarget);- }}- >- <Star className={cn("h-4 w-4", !selectedPinTarget && "fill-current text-slate-700")} />- {selectionPinLabel}- </DropdownMenuItem>- <DropdownMenuItem- className="flex h-9 w-full items-center gap-2 px-3 text-left text-sm text-slate-700 hover:bg-slate-50 cursor-pointer outline-none"- disabled={selectedMemoIds.size < 2 || isMerging}- onClick={() => {- setSelectionContextMenu(null);- onMerge();- }}- >- <Merge className="h-4 w-4" />- 合并笔记- </DropdownMenuItem>- <DropdownMenuSeparator className="my-1 h-px bg-slate-100" />- </>- ) : null}- <DropdownMenuItem- className="flex h-9 w-full items-center gap-2 px-3 text-left text-sm text-rose-700 hover:bg-rose-50 cursor-pointer outline-none"- disabled={selectedMemoIds.size === 0 || isDeleting}- onClick={() => {- setSelectionContextMenu(null);- onDeleteSelectedMemos();- }}- >- <Trash2 className="h-4 w-4" />- {view === "trash" ? "永久删除" : "删除"}- </DropdownMenuItem>- <DropdownMenuSeparator className="my-1 h-px bg-slate-100" />- <DropdownMenuItem- className="flex h-9 w-full items-center gap-2 px-3 text-left text-sm text-slate-700 hover:bg-slate-50 cursor-pointer outline-none"- onClick={() => {- setSelectionContextMenu(null);- onClearSelection();- }}- >- <X className="h-4 w-4" />- 取消选择- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- </div>- )}-{selectionMode && (<MobileSelectionActionBarcanDelete={selectedMemoIds.size > 0 && !isDeleting}diff --git a/apps/web/src/components/WorkspaceApp.tsx b/apps/web/src/components/WorkspaceApp.tsxindex e4ca4af4..77ee813a 100644--- a/apps/web/src/components/WorkspaceApp.tsx+++ b/apps/web/src/components/WorkspaceApp.tsx@@ -23,7 +23,7 @@ import {DrawerHeader,DrawerTitle,} from "@/components/ui/drawer";-import { MemoListPane } from "./MemoListPane";+import { MemoListPane, MemoSelectionActionBar } from "./MemoListPane";import { AppConfirmDialog, MemoDeleteConfirmDialog, NotebookNameDialog } from "./dialogs/ConfirmDialogs";import { api } from "@/lib/api";import { cn } from "@/lib/utils";@@ -467,6 +467,7 @@ export const WorkspaceApp = ({const [createdMemoEditId, setCreatedMemoEditId] = useState<string | null>(null);const [selectedMemoIds, setSelectedMemoIds] = useState<Set<string>>(new Set());const [memoSelectionMode, setMemoSelectionMode] = useState(false);+ const [selectionMoveTargetNotebookId, setSelectionMoveTargetNotebookId] = useState("");const [memoDeleteConfirmation, setMemoDeleteConfirmation] = useState<MemoDeleteConfirmation | null>(null);const [emptyTrashConfirmationOpen, setEmptyTrashConfirmationOpen] = useState(false);const [notebookNameDialog, setNotebookNameDialog] = useState<NotebookNameDialogState | null>(null);@@ -1095,6 +1096,22 @@ export const WorkspaceApp = ({const selectedNotebook = notebooks.find((notebook) => notebook.id === selectedNotebookId) ?? null;const selectedMemo = memoQuery.data?.memo ?? null;+ const selectionMoveNotebookOptions = useMemo(() => getNotebookMoveOptions(notebooks), [notebooks]);+ const selectedMemosInCurrentList = useMemo(+ () => memos.filter((memo) => selectedMemoIds.has(memo.id)),+ [memos, selectedMemoIds]+ );++ useEffect(() => {+ if (selectedNotebook?.id) {+ setSelectionMoveTargetNotebookId(selectedNotebook.id);+ return;+ }++ if (!selectionMoveTargetNotebookId && selectionMoveNotebookOptions[0]?.id) {+ setSelectionMoveTargetNotebookId(selectionMoveNotebookOptions[0].id);+ }+ }, [selectedNotebook?.id, selectionMoveNotebookOptions, selectionMoveTargetNotebookId]);const handleCreateNotebook = (parentId?: string | null) => {setNotebookNameDialog({ mode: "create", parentId: parentId ?? null });@@ -1297,6 +1314,69 @@ export const WorkspaceApp = ({});};+ const allSelectedMemosPinned =+ selectedMemosInCurrentList.length > 0 && selectedMemosInCurrentList.every((memo) => memo.isPinned);+ const selectedPinTarget = !allSelectedMemosPinned;+ const selectionPinLabel = allSelectedMemosPinned ? "取消置顶" : "置顶";+ const selectionPinTitle =+ selectedMemoIds.size === 0+ ? "请选择笔记"+ : memoView === "trash"+ ? "回收站内不可置顶"+ : pinMemosMutation.isPending+ ? "正在更新置顶"+ : selectionPinLabel;+ const selectionMoveTitle =+ selectedMemoIds.size === 0+ ? "请选择笔记"+ : memoView === "trash"+ ? "回收站内不可移动"+ : notebooks.length === 0+ ? "没有可移动的笔记本"+ : moveMemosMutation.isPending+ ? "正在移动"+ : "移动";+ const selectionMergeTitle =+ selectedMemoIds.size < 2+ ? "至少选择 2 条笔记"+ : memoView === "trash"+ ? "回收站内不可合并"+ : mergeMutation.isPending+ ? "正在合并"+ : "合并笔记";+ const selectionDeleteTitle =+ selectedMemoIds.size === 0+ ? "请选择笔记"+ : deleteMemosMutation.isPending || deleteMemoMutation.isPending+ ? "正在删除"+ : memoView === "trash"+ ? "永久删除"+ : "删除";+ const memoSelectionActionBar = memoSelectionModeActive ? (+ <MemoSelectionActionBar+ deleteTitle={selectionDeleteTitle}+ isDeleting={deleteMemosMutation.isPending || deleteMemoMutation.isPending}+ isMerging={mergeMutation.isPending}+ isMoving={moveMemosMutation.isPending}+ isPinning={pinMemosMutation.isPending}+ isTrashView={memoView === "trash"}+ mergeTitle={selectionMergeTitle}+ moveNotebookOptions={selectionMoveNotebookOptions}+ moveTargetNotebookId={selectionMoveTargetNotebookId}+ moveTitle={selectionMoveTitle}+ onClearSelection={clearMemoSelection}+ onDelete={handleDeleteSelectedMemos}+ onMerge={handleMerge}+ onMove={() => handleMoveSelectedMemos(selectionMoveTargetNotebookId)}+ onMoveTargetChange={setSelectionMoveTargetNotebookId}+ onPin={() => handlePinSelectedMemos(selectedPinTarget)}+ pinLabel={selectionPinLabel}+ pinTarget={selectedPinTarget}+ pinTitle={selectionPinTitle}+ selectedCount={selectedMemoIds.size}+ />+ ) : null;+const handleDeleteMemoFromList = (memoId: string) => {if (memoView !== "trash") {deleteMemoMutation.mutate({ memoId, permanent: false });@@ -1985,6 +2065,7 @@ export const WorkspaceApp = ({searchFocusToken={noteSearchFocusToken}replaceFocusToken={noteReplaceFocusToken}imageCompressionEnabled={imageCompressionEnabled}+ selectionActionBar={memoSelectionActionBar}hasNextMemo={Boolean(nextMemoId)}hasPreviousMemo={Boolean(previousMemoId)}onBackToList={() => setActivePane("memos")}