chore: backend api

This commit is contained in:
jialin
2026-01-30 20:48:55 +08:00
committed by Lawrence Li
parent af6f90c228
commit a2be7f6b36
22 changed files with 11829 additions and 9118 deletions
+10
View File
@@ -25,6 +25,7 @@ import VersionInfoModal from './components/version-info-modal';
import { json2Yaml, yaml2Json } from './config';
import { FormData, ListItem } from './config/types';
import useExportYAML from './hooks/use-export-yaml';
import useEnableBackend from './services/use-enable-backend';
const BackendList = () => {
const intl = useIntl();
@@ -59,6 +60,7 @@ const BackendList = () => {
open: boolean;
currentData?: Partial<ListItem>;
}>({ open: false });
const { handleEnableBackend } = useEnableBackend();
// built_in_version_configs is read-only, but needs to be included when updating
const handleOnSubmit = async (values: FormData) => {
@@ -151,6 +153,14 @@ const BackendList = () => {
open: true,
currentData: item.data
});
} else if (item.action === 'enable' || item.action === 'disable') {
handleEnableBackend({
id: item.data.id,
data: {
...item.data,
enabled: item.action === 'enable'
}
});
}
};