mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 14:56:07 +08:00
修复diy命令,decodeURI参数,更换logo
This commit is contained in:
parent
ac5e2e404e
commit
2645716d49
|
@ -29,12 +29,16 @@ fi
|
||||||
diyscriptsdir=/ql/diyscripts
|
diyscriptsdir=/ql/diyscripts
|
||||||
mkdir -p ${diyscriptsdir}
|
mkdir -p ${diyscriptsdir}
|
||||||
|
|
||||||
|
urlTmp=${url%*/}
|
||||||
|
repoTmp=${urlTmp##*/}
|
||||||
|
repo=${repoTmp%.*}
|
||||||
|
tmp=${url%/*}
|
||||||
|
authorTmp1=${tmp##*/}
|
||||||
|
authorTmp2=${authorTmp1##*:}
|
||||||
|
author=${authorTmp2##*.}
|
||||||
|
|
||||||
if [ ! -d "$diyscriptsdir/${author}_${repo}" ]; then
|
if [ ! -d "$diyscriptsdir/${author}_${repo}" ]; then
|
||||||
echo -e "${author}本地仓库不存在,从远程拉取ing..."
|
echo -e "${author}本地仓库不存在,从远程拉取ing..."
|
||||||
repoTmp=${url##*/}
|
|
||||||
repo=${repoTmp%.*}
|
|
||||||
tmp=${url%/*}
|
|
||||||
author=${tmp##*/}
|
|
||||||
cd ${diyscriptsdir} && git clone $url ${author}_${repo}
|
cd ${diyscriptsdir} && git clone $url ${author}_${repo}
|
||||||
gitpullstatus=$?
|
gitpullstatus=$?
|
||||||
[ $gitpullstatus -eq 0 ] && echo -e "${author}本地仓库拉取完毕"
|
[ $gitpullstatus -eq 0 ] && echo -e "${author}本地仓库拉取完毕"
|
||||||
|
|
|
@ -3,9 +3,6 @@ import { request } from '@/utils/http';
|
||||||
import config from '@/utils/config';
|
import config from '@/utils/config';
|
||||||
|
|
||||||
export function render(oldRender: any) {
|
export function render(oldRender: any) {
|
||||||
if (history.location.pathname === '/login') {
|
|
||||||
oldRender();
|
|
||||||
}
|
|
||||||
request
|
request
|
||||||
.get(`${config.apiPrefix}user`)
|
.get(`${config.apiPrefix}user`)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 64 KiB |
|
@ -113,11 +113,7 @@ const Config = () => {
|
||||||
render: (text: string, record: any) => {
|
render: (text: string, record: any) => {
|
||||||
const match = record.value.match(/pt_pin=([^; ]+)(?=;?)/);
|
const match = record.value.match(/pt_pin=([^; ]+)(?=;?)/);
|
||||||
const val = (match && match[1]) || '未匹配用户名';
|
const val = (match && match[1]) || '未匹配用户名';
|
||||||
return (
|
return <span style={{ cursor: 'text' }}>{decodeUrl(val)}</span>;
|
||||||
<span style={{ cursor: 'text' }}>
|
|
||||||
{decodeURIComponent(unescape(val))}
|
|
||||||
</span>
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -226,17 +222,29 @@ const Config = () => {
|
||||||
.finally(() => setLoading(false));
|
.finally(() => setLoading(false));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const decodeUrl = (val: string) => {
|
||||||
|
try {
|
||||||
|
const newUrl = decodeURIComponent(val);
|
||||||
|
return newUrl;
|
||||||
|
} catch (error) {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (value && loading) {
|
if (value && loading) {
|
||||||
// asyncUpdateStatus();
|
asyncUpdateStatus();
|
||||||
}
|
}
|
||||||
}, [value]);
|
}, [value]);
|
||||||
|
|
||||||
const asyncUpdateStatus = async () => {
|
const asyncUpdateStatus = async () => {
|
||||||
for (let i = 0; i < value.length; i++) {
|
for (let i = 0; i < value.length; i++) {
|
||||||
const cookie = value[i];
|
const cookie = value[i];
|
||||||
|
if (cookie.status === Status.已禁用) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
await sleep(1000);
|
await sleep(1000);
|
||||||
refreshStatus(cookie, i);
|
location.pathname === '/cookie' && refreshStatus(cookie, i);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
width: 40px;
|
width: 30px;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export default {
|
export default {
|
||||||
siteName: '脚本控制面板',
|
siteName: '青龙控制面板',
|
||||||
apiPrefix: '/api/',
|
apiPrefix: '/api/',
|
||||||
authKey: 'token',
|
authKey: 'token',
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user