From 012e55ebf87559f2d782e5400fb885df8b80a445 Mon Sep 17 00:00:00 2001 From: kytwb <412895+kytwb@users.noreply.github.com> Date: Fri, 23 Jul 2021 10:04:43 +0100 Subject: Fix hibernation mode (#1486) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use hibernation strategy from settings instead of hardcoded 5 minutes * Fix conditions with isHibernationEnabled, previously disableHibernation * Make service hibernation obey global setting Also refactors hibernation to move some hibernation enablement logic into the Service model * Remove global hibernation enable switch Implements option 4 from https://github.com/getferdi/ferdi/pull/1486#issuecomment-860290992 according to https://github.com/getferdi/ferdi/pull/1486#issuecomment-876558694 * Implements #865 : Add 'hibernate service' and 'wake up service' in the sidebar context menu. * Removed 'hibernationEnabled' check on main settings screen Since this is an (imo) incongruous behavior for the first time user. They will see a message, but with no ability to choose the hibernation strategy. * Autogenerated files from conflict fixes Co-authored-by: Kristóf Marussy Co-authored-by: Vijay A --- src/i18n/locales/defaultMessages.json | 34 ++++++++++++++++++++++++++++++---- src/i18n/locales/en-US.json | 2 ++ 2 files changed, 32 insertions(+), 4 deletions(-) (limited to 'src/i18n/locales') diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json index 0cedeb4cb..7d4a0fe06 100644 --- a/src/i18n/locales/defaultMessages.json +++ b/src/i18n/locales/defaultMessages.json @@ -1867,29 +1867,55 @@ } }, { - "defaultMessage": "!!!Delete Service", + "defaultMessage": "!!!Hibernate Service", "end": { "column": 3, "line": 55 }, "file": "src/components/services/tabs/TabItem.js", + "id": "tabs.item.hibernateService", + "start": { + "column": 20, + "line": 52 + } + }, + { + "defaultMessage": "!!!Wake Up Service", + "end": { + "column": 3, + "line": 59 + }, + "file": "src/components/services/tabs/TabItem.js", + "id": "tabs.item.wakeUpService", + "start": { + "column": 17, + "line": 56 + } + }, + { + "defaultMessage": "!!!Delete Service", + "end": { + "column": 3, + "line": 63 + }, + "file": "src/components/services/tabs/TabItem.js", "id": "tabs.item.deleteService", "start": { "column": 17, - "line": 52 + "line": 60 } }, { "defaultMessage": "!!!Do you really want to delete the {serviceName} service?", "end": { "column": 3, - "line": 59 + "line": 67 }, "file": "src/components/services/tabs/TabItem.js", "id": "tabs.item.confirmDeleteService", "start": { "column": 24, - "line": 56 + "line": 64 } } ], diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json index 5ff146ea5..76fc7cfc2 100644 --- a/src/i18n/locales/en-US.json +++ b/src/i18n/locales/en-US.json @@ -453,7 +453,9 @@ "tabs.item.enableAudio": "Enable audio", "tabs.item.enableNotification": "Enable notifications", "tabs.item.enableService": "Enable service", + "tabs.item.hibernateService": "Hibernate service", "tabs.item.reload": "Reload", + "tabs.item.wakeUpService": "Wake up service", "validation.email": "{field} is not valid", "validation.minLength": "{field} should be at least {length} characters long", "validation.oneRequired": "At least one is required", -- cgit v1.2.3-54-g00ecf