mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修改内容基础样式
This commit is contained in:
parent
90fd845169
commit
3fa5956051
|
@ -8,7 +8,7 @@ body {
|
||||||
|
|
||||||
.code-mirror-wrapper .CodeMirror {
|
.code-mirror-wrapper .CodeMirror {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: calc(100% - 48px);
|
height: calc(100% - 64px);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ body {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
height: calc(100vh - 96px);
|
height: calc(100vh - 96px);
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 24px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { Button, notification, Input, Form, Radio, Tabs } from 'antd';
|
import { Button, Input, Form, Radio, Tabs } from 'antd';
|
||||||
import config from '@/utils/config';
|
import config from '@/utils/config';
|
||||||
import { PageContainer } from '@ant-design/pro-layout';
|
import { PageContainer } from '@ant-design/pro-layout';
|
||||||
import { request } from '@/utils/http';
|
import { request } from '@/utils/http';
|
||||||
|
@ -28,7 +28,7 @@ const Password = () => {
|
||||||
|
|
||||||
const handleOk = (values: any) => {
|
const handleOk = (values: any) => {
|
||||||
request
|
request
|
||||||
.post(`${config.apiPrefix}user?t=${Date.now()}`, {
|
.post(`${config.apiPrefix}user`, {
|
||||||
data: {
|
data: {
|
||||||
username: values.username,
|
username: values.username,
|
||||||
password: values.password,
|
password: values.password,
|
||||||
|
@ -48,6 +48,12 @@ const Password = () => {
|
||||||
localStorage.setItem('qinglong_dark_theme', e.target.value);
|
localStorage.setItem('qinglong_dark_theme', e.target.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const importJob = () => {
|
||||||
|
request.get(`${config.apiPrefix}crons/import`).then((data: any) => {
|
||||||
|
console.log(data);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (document.body.clientWidth < 768) {
|
if (document.body.clientWidth < 768) {
|
||||||
setWdith('auto');
|
setWdith('auto');
|
||||||
|
@ -63,11 +69,19 @@ const Password = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setFetchMethod(window.fetch);
|
setFetchMethod(window.fetch);
|
||||||
if (theme === 'dark') {
|
if (theme === 'dark') {
|
||||||
enableDarkMode({ darkSchemeTextColor: '#fff' });
|
enableDarkMode({
|
||||||
|
brightness: 100,
|
||||||
|
contrast: 90,
|
||||||
|
sepia: 10,
|
||||||
|
});
|
||||||
} else if (theme === 'light') {
|
} else if (theme === 'light') {
|
||||||
disableDarkMode();
|
disableDarkMode();
|
||||||
} else {
|
} else {
|
||||||
followSystemColorScheme({ darkSchemeTextColor: '#fff' });
|
followSystemColorScheme({
|
||||||
|
brightness: 100,
|
||||||
|
contrast: 90,
|
||||||
|
sepia: 10,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}, [theme]);
|
}, [theme]);
|
||||||
|
|
||||||
|
@ -94,7 +108,7 @@ const Password = () => {
|
||||||
<Tabs
|
<Tabs
|
||||||
defaultActiveKey="person"
|
defaultActiveKey="person"
|
||||||
tabPosition="left"
|
tabPosition="left"
|
||||||
style={{ padding: '16px 16px 16px 0', height: 'calc(100vh - 96px)' }}
|
style={{ height: 'calc(100vh - 128px)' }}
|
||||||
>
|
>
|
||||||
<Tabs.TabPane tab="个人设置" key="person">
|
<Tabs.TabPane tab="个人设置" key="person">
|
||||||
<Form onFinish={handleOk} layout="vertical">
|
<Form onFinish={handleOk} layout="vertical">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user