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
|
||||
mkdir -p ${diyscriptsdir}
|
||||
|
||||
urlTmp=${url%*/}
|
||||
repoTmp=${urlTmp##*/}
|
||||
repo=${repoTmp%.*}
|
||||
tmp=${url%/*}
|
||||
authorTmp1=${tmp##*/}
|
||||
authorTmp2=${authorTmp1##*:}
|
||||
author=${authorTmp2##*.}
|
||||
|
||||
if [ ! -d "$diyscriptsdir/${author}_${repo}" ]; then
|
||||
echo -e "${author}本地仓库不存在,从远程拉取ing..."
|
||||
repoTmp=${url##*/}
|
||||
repo=${repoTmp%.*}
|
||||
tmp=${url%/*}
|
||||
author=${tmp##*/}
|
||||
cd ${diyscriptsdir} && git clone $url ${author}_${repo}
|
||||
gitpullstatus=$?
|
||||
[ $gitpullstatus -eq 0 ] && echo -e "${author}本地仓库拉取完毕"
|
||||
|
|
|
@ -3,9 +3,6 @@ import { request } from '@/utils/http';
|
|||
import config from '@/utils/config';
|
||||
|
||||
export function render(oldRender: any) {
|
||||
if (history.location.pathname === '/login') {
|
||||
oldRender();
|
||||
}
|
||||
request
|
||||
.get(`${config.apiPrefix}user`)
|
||||
.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) => {
|
||||
const match = record.value.match(/pt_pin=([^; ]+)(?=;?)/);
|
||||
const val = (match && match[1]) || '未匹配用户名';
|
||||
return (
|
||||
<span style={{ cursor: 'text' }}>
|
||||
{decodeURIComponent(unescape(val))}
|
||||
</span>
|
||||
);
|
||||
return <span style={{ cursor: 'text' }}>{decodeUrl(val)}</span>;
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -226,17 +222,29 @@ const Config = () => {
|
|||
.finally(() => setLoading(false));
|
||||
};
|
||||
|
||||
const decodeUrl = (val: string) => {
|
||||
try {
|
||||
const newUrl = decodeURIComponent(val);
|
||||
return newUrl;
|
||||
} catch (error) {
|
||||
return val;
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (value && loading) {
|
||||
// asyncUpdateStatus();
|
||||
asyncUpdateStatus();
|
||||
}
|
||||
}, [value]);
|
||||
|
||||
const asyncUpdateStatus = async () => {
|
||||
for (let i = 0; i < value.length; i++) {
|
||||
const cookie = value[i];
|
||||
if (cookie.status === Status.已禁用) {
|
||||
continue;
|
||||
}
|
||||
await sleep(1000);
|
||||
refreshStatus(cookie, i);
|
||||
location.pathname === '/cookie' && refreshStatus(cookie, i);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
}
|
||||
|
||||
.logo {
|
||||
width: 40px;
|
||||
width: 30px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
export default {
|
||||
siteName: '脚本控制面板',
|
||||
siteName: '青龙控制面板',
|
||||
apiPrefix: '/api/',
|
||||
authKey: 'token',
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user