From 3574f69723bdc1e636d6a942bd1248a7a7c99bd4 Mon Sep 17 00:00:00 2001 From: whyour Date: Sat, 15 May 2021 01:28:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95git=20push?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ build.yml | 2 +- src/pages/crontab/logModal.tsx | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ build.yml b/.github/workflows/ build.yml index 4e9737d8..c174ccf3 100644 --- a/.github/workflows/ build.yml +++ b/.github/workflows/ build.yml @@ -31,4 +31,4 @@ jobs: git config user.email "imwhyour@gmail.com" git add . git commit -m "copy static at $(date +'%Y-%m-%d %H:%M:%S')" - git push --force --quiet "https://whyour:${{ secrets.API_TOKEN }}@${GITHUB_REPO}.git" master:master \ No newline at end of file + git push --quiet "https://whyour:${{ secrets.API_TOKEN }}@${GITHUB_REPO}.git" master:master \ No newline at end of file diff --git a/src/pages/crontab/logModal.tsx b/src/pages/crontab/logModal.tsx index dc6800f9..a53a029c 100644 --- a/src/pages/crontab/logModal.tsx +++ b/src/pages/crontab/logModal.tsx @@ -44,8 +44,12 @@ const CronLogModal = ({ getCronLog(); }, 2000); } - if (log && log.includes('重启面板')) { - message.warning({ content: '系统将在5秒后刷新', duration: 5 }); + if ( + log && + log.includes('重启面板') && + cron.status === CrontabStatus.running + ) { + message.warning({ content: '系统将在5秒后自动刷新', duration: 5 }); setTimeout(() => { window.location.reload(); }, 5000);