"use client"; import { ShortcutKey } from "./Layout"; import { Media } from "./Media"; import { Popover } from "./Popover"; import { metaKey } from "src/utils/metaKey"; import { useEntitySetContext } from "./EntitySetProvider"; import { useState } from "react"; import { ActionButton } from "components/ActionBar/ActionButton"; import { HelpSmall } from "./Icons/HelpSmall"; import { isMac } from "src/utils/isDevice"; import { useIsMobile } from "src/hooks/isMobile"; export const HelpPopover = (props: { noShortcuts?: boolean }) => { let entity_set = useEntitySetContext(); let isMobile = useIsMobile(); return entity_set.permissions.write ? ( } label="About" />} >
{/* about links */} {/* contact links */}
{/* keyboard shortcuts: desktop only */} {!props.noShortcuts && ( <>
{/* shift + up/down arrows (or click + drag): select multiple blocks */} {/* cmd/ctrl-a: first selects all text in a block; again selects all blocks on page */} {/* cmd/ctrl + up/down arrows: go to beginning / end of doc */} {/* tab / shift + tab: indent / outdent */}
)}
{/* links: terms and privacy */}
{/* */}
) : null; }; const KeyboardShortcut = (props: { name: string; keys: string[] }) => { return (
{props.name}
{props.keys.map((key, index) => { return {key}; })}
); }; const OtherShortcut = (props: { name: string; description: string }) => { return (
{props.name} {props.description}
); }; const Label = (props: { children: React.ReactNode }) => { return
{props.children}
; }; const HelpLink = (props: { url: string; text: string }) => { const [isHovered, setIsHovered] = useState(false); const handleMouseEnter = () => { setIsHovered(true); }; const handleMouseLeave = () => { setIsHovered(false); }; return ( {props.text} ); };