fix: fix bugs
This commit is contained in:
parent
6eba0ac564
commit
5f7bd0de5f
40
package.json
40
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@kevisual/center",
|
||||
"private": true,
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.6",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@ -9,8 +9,8 @@
|
||||
"dev:kv": "cross-env VITE_USE_KV=true vite",
|
||||
"lint": "eslint .",
|
||||
"preview": "vite preview",
|
||||
"prepub": "envision switchMe",
|
||||
"pub": "envision deploy ./dist -k center -v 0.0.5 -u"
|
||||
"prepub": "envision switch root",
|
||||
"pub": "envision deploy ./dist -k center -v 0.0.6 -u"
|
||||
},
|
||||
"dependencies": {
|
||||
"@abearxiong/flows": "0.0.1-alpha.9",
|
||||
@ -22,10 +22,10 @@
|
||||
"@kevisual/query": "^0.0.6",
|
||||
"@kevisual/ui": "^0.0.2",
|
||||
"@monaco-editor/react": "^4.7.0",
|
||||
"@tailwindcss/vite": "^4.0.6",
|
||||
"@tailwindcss/vite": "^4.0.8",
|
||||
"@uiw/react-textarea-code-editor": "^3.1.0",
|
||||
"@xyflow/react": "^12.4.3",
|
||||
"antd": "^5.24.0",
|
||||
"@xyflow/react": "^12.4.4",
|
||||
"antd": "^5.24.2",
|
||||
"classnames": "^2.5.1",
|
||||
"clsx": "^2.1.1",
|
||||
"copy-to-clipboard": "^3.3.3",
|
||||
@ -34,42 +34,42 @@
|
||||
"immer": "^10.1.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"marked": "^15.0.7",
|
||||
"nanoid": "^5.1.0",
|
||||
"nanoid": "^5.1.2",
|
||||
"react": "19.0.0",
|
||||
"react-dom": "19.0.0",
|
||||
"react-resizable-panels": "^2.1.7",
|
||||
"react-router": "^7.1.5",
|
||||
"react-router-dom": "^7.1.5",
|
||||
"react-toastify": "^11.0.3",
|
||||
"react-router": "^7.2.0",
|
||||
"react-router-dom": "^7.2.0",
|
||||
"react-toastify": "^11.0.5",
|
||||
"vite-plugin-tsconfig-paths": "^1.4.1",
|
||||
"zustand": "^5.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.20.0",
|
||||
"@eslint/js": "^9.21.0",
|
||||
"@tailwindcss/aspect-ratio": "^0.4.2",
|
||||
"@tailwindcss/typography": "^0.5.16",
|
||||
"@types/d3": "^7.4.3",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^22.13.4",
|
||||
"@types/node": "^22.13.5",
|
||||
"@types/path-browserify": "^1.0.3",
|
||||
"@types/react": "^19.0.8",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"@types/react": "^19.0.10",
|
||||
"@types/react-dom": "^19.0.4",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^9.20.1",
|
||||
"eslint": "^9.21.0",
|
||||
"eslint-plugin-react-hooks": "^5.1.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.19",
|
||||
"globals": "^15.15.0",
|
||||
"globals": "^16.0.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"postcss-import": "^16.1.0",
|
||||
"pretty-bytes": "^6.1.1",
|
||||
"react-is": "19.0.0",
|
||||
"tailwind-merge": "^3.0.1",
|
||||
"tailwindcss": "^4.0.6",
|
||||
"tailwind-merge": "^3.0.2",
|
||||
"tailwindcss": "^4.0.8",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"typescript": "^5.7.3",
|
||||
"typescript-eslint": "^8.24.0",
|
||||
"vite": "^6.1.0"
|
||||
"typescript-eslint": "^8.25.0",
|
||||
"vite": "^6.2.0"
|
||||
}
|
||||
}
|
782
pnpm-lock.yaml
generated
782
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@ import { useNavigation, useParams } from 'react-router';
|
||||
import { useAppVersionStore } from '../store';
|
||||
import { useShallow } from 'zustand/react/shallow';
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { Button, Form, Input, message, Modal, Tooltip } from 'antd';
|
||||
import { Button, Form, Input, message, Modal, Space, Tooltip } from 'antd';
|
||||
import { CloudUploadOutlined, DeleteOutlined, EditOutlined, FileOutlined, LeftOutlined, LinkOutlined, PlusOutlined } from '@ant-design/icons';
|
||||
import { isObjectNull } from '@/utils/is-null';
|
||||
import { FileUpload } from '../modules/FileUpload';
|
||||
@ -99,6 +99,7 @@ export const AppVersionList = () => {
|
||||
}),
|
||||
);
|
||||
const navigate = useNewNavigate();
|
||||
const [modal, contextHolder] = Modal.useModal();
|
||||
const [isUpload, setIsUpload] = useState(false);
|
||||
useEffect(() => {
|
||||
// fetch app version list
|
||||
@ -151,7 +152,7 @@ export const AppVersionList = () => {
|
||||
</Tooltip>
|
||||
</div>
|
||||
<div className='mt-4'>
|
||||
<Button.Group>
|
||||
<Space.Compact>
|
||||
{/* <Button
|
||||
onClick={() => {
|
||||
versionStore.setFormData(item);
|
||||
@ -162,7 +163,7 @@ export const AppVersionList = () => {
|
||||
<Tooltip title='Delete'>
|
||||
<Button
|
||||
onClick={(e) => {
|
||||
Modal.confirm({
|
||||
modal.confirm({
|
||||
title: 'Delete',
|
||||
content: 'Are you sure delete this data?',
|
||||
onOk: () => {
|
||||
@ -207,7 +208,7 @@ export const AppVersionList = () => {
|
||||
}}
|
||||
/>
|
||||
</Tooltip>
|
||||
</Button.Group>
|
||||
</Space.Compact>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@ -216,6 +217,7 @@ export const AppVersionList = () => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{contextHolder}
|
||||
<div className='shark h-full'>
|
||||
{isUpload && (
|
||||
<div className='bg-white p-2 w-[600px] h-full flex flex-col'>
|
||||
|
@ -1,10 +1,9 @@
|
||||
import { useShallow } from 'zustand/react/shallow';
|
||||
import { useUserAppStore } from '../store';
|
||||
import { useEffect } from 'react';
|
||||
import { Button, Form, Input, message, Modal, Select, Tooltip } from 'antd';
|
||||
import { CodeOutlined, DashboardOutlined, DeleteOutlined, EditOutlined, LinkOutlined, PlusOutlined, UnorderedListOutlined } from '@ant-design/icons';
|
||||
import { Button, Form, Input, message, Space, Modal, Select, Tooltip } from 'antd';
|
||||
import { CodeOutlined, DeleteOutlined, EditOutlined, LinkOutlined, PlusOutlined, UnorderedListOutlined } from '@ant-design/icons';
|
||||
import { isObjectNull } from '@/utils/is-null';
|
||||
import { FileUpload } from '../modules/FileUpload';
|
||||
import { useNewNavigate } from '@/modules';
|
||||
import { marked } from 'marked';
|
||||
import clsx from 'clsx';
|
||||
@ -94,6 +93,8 @@ const FormModal = () => {
|
||||
};
|
||||
|
||||
export const List = () => {
|
||||
const [modal, contextHolder] = Modal.useModal();
|
||||
|
||||
const userAppStore = useUserAppStore(
|
||||
useShallow((state) => {
|
||||
return {
|
||||
@ -150,7 +151,7 @@ export const List = () => {
|
||||
</div>
|
||||
</div>
|
||||
<div className='mt-2'>
|
||||
<Button.Group>
|
||||
<Space.Compact>
|
||||
<Tooltip title={'Edit'}>
|
||||
<Button
|
||||
icon={<EditOutlined />}
|
||||
@ -171,9 +172,13 @@ export const List = () => {
|
||||
icon={<LinkOutlined />}
|
||||
onClick={() => {
|
||||
if (isRunning) {
|
||||
let baseUri = 'https://kevisual.xiongxiao.me';
|
||||
let baseUri = location.origin;
|
||||
if (item.domain) {
|
||||
baseUri = item.domain;
|
||||
if (item.domain.startsWith('http://') || item.domain.startsWith('https://')) {
|
||||
baseUri = item.domain;
|
||||
} else {
|
||||
baseUri = new URL(item.domain).origin;
|
||||
}
|
||||
}
|
||||
if (DEV_SERVER) {
|
||||
baseUri = 'http://localhost:3005';
|
||||
@ -189,7 +194,8 @@ export const List = () => {
|
||||
<Button
|
||||
icon={<DeleteOutlined />}
|
||||
onClick={(e) => {
|
||||
Modal.confirm({
|
||||
console.log('delete', item);
|
||||
modal.confirm({
|
||||
title: 'Delete',
|
||||
content: 'Are you sure delete this data?',
|
||||
onOk: () => {
|
||||
@ -199,7 +205,7 @@ export const List = () => {
|
||||
e.stopPropagation();
|
||||
}}></Button>
|
||||
</Tooltip>
|
||||
</Button.Group>
|
||||
</Space.Compact>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@ -208,6 +214,7 @@ export const List = () => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{contextHolder}
|
||||
<FormModal />
|
||||
</div>
|
||||
);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Button, Input, message, Modal, Select, Switch, Table, Tooltip } from 'antd';
|
||||
import { Button, Input, message, Modal, Select, Space, Switch, Table, Tooltip } from 'antd';
|
||||
import { Fragment, useEffect, useState } from 'react';
|
||||
import { TextArea } from '../components/TextArea';
|
||||
import { useContainerStore } from '../store';
|
||||
@ -187,6 +187,7 @@ const PublishFormModal = () => {
|
||||
};
|
||||
export const ContainerList = () => {
|
||||
const navicate = useNewNavigate();
|
||||
const [modal, contextHolder] = Modal.useModal();
|
||||
const containerStore = useContainerStore(
|
||||
useShallow((state) => {
|
||||
return {
|
||||
@ -253,7 +254,7 @@ export const ContainerList = () => {
|
||||
<TextArea className='max-h-[240px] scrollbar' value={item.code} readonly />
|
||||
</div>
|
||||
<div className='flex mt-2 '>
|
||||
<Button.Group>
|
||||
<Space.Compact>
|
||||
<Button
|
||||
onClick={() => {
|
||||
// containerStore.publishData(item);
|
||||
@ -290,7 +291,7 @@ export const ContainerList = () => {
|
||||
<Button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
Modal.confirm({
|
||||
modal.confirm({
|
||||
title: 'Delete',
|
||||
content: 'Are you sure delete this data?',
|
||||
onOk: () => {
|
||||
@ -301,7 +302,7 @@ export const ContainerList = () => {
|
||||
}}
|
||||
icon={<DeleteOutlined />}></Button>
|
||||
</Tooltip>
|
||||
</Button.Group>
|
||||
</Space.Compact>
|
||||
</div>
|
||||
</div>
|
||||
</Fragment>
|
||||
@ -358,6 +359,7 @@ export const ContainerList = () => {
|
||||
</div>
|
||||
<FormModal />
|
||||
<PublishFormModal />
|
||||
{contextHolder}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
@ -114,6 +114,7 @@ export const List = () => {
|
||||
}),
|
||||
);
|
||||
const [codeEdit, setCodeEdit] = useState(false);
|
||||
const [modal, contextHolder] = Modal.useModal();
|
||||
const [code, setCode] = useState('');
|
||||
useEffect(() => {
|
||||
userStore.getList();
|
||||
@ -176,7 +177,7 @@ export const List = () => {
|
||||
</Tooltip>
|
||||
<Button
|
||||
onClick={(e) => {
|
||||
Modal.confirm({
|
||||
modal.confirm({
|
||||
title: 'Delete',
|
||||
content: 'Are you sure delete this data?',
|
||||
onOk: () => {
|
||||
@ -233,6 +234,7 @@ export const List = () => {
|
||||
</div>
|
||||
</div>
|
||||
<FormModal />
|
||||
{contextHolder}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Button, Input, message, Modal, Table } from 'antd';
|
||||
import { Button, Input, message, Modal, Space, Table } from 'antd';
|
||||
import { Fragment, useEffect, useMemo, useState } from 'react';
|
||||
import { useUserStore } from '../store';
|
||||
import { useShallow } from 'zustand/react/shallow';
|
||||
@ -81,6 +81,7 @@ const FormModal = () => {
|
||||
};
|
||||
export const List = () => {
|
||||
const navicate = useNewNavigate();
|
||||
const [modal, contextHolder] = Modal.useModal();
|
||||
const userStore = useUserStore(
|
||||
useShallow((state) => {
|
||||
return {
|
||||
@ -137,7 +138,7 @@ export const List = () => {
|
||||
<div className='font-light text-xs mt-2'>{item.description ? item.description : '-'}</div>
|
||||
</div>
|
||||
<div className='flex mt-2 '>
|
||||
<Button.Group>
|
||||
<Space.Compact>
|
||||
<Button
|
||||
onClick={(e) => {
|
||||
userStore.setFormData(item);
|
||||
@ -148,7 +149,7 @@ export const List = () => {
|
||||
icon={<EditOutlined />}></Button>
|
||||
<Button
|
||||
onClick={(e) => {
|
||||
Modal.confirm({
|
||||
modal.confirm({
|
||||
title: 'Delete',
|
||||
content: 'Are you sure delete this data?',
|
||||
onOk: () => {
|
||||
@ -158,7 +159,7 @@ export const List = () => {
|
||||
e.stopPropagation();
|
||||
}}
|
||||
icon={<DeleteOutlined />}></Button>
|
||||
</Button.Group>
|
||||
</Space.Compact>
|
||||
</div>
|
||||
</div>
|
||||
</Fragment>
|
||||
@ -202,6 +203,7 @@ export const List = () => {
|
||||
</div>
|
||||
</div>
|
||||
<FormModal />
|
||||
{contextHolder}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
@ -23,19 +23,19 @@ let proxy = {};
|
||||
if (isKV) {
|
||||
proxy = {
|
||||
'/api': {
|
||||
target: 'https://envision.xiongxiao.me',
|
||||
target: 'https://kevisual.xiongxiao.me',
|
||||
changeOrigin: true,
|
||||
rewrite: (path: any) => path.replace(/^\/api/, '/api'),
|
||||
},
|
||||
'/api/router': {
|
||||
target: 'wss://envision.xiongxiao.me',
|
||||
target: 'wss://kevisual.xiongxiao.me',
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
rewriteWsOrigin: true,
|
||||
rewrite: (path: any) => path.replace(/^\/api/, '/api'),
|
||||
},
|
||||
'/resources': {
|
||||
target: 'https://envision.xiongxiao.me',
|
||||
target: 'https://kevisual.xiongxiao.me',
|
||||
changeOrigin: true,
|
||||
rewrite: (path: any) => path.replace(/^\/resources/, '/resources'),
|
||||
},
|
||||
@ -78,7 +78,7 @@ export default defineConfig({
|
||||
rewrite: (path) => path.replace(/^\/api/, '/api'),
|
||||
},
|
||||
'/resources': {
|
||||
target: 'https://envision.xiongxiao.me',
|
||||
target: 'https://kevisual.xiongxiao.me',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/resources/, '/resources'),
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user