Skip to content

Commit

Permalink
feat: add warning in browser for ical cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesjo committed Jan 13, 2024
1 parent 9adc538 commit a245950
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/app/features/config/form-cfgs/timeline-form.const.ts
Original file line number Diff line number Diff line change
@@ -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<TimelineConfig> = {
title: T.GCF.TIMELINE.TITLE,
Expand Down Expand Up @@ -61,6 +62,18 @@ export const TIMELINE_FORM_CFG: ConfigFormSection<TimelineConfig> = {
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',
Expand Down
1 change: 1 addition & 0 deletions src/app/t.const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,7 @@
"TITLE": "Break Reminder"
},
"TIMELINE": {
"BROWSER_WARNING": "<b>This will likely NOT work with the Browser version of Super Productivity.<br /> Please <a href=\"https://super-productivity.com/download/\">download the desktop version</a> to use this feature!</b>",
"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. <a href=\"https://support.google.com/calendar/answer/37648?hl=en#zippy=%2Csync-your-google-calendar-view-edit%2Cget-your-calendar-view-only\">Google Calendar</a>, <a href=\"https://support.pushpay.com/s/article/How-do-I-get-an-iCal-link-from-Office-365\">Outlook 365</a>).",
Expand Down

0 comments on commit a245950

Please sign in to comment.