diff --git a/apps/client/src/widgets/dialogs/export.tsx b/apps/client/src/widgets/dialogs/export.tsx index 01caa7659f..d31bf6a126 100644 --- a/apps/client/src/widgets/dialogs/export.tsx +++ b/apps/client/src/widgets/dialogs/export.tsx @@ -1,16 +1,18 @@ +import "./export.css"; + import { useState } from "preact/hooks"; + +import froca from "../../services/froca"; import { t } from "../../services/i18n"; +import open from "../../services/open"; +import toastService, { type ToastOptionsWithRequiredId } from "../../services/toast"; import tree from "../../services/tree"; +import utils, { isStandalone } from "../../services/utils"; +import ws from "../../services/ws"; import Button from "../react/Button"; import FormRadioGroup from "../react/FormRadioGroup"; -import Modal from "../react/Modal"; -import "./export.css"; -import ws from "../../services/ws"; -import toastService, { type ToastOptionsWithRequiredId } from "../../services/toast"; -import utils from "../../services/utils"; -import open from "../../services/open"; -import froca from "../../services/froca"; import { useTriliumEvent } from "../react/hooks"; +import Modal from "../react/Modal"; interface ExportDialogProps { branchId?: string | null; @@ -79,7 +81,7 @@ export default function ExportDialog() { values={[ { value: "html", label: t("export.format_html_zip") }, { value: "markdown", label: t("export.format_markdown") }, - { value: "share", label: t("export.share-format") }, + !isStandalone && { value: "share", label: t("export.share-format") }, { value: "opml", label: t("export.format_opml") } ]} /> diff --git a/apps/client/src/widgets/react/FormRadioGroup.tsx b/apps/client/src/widgets/react/FormRadioGroup.tsx index bf81b17d83..5be724a8ce 100644 --- a/apps/client/src/widgets/react/FormRadioGroup.tsx +++ b/apps/client/src/widgets/react/FormRadioGroup.tsx @@ -1,30 +1,35 @@ import type { ComponentChildren } from "preact"; + import { useUniqueName } from "./hooks"; interface FormRadioProps { name: string; currentValue?: string; - values: { + values: ({ value: string; label: string | ComponentChildren; inlineDescription?: string | ComponentChildren; - }[]; + } | false)[]; onChange(newValue: string): void; } export default function FormRadioGroup({ values, ...restProps }: FormRadioProps) { return (