From ae5a605136b664af599ce2310d429c800f234e08 Mon Sep 17 00:00:00 2001 From: DoctorDalek1963 Date: Fri, 7 Mar 2025 00:25:57 +0000 Subject: [PATCH] all: add thirty minute option for disable protection --- client/src/actions/index.tsx | 4 ++++ client/src/components/Dashboard/index.tsx | 4 ++++ client/src/helpers/constants.ts | 1 + 3 files changed, 9 insertions(+) diff --git a/client/src/actions/index.tsx b/client/src/actions/index.tsx index d122e2159a5..cf7489f6afa 100644 --- a/client/src/actions/index.tsx +++ b/client/src/actions/index.tsx @@ -129,6 +129,10 @@ const getDisabledMessage = (time: any) => { return i18next.t('disable_notify_for_minutes', { count: msToMinutes(DISABLE_PROTECTION_TIMINGS.TEN_MINUTES), }); + case DISABLE_PROTECTION_TIMINGS.THIRTY_MINUTES: + return i18next.t('disable_notify_for_minutes', { + count: msToMinutes(DISABLE_PROTECTION_TIMINGS.THIRTY_MINUTES), + }); case DISABLE_PROTECTION_TIMINGS.HOUR: return i18next.t('disable_notify_for_hours', { count: msToHours(DISABLE_PROTECTION_TIMINGS.HOUR) }); case DISABLE_PROTECTION_TIMINGS.TOMORROW: diff --git a/client/src/components/Dashboard/index.tsx b/client/src/components/Dashboard/index.tsx index e7d39ae6457..628d5a741ad 100644 --- a/client/src/components/Dashboard/index.tsx +++ b/client/src/components/Dashboard/index.tsx @@ -104,6 +104,10 @@ const Dashboard = ({ text: t('disable_for_minutes', { count: msToMinutes(DISABLE_PROTECTION_TIMINGS.TEN_MINUTES) }), disableTime: DISABLE_PROTECTION_TIMINGS.TEN_MINUTES, }, + { + text: t('disable_for_minutes', { count: msToMinutes(DISABLE_PROTECTION_TIMINGS.THIRTY_MINUTES) }), + disableTime: DISABLE_PROTECTION_TIMINGS.THIRTY_MINUTES, + }, { text: t('disable_for_hours', { count: msToHours(DISABLE_PROTECTION_TIMINGS.HOUR) }), disableTime: DISABLE_PROTECTION_TIMINGS.HOUR, diff --git a/client/src/helpers/constants.ts b/client/src/helpers/constants.ts index 7b54ae8d738..3f7d8daf76d 100644 --- a/client/src/helpers/constants.ts +++ b/client/src/helpers/constants.ts @@ -509,6 +509,7 @@ export const DISABLE_PROTECTION_TIMINGS = { HALF_MINUTE: 30 * 1000, MINUTE: 60 * 1000, TEN_MINUTES: 10 * 60 * 1000, + THIRTY_MINUTES: 30 * 60 * 1000, HOUR: 60 * 60 * 1000, TOMORROW: 24 * 60 * 60 * 1000, };