- refactor(mcp): remove HTML5 required to avoid native popups - refactor(ui): propagate onNotify from App → McpPanel → McpFormModal → McpWizardModal - feat(settings): use onNotify for export and file-selection feedback - fix(ui): notify link-open failures via onNotify; remove unused appType prop from ProviderList - chore: format codebase and ensure typecheck passes
38 lines
817 B
TypeScript
38 lines
817 B
TypeScript
import React from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
import { Provider } from "../types";
|
|
import { AppType } from "../lib/tauri-api";
|
|
import ProviderForm from "./ProviderForm";
|
|
|
|
interface AddProviderModalProps {
|
|
appType: AppType;
|
|
onAdd: (provider: Omit<Provider, "id">) => void;
|
|
onClose: () => void;
|
|
}
|
|
|
|
const AddProviderModal: React.FC<AddProviderModalProps> = ({
|
|
appType,
|
|
onAdd,
|
|
onClose,
|
|
}) => {
|
|
const { t } = useTranslation();
|
|
|
|
const title =
|
|
appType === "claude"
|
|
? t("provider.addClaudeProvider")
|
|
: t("provider.addCodexProvider");
|
|
|
|
return (
|
|
<ProviderForm
|
|
appType={appType}
|
|
title={title}
|
|
submitText={t("common.add")}
|
|
showPresets={true}
|
|
onSubmit={onAdd}
|
|
onClose={onClose}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default AddProviderModal;
|