Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pluralize units in dayjs.add
  • Loading branch information
greyscaled authored Jun 10, 2022
commit 69974e378187eff18dcc8b3284a32547dd2e9b56
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,10 @@ export const ttlShutdownAt = (now: dayjs.Dayjs, workspace: Workspace, tz: string
} else if (formTTL === 0) {
return Language.ttlCausesNoShutdownHelperText
} else {
const newDeadline = dayjs(hasDeadline ? deadline : now).add(delta, "hour")
const newDeadline = dayjs(hasDeadline ? deadline : now).add(delta, "hours")
if (newDeadline.isSameOrBefore(now)) {
return `⚠️ ${Language.ttlCausesShutdownHelperText} ${Language.ttlCausesShutdownImmediately} ⚠️`
} else if (newDeadline.isSameOrBefore(now.add(30, "minute"))) {
} else if (newDeadline.isSameOrBefore(now.add(30, "minutes"))) {
return `⚠️ ${Language.ttlCausesShutdownHelperText} ${Language.ttlCausesShutdownSoon} ⚠️`
} else {
return `${Language.ttlCausesShutdownHelperText} ${Language.ttlCausesShutdownAt} ${newDeadline
Expand Down