mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-07 03:46:07 +08:00
修改系统 reload 分支
This commit is contained in:
parent
7a8a8ab9b3
commit
47d2fc24bc
|
@ -235,14 +235,14 @@ reload_qinglong() {
|
|||
|
||||
local reload_target="${1}"
|
||||
local primary_branch="master"
|
||||
if [[ "${QL_BRANCH}" == "develop" ]]; then
|
||||
primary_branch="develop"
|
||||
if [[ "${QL_BRANCH}" == "develop" ]] || [[ "${QL_BRANCH}" == "debian" ]] || [[ "${QL_BRANCH}" == "debian-dev" ]]; then
|
||||
primary_branch="${QL_BRANCH}"
|
||||
fi
|
||||
|
||||
if [[ "$reload_target" == 'system' ]]; then
|
||||
cp -rf ${dir_tmp}/qinglong-${primary_branch}/* ${dir_root}/
|
||||
mv -f ${dir_tmp}/qinglong-${primary_branch}/* ${dir_root}/
|
||||
rm -rf $dir_static/*
|
||||
cp -rf ${dir_tmp}/qinglong-static-${primary_branch}/* ${dir_static}/
|
||||
mv -f ${dir_tmp}/qinglong-static-${primary_branch}/* ${dir_static}/
|
||||
cp -f $file_config_sample $dir_config/config.sample.sh
|
||||
fi
|
||||
|
||||
|
@ -314,9 +314,9 @@ check_update_dep() {
|
|||
if [[ "$needRestart" == 'true' ]]; then
|
||||
delete_pm2
|
||||
|
||||
cp -rf ${dir_tmp}/qinglong-${primary_branch}/* ${dir_root}/
|
||||
mv -f ${dir_tmp}/qinglong-${primary_branch}/* ${dir_root}/
|
||||
rm -rf $dir_static/*
|
||||
cp -rf ${dir_tmp}/qinglong-static-${primary_branch}/* ${dir_static}/
|
||||
mv -f ${dir_tmp}/qinglong-static-${primary_branch}/* ${dir_static}/
|
||||
cp -f $file_config_sample $dir_config/config.sample.sh
|
||||
|
||||
reload_pm2
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { disableBody } from '@/utils';
|
||||
import config from '@/utils/config';
|
||||
import { request } from '@/utils/http';
|
||||
import WebSocketManager from '@/utils/websocket';
|
||||
|
@ -132,6 +133,7 @@ const CheckUpdate = ({ systemInfo }: any) => {
|
|||
),
|
||||
duration: 30,
|
||||
});
|
||||
disableBody();
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 30000);
|
||||
|
|
|
@ -22,6 +22,7 @@ import { UploadOutlined } from '@ant-design/icons';
|
|||
import Countdown from 'antd/lib/statistic/Countdown';
|
||||
import useProgress from './progress';
|
||||
import pick from 'lodash/pick';
|
||||
import { disableBody } from '@/utils';
|
||||
|
||||
const dataMap = {
|
||||
'log-remove-frequency': 'logRemoveFrequency',
|
||||
|
@ -157,6 +158,7 @@ const Other = ({
|
|||
),
|
||||
duration: 30,
|
||||
});
|
||||
disableBody();
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 30000);
|
||||
|
|
|
@ -154,9 +154,9 @@ export default function browserType() {
|
|||
shell === 'none'
|
||||
? {}
|
||||
: {
|
||||
shell, // wechat qq uc 360 2345 sougou liebao maxthon
|
||||
shellVs,
|
||||
},
|
||||
shell, // wechat qq uc 360 2345 sougou liebao maxthon
|
||||
shellVs,
|
||||
},
|
||||
);
|
||||
|
||||
console.log(
|
||||
|
@ -335,20 +335,23 @@ export function parseCrontab(schedule: string): Date | null {
|
|||
if (time) {
|
||||
return time.next().toDate();
|
||||
}
|
||||
} catch (error) { }
|
||||
} catch (error) {}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export function getCrontabsNextDate(schedule: string, extra_schedules: string[]): Date | null {
|
||||
let date = parseCrontab(schedule)
|
||||
export function getCrontabsNextDate(
|
||||
schedule: string,
|
||||
extra_schedules: string[],
|
||||
): Date | null {
|
||||
let date = parseCrontab(schedule);
|
||||
if (extra_schedules?.length) {
|
||||
extra_schedules.forEach(x => {
|
||||
const _date = parseCrontab(x)
|
||||
extra_schedules.forEach((x) => {
|
||||
const _date = parseCrontab(x);
|
||||
if (_date && (!date || _date < date)) {
|
||||
date = _date;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
return date;
|
||||
}
|
||||
|
@ -362,4 +365,23 @@ export function getExtension(filename: string) {
|
|||
export function getEditorMode(filename: string) {
|
||||
const extension = getExtension(filename) as keyof typeof LANG_MAP;
|
||||
return LANG_MAP[extension];
|
||||
}
|
||||
}
|
||||
|
||||
export function disableBody() {
|
||||
const overlay = document.createElement('div');
|
||||
overlay.style.position = 'fixed';
|
||||
overlay.style.top = '0px';
|
||||
overlay.style.left = '0px';
|
||||
overlay.style.width = '100%';
|
||||
overlay.style.height = '100%';
|
||||
overlay.style.backgroundColor = 'transparent';
|
||||
overlay.style.zIndex = '9999';
|
||||
document.body.appendChild(overlay);
|
||||
|
||||
overlay.addEventListener('click', function (event) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
document.body.style.overflow = 'hidden';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user