mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 14:56:07 +08:00
兼容Modal属性
This commit is contained in:
parent
6e56a55f6f
commit
518e8903a3
|
@ -72,7 +72,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ant-design/icons": "^4.7.0",
|
"@ant-design/icons": "^4.7.0",
|
||||||
"@ant-design/pro-layout": "^6.33.1",
|
"@ant-design/pro-layout": "^6.33.1",
|
||||||
"@monaco-editor/react": "^4.3.1",
|
"@monaco-editor/react": "4.2.1",
|
||||||
"@sentry/react": "^7.12.1",
|
"@sentry/react": "^7.12.1",
|
||||||
"@types/body-parser": "^1.19.2",
|
"@types/body-parser": "^1.19.2",
|
||||||
"@types/cors": "^2.8.12",
|
"@types/cors": "^2.8.12",
|
||||||
|
|
|
@ -326,10 +326,6 @@
|
||||||
background-color: #373739;
|
background-color: #373739;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-layout-sider {
|
|
||||||
border-right: 1px solid rgba(0, 0, 0, 0.06) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-pro-sider-logo {
|
.ant-pro-sider-logo {
|
||||||
padding: 16px 8px !important;
|
padding: 16px 8px !important;
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ export default function (props: any) {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!user) return;
|
if (!user || !user.username) return;
|
||||||
ws.current = new SockJS(
|
ws.current = new SockJS(
|
||||||
`${location.origin}/api/ws?token=${localStorage.getItem(config.authKey)}`,
|
`${location.origin}/api/ws?token=${localStorage.getItem(config.authKey)}`,
|
||||||
);
|
);
|
||||||
|
@ -146,9 +146,9 @@ export default function (props: any) {
|
||||||
const data = JSON.parse(e.data);
|
const data = JSON.parse(e.data);
|
||||||
if (data.type === 'ping') {
|
if (data.type === 'ping') {
|
||||||
if (data && data.message === 'hanhh') {
|
if (data && data.message === 'hanhh') {
|
||||||
console.log('websocket连接成功', e);
|
console.log('WS connection succeeded !!!');
|
||||||
} else {
|
} else {
|
||||||
console.log('websocket连接失败', e);
|
console.log('WS connection Failed !!!', e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setSocketMessage(data);
|
setSocketMessage(data);
|
||||||
|
@ -186,7 +186,8 @@ export default function (props: any) {
|
||||||
if (
|
if (
|
||||||
['/login', '/initialization', '/error'].includes(props.location.pathname)
|
['/login', '/initialization', '/error'].includes(props.location.pathname)
|
||||||
) {
|
) {
|
||||||
document.title = `${(config.documentTitleMap as any)[props.location.pathname]
|
document.title = `${
|
||||||
|
(config.documentTitleMap as any)[props.location.pathname]
|
||||||
} - 控制面板`;
|
} - 控制面板`;
|
||||||
if (
|
if (
|
||||||
systemInfo?.isInitialized &&
|
systemInfo?.isInitialized &&
|
||||||
|
|
|
@ -445,7 +445,7 @@ const CronDetailModal = ({
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
centered
|
centered
|
||||||
visible={visible}
|
open={visible}
|
||||||
forceRender
|
forceRender
|
||||||
footer={false}
|
footer={false}
|
||||||
onCancel={() => handleCancel()}
|
onCancel={() => handleCancel()}
|
||||||
|
|
|
@ -119,7 +119,7 @@ const CronLogModal = ({
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title={titleElement()}
|
title={titleElement()}
|
||||||
visible={visible}
|
open={visible}
|
||||||
centered
|
centered
|
||||||
className="log-modal"
|
className="log-modal"
|
||||||
bodyStyle={{
|
bodyStyle={{
|
||||||
|
|
|
@ -48,7 +48,7 @@ const CronModal = ({
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title={cron ? '编辑任务' : '新建任务'}
|
title={cron ? '编辑任务' : '新建任务'}
|
||||||
visible={visible}
|
open={visible}
|
||||||
forceRender
|
forceRender
|
||||||
centered
|
centered
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
@ -172,7 +172,7 @@ const CronLabelModal = ({
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title="批量修改标签"
|
title="批量修改标签"
|
||||||
visible={visible}
|
open={visible}
|
||||||
footer={buttons}
|
footer={buttons}
|
||||||
centered
|
centered
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
|
|
@ -138,7 +138,7 @@ const ViewCreateModal = ({
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title={view ? '编辑视图' : '新建视图'}
|
title={view ? '编辑视图' : '新建视图'}
|
||||||
visible={visible}
|
open={visible}
|
||||||
forceRender
|
forceRender
|
||||||
width={580}
|
width={580}
|
||||||
centered
|
centered
|
||||||
|
|
|
@ -212,7 +212,7 @@ const ViewManageModal = ({
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title="视图管理"
|
title="视图管理"
|
||||||
visible={visible}
|
open={visible}
|
||||||
centered
|
centered
|
||||||
width={620}
|
width={620}
|
||||||
onCancel={() => handleCancel()}
|
onCancel={() => handleCancel()}
|
||||||
|
|
|
@ -498,17 +498,24 @@ const Dependence = ({ headerStyle, isPhone, socketMessage }: any) => {
|
||||||
size="small"
|
size="small"
|
||||||
tabPosition="top"
|
tabPosition="top"
|
||||||
onChange={onTabChange}
|
onChange={onTabChange}
|
||||||
>
|
items={[
|
||||||
<Tabs.TabPane tab="NodeJs" key="nodejs">
|
{
|
||||||
{panelContent()}
|
key: 'nodejs',
|
||||||
</Tabs.TabPane>
|
label: 'NodeJs',
|
||||||
<Tabs.TabPane tab="Python3" key="python3">
|
children: panelContent(),
|
||||||
{panelContent()}
|
},
|
||||||
</Tabs.TabPane>
|
{
|
||||||
<Tabs.TabPane tab="Linux" key="linux">
|
key: 'python3',
|
||||||
{panelContent()}
|
label: 'Python3',
|
||||||
</Tabs.TabPane>
|
children: panelContent(),
|
||||||
</Tabs>
|
},
|
||||||
|
{
|
||||||
|
key: 'linux',
|
||||||
|
label: 'Linux',
|
||||||
|
children: panelContent(),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
<DependenceModal
|
<DependenceModal
|
||||||
visible={isModalVisible}
|
visible={isModalVisible}
|
||||||
handleCancel={handleCancel}
|
handleCancel={handleCancel}
|
||||||
|
|
|
@ -112,7 +112,7 @@ const DependenceLogModal = ({
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title={titleElement()}
|
title={titleElement()}
|
||||||
visible={visible}
|
open={visible}
|
||||||
centered
|
centered
|
||||||
className="log-modal"
|
className="log-modal"
|
||||||
bodyStyle={{
|
bodyStyle={{
|
||||||
|
|
|
@ -71,7 +71,7 @@ const DependenceModal = ({
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title={dependence ? '编辑依赖' : '新建依赖'}
|
title={dependence ? '编辑依赖' : '新建依赖'}
|
||||||
visible={visible}
|
open={visible}
|
||||||
forceRender
|
forceRender
|
||||||
centered
|
centered
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
|
2
src/pages/env/editNameModal.tsx
vendored
2
src/pages/env/editNameModal.tsx
vendored
|
@ -44,7 +44,7 @@ const EditNameModal = ({
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title="修改环境变量名称"
|
title="修改环境变量名称"
|
||||||
visible={visible}
|
open={visible}
|
||||||
forceRender
|
forceRender
|
||||||
centered
|
centered
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
|
2
src/pages/env/modal.tsx
vendored
2
src/pages/env/modal.tsx
vendored
|
@ -60,7 +60,7 @@ const EnvModal = ({
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title={env ? '编辑变量' : '新建变量'}
|
title={env ? '编辑变量' : '新建变量'}
|
||||||
visible={visible}
|
open={visible}
|
||||||
forceRender
|
forceRender
|
||||||
centered
|
centered
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
|
|
@ -214,7 +214,7 @@ const EditModal = ({
|
||||||
width={'100%'}
|
width={'100%'}
|
||||||
headerStyle={{ padding: '11px 24px' }}
|
headerStyle={{ padding: '11px 24px' }}
|
||||||
onClose={cancel}
|
onClose={cancel}
|
||||||
visible={visible}
|
open={visible}
|
||||||
>
|
>
|
||||||
<SplitPane
|
<SplitPane
|
||||||
split="vertical"
|
split="vertical"
|
||||||
|
|
|
@ -101,7 +101,7 @@ const EditScriptNameModal = ({
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title="新建"
|
title="新建"
|
||||||
visible={visible}
|
open={visible}
|
||||||
forceRender
|
forceRender
|
||||||
centered
|
centered
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
|
|
@ -41,7 +41,7 @@ const SaveModal = ({
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title="保存文件"
|
title="保存文件"
|
||||||
visible={visible}
|
open={visible}
|
||||||
forceRender
|
forceRender
|
||||||
centered
|
centered
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
|
|
@ -41,7 +41,7 @@ const SettingModal = ({
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title="运行设置"
|
title="运行设置"
|
||||||
visible={visible}
|
open={visible}
|
||||||
forceRender
|
forceRender
|
||||||
centered
|
centered
|
||||||
onCancel={() => handleCancel()}
|
onCancel={() => handleCancel()}
|
||||||
|
|
|
@ -46,7 +46,7 @@ const AppModal = ({
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title={app ? '编辑应用' : '新建应用'}
|
title={app ? '编辑应用' : '新建应用'}
|
||||||
visible={visible}
|
open={visible}
|
||||||
forceRender
|
forceRender
|
||||||
centered
|
centered
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
|
|
@ -333,11 +333,16 @@ const Setting = ({
|
||||||
size="small"
|
size="small"
|
||||||
tabPosition="top"
|
tabPosition="top"
|
||||||
onChange={tabChange}
|
onChange={tabChange}
|
||||||
>
|
items={[
|
||||||
<Tabs.TabPane tab="安全设置" key="security">
|
{
|
||||||
<SecuritySettings user={user} userChange={reloadUser} />
|
key: 'security',
|
||||||
</Tabs.TabPane>
|
label: '安全设置',
|
||||||
<Tabs.TabPane tab="应用设置" key="app">
|
children: <SecuritySettings user={user} userChange={reloadUser} />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'app',
|
||||||
|
label: '应用设置',
|
||||||
|
children: (
|
||||||
<Table
|
<Table
|
||||||
columns={columns}
|
columns={columns}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
|
@ -347,14 +352,22 @@ const Setting = ({
|
||||||
scroll={{ x: 768 }}
|
scroll={{ x: 768 }}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
/>
|
/>
|
||||||
</Tabs.TabPane>
|
),
|
||||||
<Tabs.TabPane tab="通知设置" key="notification">
|
},
|
||||||
<NotificationSetting data={notificationInfo} />
|
{
|
||||||
</Tabs.TabPane>
|
key: 'notification',
|
||||||
<Tabs.TabPane tab="登录日志" key="login">
|
label: '通知设置',
|
||||||
<LoginLog data={loginLogData} />
|
children: <NotificationSetting data={notificationInfo} />,
|
||||||
</Tabs.TabPane>
|
},
|
||||||
<Tabs.TabPane tab="其他设置" key="other">
|
{
|
||||||
|
key: 'login',
|
||||||
|
label: '登录日志',
|
||||||
|
children: <LoginLog data={loginLogData} />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'other',
|
||||||
|
label: '其他设置',
|
||||||
|
children: (
|
||||||
<Form layout="vertical" form={form}>
|
<Form layout="vertical" form={form}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="主题设置"
|
label="主题设置"
|
||||||
|
@ -392,11 +405,15 @@ const Setting = ({
|
||||||
<CheckUpdate socketMessage={socketMessage} />
|
<CheckUpdate socketMessage={socketMessage} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
</Tabs.TabPane>
|
),
|
||||||
<Tabs.TabPane tab="关于" key="about">
|
},
|
||||||
<About />
|
{
|
||||||
</Tabs.TabPane>
|
key: 'about',
|
||||||
</Tabs>
|
label: '关于',
|
||||||
|
children: <About />,
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
></Tabs>
|
||||||
<AppModal
|
<AppModal
|
||||||
visible={isModalVisible}
|
visible={isModalVisible}
|
||||||
handleCancel={handleCancel}
|
handleCancel={handleCancel}
|
||||||
|
|
|
@ -93,7 +93,7 @@ const SubscriptionLogModal = ({
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title={titleElement()}
|
title={titleElement()}
|
||||||
visible={visible}
|
open={visible}
|
||||||
centered
|
centered
|
||||||
className="log-modal"
|
className="log-modal"
|
||||||
bodyStyle={{
|
bodyStyle={{
|
||||||
|
|
|
@ -272,7 +272,7 @@ const SubscriptionModal = ({
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
visible={visible}
|
open={visible}
|
||||||
forceRender
|
forceRender
|
||||||
centered
|
centered
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user