feat: bump container
This commit is contained in:
@@ -2,7 +2,7 @@ import { useShallow } from 'zustand/react/shallow';
|
||||
import { useUserAppStore } from '../store';
|
||||
import { useEffect } from 'react';
|
||||
import { Button, Form, Input, Modal, Select, Tooltip } from 'antd';
|
||||
import { DeleteOutlined, EditOutlined, PlusOutlined, UnorderedListOutlined } from '@ant-design/icons';
|
||||
import { DeleteOutlined, EditOutlined, LinkOutlined, PlusOutlined, UnorderedListOutlined } from '@ant-design/icons';
|
||||
import { isObjectNull } from '@/utils/is-null';
|
||||
import { useNavigate } from 'react-router';
|
||||
import { FileUpload } from '../modules/FileUpload';
|
||||
@@ -122,10 +122,14 @@ export const List = () => {
|
||||
<div className='w-full h-full bg-white rounded-lg p-2'>
|
||||
<div className='flex flex-wrap gap-2'>
|
||||
{userAppStore.list.map((item) => {
|
||||
const isRunning = item.status === 'running';
|
||||
return (
|
||||
<div className='card border-t w-[300px] ' key={item.id}>
|
||||
<div className='card-title' onClick={() => {}}>
|
||||
<div className='card-title flex justify-between' onClick={() => {}}>
|
||||
{item.title}
|
||||
<div>
|
||||
<div className={`${isRunning ? 'bg-green-500' : 'bg-red-500'} w-4 h-4 rounded-full`}></div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='mt-2'>
|
||||
<Button.Group>
|
||||
@@ -144,6 +148,14 @@ export const List = () => {
|
||||
navicate(`/app/${item.key}/verison/list`);
|
||||
}}></Button>
|
||||
</Tooltip>
|
||||
<Tooltip title={'App Version List'}>
|
||||
<Button
|
||||
icon={<LinkOutlined />}
|
||||
onClick={() => {
|
||||
const link = new URL(`/${item.user}/${item.key}`, 'https://kevisual.xiongxiao.me');
|
||||
window.open(link.toString(), '_blank');
|
||||
}}></Button>
|
||||
</Tooltip>
|
||||
<Tooltip title={'Delete'}>
|
||||
<Button icon={<DeleteOutlined />} onClick={() => userAppStore.deleteData(item.id)}></Button>
|
||||
</Tooltip>
|
||||
|
||||
@@ -5,7 +5,7 @@ const getGithubAuth = () => {
|
||||
const client_id = 'Ov23littcejmbA5iKrhK';
|
||||
const redirect_uri = 'https://envision.xiongxiao.me/github/callback';
|
||||
const scope = 'user';
|
||||
const state = 'abc123' && nanoid(6);
|
||||
const state = 'abc123'; //&& nanoid(6);
|
||||
return `https://github.com/login/oauth/authorize?client_id=${client_id}&redirect_uri=${redirect_uri}&scope=${scope}&state=${state}`;
|
||||
};
|
||||
export const Login = () => {
|
||||
|
||||
@@ -10,6 +10,14 @@ const serverPath = [
|
||||
path: 'panel',
|
||||
links: ['edit/list', 'flow/:id', 'deck/:id'],
|
||||
},
|
||||
{
|
||||
path: 'app',
|
||||
links: ['edit/list', ':app/verison/list'],
|
||||
},
|
||||
{
|
||||
path: 'file',
|
||||
links: ['edit/list'],
|
||||
},
|
||||
{
|
||||
path: 'publish',
|
||||
links: ['edit/list'],
|
||||
@@ -30,46 +38,52 @@ const serverPath = [
|
||||
path: 'chat',
|
||||
links: ['history/list', 'session/list', 'chat-prompt/list'],
|
||||
},
|
||||
{
|
||||
path: 'org',
|
||||
links: ['edit/list'],
|
||||
},
|
||||
];
|
||||
const ServerPath = () => {
|
||||
const navigate = useNavigate();
|
||||
return (
|
||||
<div className='p-2 w-full h-full bg-gray-200'>
|
||||
<h1 className='p-4 w-1/2 m-auto h1'>Site Map</h1>
|
||||
<div className='flex flex-col w-1/2 m-auto bg-white p-4 border rounded-md shadow-md min-w-[600px]'>
|
||||
{serverPath.map((item) => {
|
||||
const links = item.links.map((link) => {
|
||||
const hasId = link.includes(':id');
|
||||
const _path = link === '/' ? item.path : item.path + '/' + link;
|
||||
<div className='w-1/2 m-auto bg-white p-4 border rounded-md shadow-md min-w-[700px] max-h-[80vh] overflow-auto scrollbar'>
|
||||
<div className='flex flex-col w-full'>
|
||||
{serverPath.map((item) => {
|
||||
const links = item.links.map((link) => {
|
||||
const hasId = link.includes(':id');
|
||||
const _path = link === '/' ? item.path : item.path + '/' + link;
|
||||
return (
|
||||
<div
|
||||
key={link}
|
||||
className={clsx('flex flex-col', !hasId && 'cursor-pointer')}
|
||||
onClick={() => {
|
||||
if (hasId) {
|
||||
return;
|
||||
}
|
||||
console.log('link', link);
|
||||
if (link === '/') {
|
||||
navigate(`/${item.path}`);
|
||||
return;
|
||||
}
|
||||
if (link) {
|
||||
navigate(`/${item.path}/${link}`);
|
||||
} else {
|
||||
navigate(`/${item.path}`);
|
||||
}
|
||||
}}>
|
||||
<div className={clsx('border rounded-md p-2 m-2', hasId && 'bg-gray-200')}>{_path}</div>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
return (
|
||||
<div
|
||||
key={link}
|
||||
className={clsx('flex flex-col', !hasId && 'cursor-pointer')}
|
||||
onClick={() => {
|
||||
if (hasId) {
|
||||
return;
|
||||
}
|
||||
console.log('link', link);
|
||||
if (link === '/') {
|
||||
navigate(`/${item.path}`);
|
||||
return;
|
||||
}
|
||||
if (link) {
|
||||
navigate(`/${item.path}/${link}`);
|
||||
} else {
|
||||
navigate(`/${item.path}`);
|
||||
}
|
||||
}}>
|
||||
<div className={clsx('border rounded-md p-2 m-2', hasId && 'bg-gray-200')}>{_path}</div>
|
||||
<div key={item.path} className='flex'>
|
||||
{links}
|
||||
</div>
|
||||
);
|
||||
});
|
||||
return (
|
||||
<div key={item.path} className='flex'>
|
||||
{links}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Container, ContainerEdit } from '@abearxiong/container';
|
||||
import { ContainerEdit } from '@abearxiong/container/edit';
|
||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { useParams } from 'react-router';
|
||||
import { query, useStore, ws } from '@/modules';
|
||||
@@ -118,6 +118,7 @@ export const Deck = () => {
|
||||
console.log('data', data);
|
||||
const { page, containerList } = data;
|
||||
const result = getContainerData({ page, containerList });
|
||||
console.log('result', result);
|
||||
deckPageStore.setPageData(result);
|
||||
init(result);
|
||||
}
|
||||
@@ -291,7 +292,7 @@ export const Deck = () => {
|
||||
Deck
|
||||
<Tooltip>
|
||||
<Button
|
||||
className='ml-4 hidden group-hover:block'
|
||||
className='ml-4 invisible group-hover:visible'
|
||||
icon={<SelectOutlined />}
|
||||
onClick={() => {
|
||||
deckPageStore.setShowEdit(true);
|
||||
@@ -337,7 +338,13 @@ export const Deck = () => {
|
||||
</Button.Group>
|
||||
</div>
|
||||
<div className='h-[200px]'>
|
||||
<TextArea className='h-[100px] rounded-md' value={code} />
|
||||
<TextArea
|
||||
className='h-[100px] rounded-md'
|
||||
value={code}
|
||||
onChange={(v) => {
|
||||
setCode(v);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user