diff --git a/sample/notify.js b/sample/notify.js index b16cb60f..1f5adcb1 100644 --- a/sample/notify.js +++ b/sample/notify.js @@ -689,7 +689,7 @@ function pushPlusNotify(text, desp) { topic: `${PUSH_PLUS_USER}`, }; const options = { - url: `http://www.pushplus.plus/send`, + url: `https://www.pushplus.plus/send`, body: JSON.stringify(body), headers: { 'Content-Type': ' application/json', diff --git a/shell/update.sh b/shell/update.sh index 5eba4e96..64301d4c 100755 --- a/shell/update.sh +++ b/shell/update.sh @@ -173,7 +173,7 @@ update_repo() { fi if [[ $exit_status -eq 0 ]]; then echo -e "\n更新${repo_path}成功...\n" - diff_scripts $repo_path $author $path $blackword $dependence + diff_scripts "$repo_path" "$author" "$path" "$blackword" "$dependence" else echo -e "\n更新${repo_path}失败,请检查原因...\n" 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) [[ -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 * * *" if [[ -z $cron_id ]]; then result=$(add_cron_api "$cron_line:$cmd_task $filename:$cron_name") @@ -314,7 +315,7 @@ diff_scripts() { local blackword="$4" 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 list_add="$dir_list_tmp/${repo}_add.list" @@ -351,10 +352,10 @@ gen_list_repo() { cd ${repo_path} files=$(find . -name "*.js" | sed 's/^..//') if [[ $path ]]; then - files=$(find . -name "*.js" | sed 's/^..//' | egrep $path) + files=$(echo "$files" | egrep $path) fi if [[ $blackword ]]; then - files=$(find . -name "*.js" | sed 's/^..//' | egrep -v $blackword | egrep $path) + files=$(echo "$files" | egrep -v $blackword) fi if [[ $dependence ]]; then find . -name "*.js" | sed 's/^..//' | egrep $dependence | xargs -i cp {} $dir_scripts diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index c855ba92..a8853dd1 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -14,6 +14,7 @@ import 'codemirror/mode/shell/shell.js'; import { request } from '@/utils/http'; import './index.less'; import vhCheck from 'vh-check'; +import { version, changeLog } from '../version'; export default function (props: any) { const logout = () => { @@ -63,7 +64,16 @@ export default function (props: any) { return ( + 控制面板 + + + {version} + + + + } menuItemRender={(menuItemProps: any, defaultDom: any) => { if ( menuItemProps.isUrl || diff --git a/src/pages/crontab/logModal.tsx b/src/pages/crontab/logModal.tsx index 3632a148..a6fa3117 100644 --- a/src/pages/crontab/logModal.tsx +++ b/src/pages/crontab/logModal.tsx @@ -100,7 +100,9 @@ const CronLogModal = ({ onCancel={() => cancel()} > {!loading && value && ( -
{value}
+
+          {value}
+        
)} ); diff --git a/src/version.ts b/src/version.ts new file mode 100644 index 00000000..6c551271 --- /dev/null +++ b/src/version.ts @@ -0,0 +1,2 @@ +export const version = 'v2.0.0-111'; +export const changeLog = 'https://t.me/jiaolongwang/101';