From d3cc51e9901dc9b47b85ae868c31390208057d6d Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Thu, 12 May 2022 11:04:48 +0800 Subject: [PATCH] add expire (endTime) for custom mode task --- packages/helper/transRes.mjs | 1 + packages/web/src/pages/task/edit_custom.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/helper/transRes.mjs b/packages/helper/transRes.mjs index b4272c7..3d639df 100644 --- a/packages/helper/transRes.mjs +++ b/packages/helper/transRes.mjs @@ -123,6 +123,7 @@ Also, you can close our page, your task will keep running until ":"成功,将 "Please check the script!": "请检查脚本是否有错误!", "Custom script chars cannot > 5000": "自定义脚本字符数不能超过5000", "Task alias": "任务别名", + "Task expires on": "任务过期日期", // below is on script market page "Script Market": "脚本市场", "No Data": "没有数据", diff --git a/packages/web/src/pages/task/edit_custom.tsx b/packages/web/src/pages/task/edit_custom.tsx index f1d7494..1412681 100644 --- a/packages/web/src/pages/task/edit_custom.tsx +++ b/packages/web/src/pages/task/edit_custom.tsx @@ -175,9 +175,11 @@ Also, you can close our page, your task will keep running until `) + CronTime.to router && router.query.id && taskDetail._id ? <>
{t(`Current Task created at:`)}   {new Date(parseInt(taskDetail._id.substr(0,8), 16) * 1000).toLocaleString()} -    {t(`Running status`)}: { t(getTaskExpireStatusAndColor(taskDetail).status) } +    {t(`Task expires on`)}: { new Date(taskDetail.endTime).toLocaleString() } +
+
+ {t(`Running status`)}: { t(getTaskExpireStatusAndColor(taskDetail).status) }    {t(`Task alias`)}: { taskDetail.extra.alias } -
: null }