import type { DocKind } from "#office/contract.ts"; import type { Strings } from "#ui/i18n.ts"; import { FileType, Icon } from "#ui/icons.tsx"; import { baseName, dirName } from "#ui/rpc.ts"; import { Menu, MenuItem } from "#ui/shell/parts.tsx"; import type { FitMode } from "#ui/viewers/types.ts"; // 面板标题栏的两个下拉菜单(切换文档、更多操作),从 main.tsx 拆出以控制单文件规模,行为不变。 export function SwitchMenu({ t, recent, currentPath, onOpen, onBrowse, onClose, }: { t: Strings; recent: { path: string; kind: DocKind }[]; currentPath: string | undefined; onOpen(path: string): void; onBrowse(): void; onClose(): void; }) { return (
); } export function MoreMenu({ t, zoomable, zoomMode, onFit, onFind, onReload, onClose, }: { t: Strings; zoomable: boolean; zoomMode: FitMode | null | undefined; onFit(mode: FitMode): void; onFind(): void; onReload(): void; onClose(): void; }) { return ( ); }