Merge remote-tracking branch 'upstream/master'

This commit is contained in:
周腾 2021-06-06 15:39:08 +08:00
commit ccfa6dfb70
5 changed files with 22 additions and 7 deletions

View File

@ -689,7 +689,7 @@ function pushPlusNotify(text, desp) {
topic: `${PUSH_PLUS_USER}`, topic: `${PUSH_PLUS_USER}`,
}; };
const options = { const options = {
url: `http://www.pushplus.plus/send`, url: `https://www.pushplus.plus/send`,
body: JSON.stringify(body), body: JSON.stringify(body),
headers: { headers: {
'Content-Type': ' application/json', 'Content-Type': ' application/json',

View File

@ -173,7 +173,7 @@ update_repo() {
fi fi
if [[ $exit_status -eq 0 ]]; then if [[ $exit_status -eq 0 ]]; then
echo -e "\n更新${repo_path}成功...\n" echo -e "\n更新${repo_path}成功...\n"
diff_scripts $repo_path $author $path $blackword $dependence diff_scripts "$repo_path" "$author" "$path" "$blackword" "$dependence"
else else
echo -e "\n更新${repo_path}失败,请检查原因...\n" echo -e "\n更新${repo_path}失败,请检查原因...\n"
fi fi
@ -205,6 +205,7 @@ update_raw() {
) )
cron_name=$(grep "new Env" $raw_file_name | awk -F "\(" '{print $2}' | awk -F "\)" '{print $1}' | sed 's:^.\(.*\).$:\1:' | head -1) cron_name=$(grep "new Env" $raw_file_name | awk -F "\(" '{print $2}' | awk -F "\)" '{print $1}' | sed 's:^.\(.*\).$:\1:' | head -1)
[[ -z $cron_name ]] && cron_name="$raw_file_name" [[ -z $cron_name ]] && cron_name="$raw_file_name"
[[ -z $cron_line ]] && cron_line=$(grep "cron:" $raw_file_name | awk -F ":" '{print $2}' | xargs)
[[ -z $cron_line ]] && cron_line="0 6 * * *" [[ -z $cron_line ]] && cron_line="0 6 * * *"
if [[ -z $cron_id ]]; then if [[ -z $cron_id ]]; then
result=$(add_cron_api "$cron_line:$cmd_task $filename:$cron_name") result=$(add_cron_api "$cron_line:$cmd_task $filename:$cron_name")
@ -314,7 +315,7 @@ diff_scripts() {
local blackword="$4" local blackword="$4"
local dependence="$5" local dependence="$5"
gen_list_repo $repo_path $author $path $blackword $dependence gen_list_repo "$repo_path" "$author" "$path" "$blackword" "$dependence"
local repo="${repo_path##*/}" local repo="${repo_path##*/}"
local list_add="$dir_list_tmp/${repo}_add.list" local list_add="$dir_list_tmp/${repo}_add.list"
@ -351,10 +352,10 @@ gen_list_repo() {
cd ${repo_path} cd ${repo_path}
files=$(find . -name "*.js" | sed 's/^..//') files=$(find . -name "*.js" | sed 's/^..//')
if [[ $path ]]; then if [[ $path ]]; then
files=$(find . -name "*.js" | sed 's/^..//' | egrep $path) files=$(echo "$files" | egrep $path)
fi fi
if [[ $blackword ]]; then if [[ $blackword ]]; then
files=$(find . -name "*.js" | sed 's/^..//' | egrep -v $blackword | egrep $path) files=$(echo "$files" | egrep -v $blackword)
fi fi
if [[ $dependence ]]; then if [[ $dependence ]]; then
find . -name "*.js" | sed 's/^..//' | egrep $dependence | xargs -i cp {} $dir_scripts find . -name "*.js" | sed 's/^..//' | egrep $dependence | xargs -i cp {} $dir_scripts

View File

@ -14,6 +14,7 @@ import 'codemirror/mode/shell/shell.js';
import { request } from '@/utils/http'; import { request } from '@/utils/http';
import './index.less'; import './index.less';
import vhCheck from 'vh-check'; import vhCheck from 'vh-check';
import { version, changeLog } from '../version';
export default function (props: any) { export default function (props: any) {
const logout = () => { const logout = () => {
@ -63,7 +64,16 @@ export default function (props: any) {
return ( return (
<ProLayout <ProLayout
selectedKeys={[props.location.pathname]} selectedKeys={[props.location.pathname]}
title="控制面板" title={
<>
<a href={changeLog} target="_blank" rel="noopener noreferrer">
<span style={{ fontSize: 9, color: '#666', marginLeft: 5 }}>
{version}
</span>
</a>
</>
}
menuItemRender={(menuItemProps: any, defaultDom: any) => { menuItemRender={(menuItemProps: any, defaultDom: any) => {
if ( if (
menuItemProps.isUrl || menuItemProps.isUrl ||

View File

@ -100,7 +100,9 @@ const CronLogModal = ({
onCancel={() => cancel()} onCancel={() => cancel()}
> >
{!loading && value && ( {!loading && value && (
<pre style={{ whiteSpace: 'break-spaces' }}>{value}</pre> <pre style={{ whiteSpace: 'break-spaces', lineHeight: '17px' }}>
{value}
</pre>
)} )}
</Modal> </Modal>
); );

2
src/version.ts Normal file
View File

@ -0,0 +1,2 @@
export const version = 'v2.0.0-111';
export const changeLog = 'https://t.me/jiaolongwang/101';