feat: reserved providers

This commit is contained in:
Fu Diwei
2025-02-13 21:48:55 +08:00
parent 0b7b544d4e
commit d588e14a58
8 changed files with 205 additions and 7 deletions

View File

@@ -4,7 +4,6 @@ import { useControllableValue } from "ahooks";
import { Modal, notification } from "antd";
import { type AccessModel } from "@/domain/access";
import { accessProvidersMap } from "@/domain/provider";
import { useTriggerElement, useZustandShallowSelector } from "@/hooks";
import { useAccessesStore } from "@/stores/access";
import { getErrMsg } from "@/utils/error";
@@ -50,7 +49,6 @@ const AccessEditModal = ({ data, loading, trigger, preset, afterSubmit, ...props
try {
let values: AccessModel = formRef.current!.getFieldsValue();
values.usage = accessProvidersMap.get(values.provider)!.usage;
if (preset === "add") {
if (data?.id) {

View File

@@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";
import { Avatar, Card, Col, Empty, Flex, Input, type InputRef, Row, Tabs, Tooltip, Typography } from "antd";
import Show from "@/components/Show";
import { DEPLOY_CATEGORIES, type DeployProvider, deployProvidersMap } from "@/domain/provider";
import { DEPLOY_CATEGORIES, deployProvidersMap } from "@/domain/provider";
export type DeployProviderPickerProps = {
className?: string;