import { Box, createDisclosure, VStack } from "@hope-ui/solid" import { createMemo, Show } from "solid-js" import { RightIcon } from "./Icon" import { CgMoreO } from "solid-icons/cg" import { TbCheckbox } from "solid-icons/tb" import { objStore, selectAll, State, toggleCheckbox, userCan } from "~/store" import { bus } from "~/utils" import { operations } from "./operations" import { IoMagnetOutline } from "solid-icons/io" import { AiOutlineCloudUpload, AiOutlineSetting } from "solid-icons/ai" import { RiSystemRefreshLine } from "solid-icons/ri" import { usePath } from "~/hooks" import { Motion } from "@motionone/solid" import { isTocVisible, setTocDisabled } from "~/components" import { BiSolidBookContent } from "solid-icons/bi" export const Right = () => { const { isOpen, onToggle } = createDisclosure({ defaultIsOpen: localStorage.getItem("more-open") === "true", onClose: () => localStorage.setItem("more-open", "false"), onOpen: () => localStorage.setItem("more-open", "true"), }) const margin = createMemo(() => (isOpen() ? "$4" : "$5")) const isFolder = createMemo(() => objStore.state === State.Folder) const { refresh } = usePath() return ( { onToggle() }} /> } > {/* */} { refresh(undefined, true) }} /> { bus.emit("tool", "new_file") }} /> { bus.emit("tool", "mkdir") }} /> { bus.emit("tool", "recursiveMove") }} /> { bus.emit("tool", "removeEmptyDirectory") }} /> { selectAll(true) bus.emit("tool", "batchRename") }} /> { bus.emit("tool", "upload") }} /> { bus.emit("tool", "offline_download") }} /> { setTocDisabled((disabled) => !disabled) }} /> { bus.emit("tool", "local_settings") }} /> ) }