refactor: 清理 Electron 遗留代码并优化项目结构
- 删除 Electron 主进程代码 (src/main/) - 删除构建产物文件夹 (build/, dist/, release/) - 清理 package.json 中的 Electron 依赖和脚本 - 删除 TypeScript 配置中的 Electron 相关文件 - 优化前端代码结构至 Tauri 标准结构 (src/renderer → src/) - 删除移动端图标和不必要文件 - 更新文档说明技术栈变更为 Tauri
This commit is contained in:
25
src/components/AddProviderModal.tsx
Normal file
25
src/components/AddProviderModal.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import React from "react";
|
||||
import { Provider } from "../../shared/types";
|
||||
import ProviderForm from "./ProviderForm";
|
||||
|
||||
interface AddProviderModalProps {
|
||||
onAdd: (provider: Omit<Provider, "id">) => void;
|
||||
onClose: () => void;
|
||||
}
|
||||
|
||||
const AddProviderModal: React.FC<AddProviderModalProps> = ({
|
||||
onAdd,
|
||||
onClose,
|
||||
}) => {
|
||||
return (
|
||||
<ProviderForm
|
||||
title="添加新供应商"
|
||||
submitText="添加"
|
||||
showPresets={true}
|
||||
onSubmit={onAdd}
|
||||
onClose={onClose}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default AddProviderModal;
|
||||
Reference in New Issue
Block a user