Skip to content

Commit d3cc51e

Browse files
committed
add expire (endTime) for custom mode task
1 parent f88525f commit d3cc51e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/helper/transRes.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ Also, you can close our page, your task will keep running until ":"成功,将
123123
"Please check the script!": "请检查脚本是否有错误!",
124124
"Custom script chars cannot > 5000": "自定义脚本字符数不能超过5000",
125125
"Task alias": "任务别名",
126+
"Task expires on": "任务过期日期",
126127
// below is on script market page
127128
"Script Market": "脚本市场",
128129
"No Data": "没有数据",

packages/web/src/pages/task/edit_custom.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,11 @@ Also, you can close our page, your task will keep running until `) + CronTime.to
175175
router && router.query.id && taskDetail._id ? <>
176176
<div style={{margin: `.5em auto`}}>
177177
{t(`Current Task created at:`)} &nbsp; {new Date(parseInt(taskDetail._id.substr(0,8), 16) * 1000).toLocaleString()}
178-
&nbsp;&nbsp; {t(`Running status`)}: { t(getTaskExpireStatusAndColor(taskDetail).status) }
178+
&nbsp;&nbsp; {t(`Task expires on`)}: { new Date(taskDetail.endTime).toLocaleString() }
179+
</div>
180+
<div style={{margin: `.5em auto`}}>
181+
{t(`Running status`)}: { t(getTaskExpireStatusAndColor(taskDetail).status) }
179182
&nbsp;&nbsp; {t(`Task alias`)}: { taskDetail.extra.alias }
180-
181183
</div>
182184
</> : null
183185
}

0 commit comments

Comments
 (0)