From a2459501b48c1bcade0dfb537005bba9d7969a10 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Sat, 13 Jan 2024 13:46:19 +0100 Subject: [PATCH] feat: add warning in browser for ical cfg --- .../config/form-cfgs/timeline-form.const.ts | 13 +++++++++++++ src/app/t.const.ts | 1 + src/assets/i18n/en.json | 1 + 3 files changed, 15 insertions(+) diff --git a/src/app/features/config/form-cfgs/timeline-form.const.ts b/src/app/features/config/form-cfgs/timeline-form.const.ts index 41c2e1c062b..0c25e2fed2c 100644 --- a/src/app/features/config/form-cfgs/timeline-form.const.ts +++ b/src/app/features/config/form-cfgs/timeline-form.const.ts @@ -1,6 +1,7 @@ import { ConfigFormSection, TimelineConfig } from '../global-config.model'; import { T } from '../../../t.const'; import { isValidSplitTime } from '../../../util/is-valid-split-time'; +import { IS_ELECTRON } from '../../../app.constants'; export const TIMELINE_FORM_CFG: ConfigFormSection = { title: T.GCF.TIMELINE.TITLE, @@ -61,6 +62,18 @@ export const TIMELINE_FORM_CFG: ConfigFormSection = { text: T.GCF.TIMELINE.CAL_PROVIDERS_INFO, }, }, + ...(!IS_ELECTRON + ? [ + { + type: 'tpl', + className: 'tpl', + templateOptions: { + tag: 'p', + text: T.GCF.TIMELINE.BROWSER_WARNING, + }, + }, + ] + : []), { key: 'calendarProviders', type: 'repeat', diff --git a/src/app/t.const.ts b/src/app/t.const.ts index 3d725f18948..25eef6c4008 100644 --- a/src/app/t.const.ts +++ b/src/app/t.const.ts @@ -1435,6 +1435,7 @@ const T = { TITLE: 'GCF.TAKE_A_BREAK.TITLE', }, TIMELINE: { + BROWSER_WARNING: 'GCF.TIMELINE.BROWSER_WARNING', CAL_PROVIDERS: 'GCF.TIMELINE.CAL_PROVIDERS', CAL_PROVIDERS_ADD: 'GCF.TIMELINE.CAL_PROVIDERS_ADD', CAL_PROVIDERS_INFO: 'GCF.TIMELINE.CAL_PROVIDERS_INFO', diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index f053dbef42e..f1711430775 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -1409,6 +1409,7 @@ "TITLE": "Break Reminder" }, "TIMELINE": { + "BROWSER_WARNING": "This will likely NOT work with the Browser version of Super Productivity.
Please download the desktop version to use this feature!
", "CAL_PROVIDERS": "Calendar providers (experimental and optional)", "CAL_PROVIDERS_ADD": "Add ical source", "CAL_PROVIDERS_INFO": "You can optionally configure the timeline to also load and display data from iCal (e.g. Google Calendar, Outlook 365).",