mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 17:54:32 +08:00
git_pull 重构,样式优化
This commit is contained in:
+10
-1
@@ -8,7 +8,7 @@ body {
|
||||
|
||||
.code-mirror-wrapper .CodeMirror {
|
||||
position: absolute;
|
||||
height: calc(100% - 24px);
|
||||
height: calc(100% - 48px);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -19,5 +19,14 @@ body {
|
||||
overflow: auto;
|
||||
height: calc(100vh - 96px);
|
||||
background-color: #fff;
|
||||
padding: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.ant-pro-grid-content.wide {
|
||||
.ant-pro-page-container-children-content {
|
||||
height: calc(100vh - 144px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
-2
@@ -39,11 +39,19 @@ export default function (props: any) {
|
||||
const theme = localStorage.getItem('qinglong_dark_theme') || 'auto';
|
||||
setFetchMethod(window.fetch);
|
||||
if (theme === 'dark') {
|
||||
enableDarkMode({ darkSchemeTextColor: '#fff' });
|
||||
enableDarkMode({
|
||||
brightness: 100,
|
||||
contrast: 90,
|
||||
sepia: 10,
|
||||
});
|
||||
} else if (theme === 'light') {
|
||||
disableDarkMode();
|
||||
} else {
|
||||
followSystemColorScheme({ darkSchemeTextColor: '#fff' });
|
||||
followSystemColorScheme({
|
||||
brightness: 100,
|
||||
contrast: 90,
|
||||
sepia: 10,
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ const Crontab = () => {
|
||||
request
|
||||
.get(`${config.apiPrefix}config/shareCode`)
|
||||
.then((data) => {
|
||||
setValue(data.content);
|
||||
setValue(data.data);
|
||||
})
|
||||
.finally(() => setLoading(false));
|
||||
};
|
||||
|
||||
@@ -4,7 +4,6 @@ import config from '@/utils/config';
|
||||
import { PageContainer } from '@ant-design/pro-layout';
|
||||
import { Controlled as CodeMirror } from 'react-codemirror2';
|
||||
import { request } from '@/utils/http';
|
||||
import QRCode from 'qrcode.react';
|
||||
|
||||
const Config = () => {
|
||||
const [width, setWdith] = useState('100%');
|
||||
@@ -18,7 +17,7 @@ const Config = () => {
|
||||
request
|
||||
.get(`${config.apiPrefix}config/config`)
|
||||
.then((data) => {
|
||||
setValue(data.content);
|
||||
setValue(data.data);
|
||||
})
|
||||
.finally(() => setLoading(false));
|
||||
};
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
import React, { PureComponent, Fragment, useState, useEffect } from 'react';
|
||||
import { Button, notification, Modal, Table, Tag, Space } from 'antd';
|
||||
import {
|
||||
Button,
|
||||
notification,
|
||||
Modal,
|
||||
Table,
|
||||
Tag,
|
||||
Space,
|
||||
Typography,
|
||||
} from 'antd';
|
||||
import { EditOutlined, DeleteOutlined } from '@ant-design/icons';
|
||||
import config from '@/utils/config';
|
||||
import { PageContainer } from '@ant-design/pro-layout';
|
||||
@@ -7,6 +15,8 @@ import { request } from '@/utils/http';
|
||||
import QRCode from 'qrcode.react';
|
||||
import CookieModal from './modal';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
enum Status {
|
||||
'正常',
|
||||
'失效',
|
||||
@@ -197,7 +207,11 @@ const Config = () => {
|
||||
const deleteCookie = (record: any, index: number) => {
|
||||
Modal.confirm({
|
||||
title: '确认删除',
|
||||
content: `确认删除Cookie ${record.cookie} 吗`,
|
||||
content: (
|
||||
<>
|
||||
确认删除Cookie <Text type="warning">{record.cookie}</Text> 吗
|
||||
</>
|
||||
),
|
||||
onOk() {
|
||||
request
|
||||
.delete(`${config.apiPrefix}cookie`, {
|
||||
@@ -270,7 +284,11 @@ const Config = () => {
|
||||
>
|
||||
<Table
|
||||
columns={columns}
|
||||
pagination={{ hideOnSinglePage: true }}
|
||||
pagination={{
|
||||
hideOnSinglePage: true,
|
||||
showSizeChanger: true,
|
||||
defaultPageSize: 20,
|
||||
}}
|
||||
dataSource={value}
|
||||
rowKey="pin"
|
||||
size="middle"
|
||||
|
||||
@@ -16,7 +16,7 @@ const Crontab = () => {
|
||||
|
||||
const getConfig = () => {
|
||||
request.get(`${config.apiPrefix}config/config`).then((data) => {
|
||||
setValue(data.content);
|
||||
setValue(data.data);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -25,7 +25,7 @@ const Crontab = () => {
|
||||
request
|
||||
.get(`${config.apiPrefix}config/sample`)
|
||||
.then((data) => {
|
||||
setSample(data.content);
|
||||
setSample(data.data);
|
||||
})
|
||||
.finally(() => setLoading(false));
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ const Crontab = () => {
|
||||
request
|
||||
.get(`${config.apiPrefix}config/diy`)
|
||||
.then((data) => {
|
||||
setValue(data.content);
|
||||
setValue(data.data);
|
||||
})
|
||||
.finally(() => setLoading(false));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user