Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
685a32ee30 |
No files matched your search
@@ -1,3 +1,5 @@
|
||||
## 0.18.0
|
||||
- Исправлено редактирование JSON в конфиге
|
||||
## 0.17.3
|
||||
- Обновлены зависимости в package.json
|
||||
## 0.17.1
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "isp-admin-ui",
|
||||
"private": true,
|
||||
"version": "0.17.3",
|
||||
"version": "0.18.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"start": "vite",
|
||||
|
||||
@@ -4,12 +4,10 @@ import { FC, useContext } from 'react'
|
||||
|
||||
import { ConfigurationEditorPropsType } from '@pages/ConfigurationEditorPage/ConfigurationEditor.type.ts'
|
||||
|
||||
import { cleanEmptyParamsObject } from '@utils/objectUtils.ts'
|
||||
|
||||
import { Context } from '@stores/index.tsx'
|
||||
|
||||
const ConfigurationEditorJson: FC<ConfigurationEditorPropsType> = ({
|
||||
bufConfig = {},
|
||||
bufConfig,
|
||||
setBufConfig,
|
||||
isCurrentConfigLoading
|
||||
}) => {
|
||||
@@ -23,7 +21,7 @@ const ConfigurationEditorJson: FC<ConfigurationEditorPropsType> = ({
|
||||
...bufConfig,
|
||||
data: { ...updated_src }
|
||||
}
|
||||
setBufConfig(cleanEmptyParamsObject(newData))
|
||||
setBufConfig(newData)
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -37,7 +35,7 @@ const ConfigurationEditorJson: FC<ConfigurationEditorPropsType> = ({
|
||||
enableClipboard={true}
|
||||
iconStyle="square"
|
||||
onEdit={({ updated_src }: any) => handleEdit(updated_src)}
|
||||
src={bufConfig.data}
|
||||
src={bufConfig?.data}
|
||||
sortKeys={true}
|
||||
collapsed={1}
|
||||
/>
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export interface ConfigurationEditorPropsType {
|
||||
jsonSchema?: ResponseSchemaType
|
||||
bufConfig?: ConfigType
|
||||
bufConfig: ConfigType
|
||||
setBufConfig: Dispatch<SetStateAction<ConfigType | undefined>>
|
||||
isCurrentConfigLoading: boolean
|
||||
setDisableBtn?: Dispatch<SetStateAction<boolean>>
|
||||
|
||||
@@ -130,7 +130,7 @@ const ConfigurationEditorPage: FC = () => {
|
||||
return (
|
||||
<ConfigurationEditorForm
|
||||
submitRef={submitRef}
|
||||
bufConfig={bufConfig}
|
||||
bufConfig={bufConfig as ConfigType}
|
||||
setBufConfig={setBufConfig}
|
||||
jsonSchema={jsonSchema}
|
||||
isCurrentConfigLoading={isCurrentConfigLoading}
|
||||
@@ -140,7 +140,7 @@ const ConfigurationEditorPage: FC = () => {
|
||||
case jsonRadio:
|
||||
return (
|
||||
<ConfigurationEditorJson
|
||||
bufConfig={bufConfig}
|
||||
bufConfig={bufConfig as ConfigType}
|
||||
setBufConfig={setBufConfig}
|
||||
isCurrentConfigLoading={isCurrentConfigLoading}
|
||||
/>
|
||||
@@ -149,7 +149,7 @@ const ConfigurationEditorPage: FC = () => {
|
||||
return (
|
||||
<ConfigurationEditorCode
|
||||
setDisableBtn={setDisableBtn}
|
||||
bufConfig={bufConfig}
|
||||
bufConfig={bufConfig as ConfigType}
|
||||
setBufConfig={setBufConfig}
|
||||
isCurrentConfigLoading={isCurrentConfigLoading}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user