diff options
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 38 | ||||
-rw-r--r-- | src/config.js | 14 | ||||
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 36 | ||||
-rw-r--r-- | src/features/todos/components/TodosWebview.js | 27 | ||||
-rw-r--r-- | src/i18n/locales/defaultMessages.json | 27 | ||||
-rw-r--r-- | src/i18n/locales/en-US.json | 7 | ||||
-rw-r--r-- | src/i18n/locales/whitelist_en-US.json | 3 | ||||
-rw-r--r-- | src/i18n/messages/src/containers/settings/EditSettingsScreen.json | 17 | ||||
-rw-r--r-- | src/i18n/messages/src/features/todos/components/TodosWebview.json | 12 | ||||
-rw-r--r-- | src/stores/SettingsStore.js | 19 |
10 files changed, 155 insertions, 45 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index 5478ce8bf..f76378a3e 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -156,6 +156,7 @@ export default @observer class EditSettingsForm extends Component { | |||
156 | cacheSize: PropTypes.string.isRequired, | 156 | cacheSize: PropTypes.string.isRequired, |
157 | isSpellcheckerIncludedInCurrentPlan: PropTypes.bool.isRequired, | 157 | isSpellcheckerIncludedInCurrentPlan: PropTypes.bool.isRequired, |
158 | isTodosEnabled: PropTypes.bool.isRequired, | 158 | isTodosEnabled: PropTypes.bool.isRequired, |
159 | isTodosActivated: PropTypes.bool.isRequired, | ||
159 | isWorkspaceEnabled: PropTypes.bool.isRequired, | 160 | isWorkspaceEnabled: PropTypes.bool.isRequired, |
160 | noUpdates: PropTypes.bool.isRequired, | 161 | noUpdates: PropTypes.bool.isRequired, |
161 | hibernationEnabled: PropTypes.bool.isRequired, | 162 | hibernationEnabled: PropTypes.bool.isRequired, |
@@ -201,6 +202,7 @@ export default @observer class EditSettingsForm extends Component { | |||
201 | isDarkmodeEnabled, | 202 | isDarkmodeEnabled, |
202 | isTrayEnabled, | 203 | isTrayEnabled, |
203 | openProcessManager, | 204 | openProcessManager, |
205 | isTodosActivated, | ||
204 | } = this.props; | 206 | } = this.props; |
205 | const { intl } = this.context; | 207 | const { intl } = this.context; |
206 | 208 | ||
@@ -275,22 +277,32 @@ export default @observer class EditSettingsForm extends Component { | |||
275 | {isTodosEnabled && ( | 277 | {isTodosEnabled && ( |
276 | <> | 278 | <> |
277 | <Toggle field={form.$('enableTodos')} /> | 279 | <Toggle field={form.$('enableTodos')} /> |
278 | <Input | 280 | {isTodosActivated && ( |
279 | placeholder="Todo Server" | 281 | <div> |
280 | onChange={e => this.submit(e)} | 282 | <Select field={form.$('predefinedTodoServer')} /> |
281 | field={form.$('todoServer')} | 283 | {form.$('predefinedTodoServer').value === 'isUsingCustomTodoService' && ( |
282 | /> | 284 | <div> |
283 | <p | 285 | <Input |
284 | className="settings__message" | 286 | placeholder="Todo Server" |
285 | style={{ | 287 | onChange={e => this.submit(e)} |
286 | borderTop: 0, marginTop: 0, paddingTop: 0, marginBottom: '2rem', | 288 | field={form.$('customTodoServer')} |
287 | }} | 289 | /> |
288 | > | 290 | <p |
289 | { intl.formatMessage(messages.todoServerInfo) } | 291 | className="settings__message" |
290 | </p> | 292 | style={{ |
293 | borderTop: 0, marginTop: 0, paddingTop: 0, marginBottom: '2rem', | ||
294 | }} | ||
295 | > | ||
296 | { intl.formatMessage(messages.todoServerInfo) } | ||
297 | </p> | ||
298 | </div> | ||
299 | )} | ||
300 | </div> | ||
301 | )} | ||
291 | </> | 302 | </> |
292 | )} | 303 | )} |
293 | 304 | ||
305 | |||
294 | <Hr /> | 306 | <Hr /> |
295 | 307 | ||
296 | <Toggle field={form.$('lockingFeatureEnabled')} /> | 308 | <Toggle field={form.$('lockingFeatureEnabled')} /> |
diff --git a/src/config.js b/src/config.js index af304232e..f617555df 100644 --- a/src/config.js +++ b/src/config.js | |||
@@ -51,6 +51,18 @@ export const NAVIGATION_BAR_BEHAVIOURS = { | |||
51 | never: 'Never show navigation bar', | 51 | never: 'Never show navigation bar', |
52 | }; | 52 | }; |
53 | 53 | ||
54 | export const TODO_APPS = { | ||
55 | 'https://todoist.com/app': 'Todoist', | ||
56 | 'https://app.franztodos.com': 'Franz Todo', | ||
57 | 'https://ticktick.com/signin': 'TickTick', | ||
58 | 'https://todo.microsoft.com/?app#': 'Microsoft To Do', | ||
59 | 'https://habitica.com/login': 'Habitica', | ||
60 | 'https://app.nozbe.com/#login': 'Nozbe', | ||
61 | 'https://www.rememberthemilk.com/login/': 'Remember The Milk', | ||
62 | 'https://desktop.any.do/': 'Any.do', | ||
63 | isUsingCustomTodoService: 'Other service', | ||
64 | }; | ||
65 | |||
54 | export const SIDEBAR_WIDTH = { | 66 | export const SIDEBAR_WIDTH = { |
55 | 35: 'Extemely slim sidebar', | 67 | 35: 'Extemely slim sidebar', |
56 | 45: 'Very slim sidebar', | 68 | 45: 'Very slim sidebar', |
@@ -95,7 +107,7 @@ export const DEFAULT_APP_SETTINGS = { | |||
95 | 107 | ||
96 | // Ferdi specific options | 108 | // Ferdi specific options |
97 | server: LIVE_API, | 109 | server: LIVE_API, |
98 | todoServer: PRODUCTION_TODOS_FRONTEND_URL, | 110 | predefinedTodoServer: 'https://app.franztodos.com', |
99 | autohideMenuBar: false, | 111 | autohideMenuBar: false, |
100 | lockingFeatureEnabled: false, | 112 | lockingFeatureEnabled: false, |
101 | locked: false, | 113 | locked: false, |
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index be251aa8b..64303e54f 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -11,7 +11,7 @@ import TodosStore from '../../features/todos/store'; | |||
11 | import Form from '../../lib/Form'; | 11 | import Form from '../../lib/Form'; |
12 | import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; | 12 | import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; |
13 | import { | 13 | import { |
14 | DEFAULT_APP_SETTINGS, HIBERNATION_STRATEGIES, SIDEBAR_WIDTH, ICON_SIZES, NAVIGATION_BAR_BEHAVIOURS, | 14 | DEFAULT_APP_SETTINGS, HIBERNATION_STRATEGIES, SIDEBAR_WIDTH, ICON_SIZES, NAVIGATION_BAR_BEHAVIOURS, TODO_APPS, |
15 | } from '../../config'; | 15 | } from '../../config'; |
16 | import { config as spellcheckerConfig } from '../../features/spellchecker'; | 16 | import { config as spellcheckerConfig } from '../../features/spellchecker'; |
17 | 17 | ||
@@ -20,8 +20,6 @@ import { getSelectOptions } from '../../helpers/i18n-helpers'; | |||
20 | import EditSettingsForm from '../../components/settings/settings/EditSettingsForm'; | 20 | import EditSettingsForm from '../../components/settings/settings/EditSettingsForm'; |
21 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 21 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
22 | 22 | ||
23 | import { TODOS_FRONTEND } from '../../environment'; | ||
24 | |||
25 | import globalMessages from '../../i18n/globalMessages'; | 23 | import globalMessages from '../../i18n/globalMessages'; |
26 | import { DEFAULT_IS_FEATURE_ENABLED_BY_USER } from '../../features/todos'; | 24 | import { DEFAULT_IS_FEATURE_ENABLED_BY_USER } from '../../features/todos'; |
27 | import WorkspacesStore from '../../features/workspaces/store'; | 25 | import WorkspacesStore from '../../features/workspaces/store'; |
@@ -76,10 +74,14 @@ const messages = defineMessages({ | |||
76 | id: 'settings.app.form.hibernationStrategy', | 74 | id: 'settings.app.form.hibernationStrategy', |
77 | defaultMessage: '!!!Hibernation strategy', | 75 | defaultMessage: '!!!Hibernation strategy', |
78 | }, | 76 | }, |
79 | todoServer: { | 77 | predefinedTodoServer: { |
80 | id: 'settings.app.form.todoServer', | 78 | id: 'settings.app.form.predefinedTodoServer', |
81 | defaultMessage: '!!!Todo Server', | 79 | defaultMessage: '!!!Todo Server', |
82 | }, | 80 | }, |
81 | customTodoServer: { | ||
82 | id: 'settings.app.form.customTodoServer', | ||
83 | defaultMessage: '!!!Custom TodoServer', | ||
84 | }, | ||
83 | enableLock: { | 85 | enableLock: { |
84 | id: 'settings.app.form.enableLock', | 86 | id: 'settings.app.form.enableLock', |
85 | defaultMessage: '!!!Enable Password Lock', | 87 | defaultMessage: '!!!Enable Password Lock', |
@@ -203,7 +205,8 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
203 | sentry: settingsData.sentry, | 205 | sentry: settingsData.sentry, |
204 | hibernate: settingsData.hibernate, | 206 | hibernate: settingsData.hibernate, |
205 | hibernationStrategy: settingsData.hibernationStrategy, | 207 | hibernationStrategy: settingsData.hibernationStrategy, |
206 | todoServer: settingsData.todoServer, | 208 | predefinedTodoServer: settingsData.predefinedTodoServer, |
209 | customTodoServer: settingsData.customTodoServer, | ||
207 | lockingFeatureEnabled: settingsData.lockingFeatureEnabled, | 210 | lockingFeatureEnabled: settingsData.lockingFeatureEnabled, |
208 | lockedPassword: settingsData.lockedPassword, | 211 | lockedPassword: settingsData.lockedPassword, |
209 | useTouchIdToUnlock: settingsData.useTouchIdToUnlock, | 212 | useTouchIdToUnlock: settingsData.useTouchIdToUnlock, |
@@ -275,6 +278,11 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
275 | sort: false, | 278 | sort: false, |
276 | }); | 279 | }); |
277 | 280 | ||
281 | const todoApp = getSelectOptions({ | ||
282 | locales: TODO_APPS, | ||
283 | sort: false, | ||
284 | }); | ||
285 | |||
278 | const sidebarWidth = getSelectOptions({ | 286 | const sidebarWidth = getSelectOptions({ |
279 | locales: SIDEBAR_WIDTH, | 287 | locales: SIDEBAR_WIDTH, |
280 | sort: false, | 288 | sort: false, |
@@ -354,10 +362,16 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
354 | options: hibernationStrategies, | 362 | options: hibernationStrategies, |
355 | default: DEFAULT_APP_SETTINGS.hibernationStrategy, | 363 | default: DEFAULT_APP_SETTINGS.hibernationStrategy, |
356 | }, | 364 | }, |
357 | todoServer: { | 365 | predefinedTodoServer: { |
358 | label: intl.formatMessage(messages.todoServer), | 366 | label: intl.formatMessage(messages.predefinedTodoServer), |
359 | value: settings.all.app.todoServer, | 367 | value: settings.all.app.predefinedTodoServer, |
360 | default: TODOS_FRONTEND, | 368 | default: DEFAULT_APP_SETTINGS.predefinedTodoServer, |
369 | options: todoApp, | ||
370 | }, | ||
371 | customTodoServer: { | ||
372 | label: intl.formatMessage(messages.customTodoServer), | ||
373 | value: settings.all.app.customTodoServer, | ||
374 | default: DEFAULT_APP_SETTINGS.customTodoServer, | ||
361 | }, | 375 | }, |
362 | lockingFeatureEnabled: { | 376 | lockingFeatureEnabled: { |
363 | label: intl.formatMessage(messages.enableLock), | 377 | label: intl.formatMessage(messages.enableLock), |
@@ -537,6 +551,8 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
537 | isDarkmodeEnabled={this.props.stores.settings.app.darkMode} | 551 | isDarkmodeEnabled={this.props.stores.settings.app.darkMode} |
538 | isTrayEnabled={this.props.stores.settings.app.enableSystemTray} | 552 | isTrayEnabled={this.props.stores.settings.app.enableSystemTray} |
539 | isAdaptableDarkModeEnabled={this.props.stores.settings.app.adaptableDarkMode} | 553 | isAdaptableDarkModeEnabled={this.props.stores.settings.app.adaptableDarkMode} |
554 | isTodosActivated={this.props.stores.todos.isFeatureEnabledByUser} | ||
555 | isUsingCustomTodoService={this.props.stores.todos.isUsingCustomTodoService} | ||
540 | openProcessManager={() => this.openProcessManager()} | 556 | openProcessManager={() => this.openProcessManager()} |
541 | /> | 557 | /> |
542 | </ErrorBoundary> | 558 | </ErrorBoundary> |
diff --git a/src/features/todos/components/TodosWebview.js b/src/features/todos/components/TodosWebview.js index e9b1963f7..2626186e9 100644 --- a/src/features/todos/components/TodosWebview.js +++ b/src/features/todos/components/TodosWebview.js | |||
@@ -9,10 +9,20 @@ import { defineMessages, intlShape } from 'react-intl'; | |||
9 | import { mdiCheckAll } from '@mdi/js'; | 9 | import { mdiCheckAll } from '@mdi/js'; |
10 | import SettingsStore from '../../../stores/SettingsStore'; | 10 | import SettingsStore from '../../../stores/SettingsStore'; |
11 | 11 | ||
12 | import * as environment from '../../../environment'; | ||
13 | import Appear from '../../../components/ui/effects/Appear'; | 12 | import Appear from '../../../components/ui/effects/Appear'; |
14 | import UpgradeButton from '../../../components/ui/UpgradeButton'; | 13 | import UpgradeButton from '../../../components/ui/UpgradeButton'; |
15 | 14 | ||
15 | // NOTE: https://stackoverflow.com/questions/5717093/check-if-a-javascript-string-is-a-url | ||
16 | function validURL(str) { | ||
17 | const pattern = new RegExp('^(https?:\\/\\/)?' // protocol | ||
18 | + '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' // domain name | ||
19 | + '((\\d{1,3}\\.){3}\\d{1,3}))' // OR ip (v4) address | ||
20 | + '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' // port and path | ||
21 | + '(\\?[;&a-z\\d%_.~+=-]*)?' // query string | ||
22 | + '(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator | ||
23 | return !!pattern.test(str); | ||
24 | } | ||
25 | |||
16 | const messages = defineMessages({ | 26 | const messages = defineMessages({ |
17 | premiumInfo: { | 27 | premiumInfo: { |
18 | id: 'feature.todos.premium.info', | 28 | id: 'feature.todos.premium.info', |
@@ -194,6 +204,16 @@ class TodosWebview extends Component { | |||
194 | 204 | ||
195 | const { intl } = this.context; | 205 | const { intl } = this.context; |
196 | 206 | ||
207 | const isUsingPredefinedTodoServer = stores.settings.all.app.predefinedTodoServer !== 'isUsingCustomTodoService'; | ||
208 | const todoUrl = isUsingPredefinedTodoServer | ||
209 | ? stores.settings.all.app.predefinedTodoServer | ||
210 | : stores.settings.all.app.customTodoServer; | ||
211 | let isTodoUrlValid = true; | ||
212 | if (isUsingPredefinedTodoServer === false) { | ||
213 | isTodoUrlValid = validURL(todoUrl); | ||
214 | } | ||
215 | |||
216 | |||
197 | return ( | 217 | return ( |
198 | <div | 218 | <div |
199 | className={classes.root} | 219 | className={classes.root} |
@@ -213,6 +233,8 @@ class TodosWebview extends Component { | |||
213 | /> | 233 | /> |
214 | )} | 234 | )} |
215 | {isTodosIncludedInCurrentPlan ? ( | 235 | {isTodosIncludedInCurrentPlan ? ( |
236 | isTodoUrlValid | ||
237 | && ( | ||
216 | <Webview | 238 | <Webview |
217 | className={classes.webview} | 239 | className={classes.webview} |
218 | onDidAttach={() => { | 240 | onDidAttach={() => { |
@@ -223,8 +245,9 @@ class TodosWebview extends Component { | |||
223 | partition="persist:todos" | 245 | partition="persist:todos" |
224 | preload="./features/todos/preload.js" | 246 | preload="./features/todos/preload.js" |
225 | ref={(webview) => { this.webview = webview ? webview.view : null; }} | 247 | ref={(webview) => { this.webview = webview ? webview.view : null; }} |
226 | src={stores.settings.all.app.todoServer || environment.TODOS_FRONTEND} | 248 | src={todoUrl} |
227 | /> | 249 | /> |
250 | ) | ||
228 | ) : ( | 251 | ) : ( |
229 | <Appear> | 252 | <Appear> |
230 | <div className={classes.premiumContainer}> | 253 | <div className={classes.premiumContainer}> |
diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json index a5c83d7ab..906172221 100644 --- a/src/i18n/locales/defaultMessages.json +++ b/src/i18n/locales/defaultMessages.json | |||
@@ -4342,7 +4342,20 @@ | |||
4342 | "line": 82 | 4342 | "line": 82 |
4343 | }, | 4343 | }, |
4344 | "file": "src/containers/settings/EditSettingsScreen.js", | 4344 | "file": "src/containers/settings/EditSettingsScreen.js", |
4345 | "id": "settings.app.form.todoServer", | 4345 | "id": "settings.app.form.predefinedTodoServer", |
4346 | "start": { | ||
4347 | "column": 14, | ||
4348 | "line": 79 | ||
4349 | } | ||
4350 | }, | ||
4351 | { | ||
4352 | "defaultMessage": "!!!Custom Todo Server", | ||
4353 | "end": { | ||
4354 | "column": 3, | ||
4355 | "line": 82 | ||
4356 | }, | ||
4357 | "file": "src/containers/settings/EditSettingsScreen.js", | ||
4358 | "id": "settings.app.form.customTodoServer", | ||
4346 | "start": { | 4359 | "start": { |
4347 | "column": 14, | 4360 | "column": 14, |
4348 | "line": 79 | 4361 | "line": 79 |
@@ -5449,39 +5462,39 @@ | |||
5449 | "defaultMessage": "!!!Franz Todos are available to premium users now!", | 5462 | "defaultMessage": "!!!Franz Todos are available to premium users now!", |
5450 | "end": { | 5463 | "end": { |
5451 | "column": 3, | 5464 | "column": 3, |
5452 | "line": 20 | 5465 | "line": 30 |
5453 | }, | 5466 | }, |
5454 | "file": "src/features/todos/components/TodosWebview.js", | 5467 | "file": "src/features/todos/components/TodosWebview.js", |
5455 | "id": "feature.todos.premium.info", | 5468 | "id": "feature.todos.premium.info", |
5456 | "start": { | 5469 | "start": { |
5457 | "column": 15, | 5470 | "column": 15, |
5458 | "line": 17 | 5471 | "line": 27 |
5459 | } | 5472 | } |
5460 | }, | 5473 | }, |
5461 | { | 5474 | { |
5462 | "defaultMessage": "!!!Upgrade Account", | 5475 | "defaultMessage": "!!!Upgrade Account", |
5463 | "end": { | 5476 | "end": { |
5464 | "column": 3, | 5477 | "column": 3, |
5465 | "line": 24 | 5478 | "line": 34 |
5466 | }, | 5479 | }, |
5467 | "file": "src/features/todos/components/TodosWebview.js", | 5480 | "file": "src/features/todos/components/TodosWebview.js", |
5468 | "id": "feature.todos.premium.upgrade", | 5481 | "id": "feature.todos.premium.upgrade", |
5469 | "start": { | 5482 | "start": { |
5470 | "column": 14, | 5483 | "column": 14, |
5471 | "line": 21 | 5484 | "line": 31 |
5472 | } | 5485 | } |
5473 | }, | 5486 | }, |
5474 | { | 5487 | { |
5475 | "defaultMessage": "!!!Everyone else will have to wait a little longer.", | 5488 | "defaultMessage": "!!!Everyone else will have to wait a little longer.", |
5476 | "end": { | 5489 | "end": { |
5477 | "column": 3, | 5490 | "column": 3, |
5478 | "line": 28 | 5491 | "line": 38 |
5479 | }, | 5492 | }, |
5480 | "file": "src/features/todos/components/TodosWebview.js", | 5493 | "file": "src/features/todos/components/TodosWebview.js", |
5481 | "id": "feature.todos.premium.rollout", | 5494 | "id": "feature.todos.premium.rollout", |
5482 | "start": { | 5495 | "start": { |
5483 | "column": 15, | 5496 | "column": 15, |
5484 | "line": 25 | 5497 | "line": 35 |
5485 | } | 5498 | } |
5486 | } | 5499 | } |
5487 | ], | 5500 | ], |
diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json index 0762e855f..3306febe1 100644 --- a/src/i18n/locales/en-US.json +++ b/src/i18n/locales/en-US.json | |||
@@ -277,6 +277,7 @@ | |||
277 | "settings.app.form.autoLaunchInBackground": "Open in background", | 277 | "settings.app.form.autoLaunchInBackground": "Open in background", |
278 | "settings.app.form.autoLaunchOnStart": "Launch Ferdi on start", | 278 | "settings.app.form.autoLaunchOnStart": "Launch Ferdi on start", |
279 | "settings.app.form.beta": "Include beta versions", | 279 | "settings.app.form.beta": "Include beta versions", |
280 | "settings.app.form.customTodoServer": "Custom Todo Server", | ||
280 | "settings.app.form.darkMode": "Enable dark mode", | 281 | "settings.app.form.darkMode": "Enable dark mode", |
281 | "settings.app.form.enableGPUAcceleration": "Enable GPU Acceleration", | 282 | "settings.app.form.enableGPUAcceleration": "Enable GPU Acceleration", |
282 | "settings.app.form.enableLock": "Enable Password Lock", | 283 | "settings.app.form.enableLock": "Enable Password Lock", |
@@ -293,6 +294,7 @@ | |||
293 | "settings.app.form.minimizeToSystemTray": "Minimize Ferdi to system tray", | 294 | "settings.app.form.minimizeToSystemTray": "Minimize Ferdi to system tray", |
294 | "settings.app.form.navigationBarBehaviour": "Navigation bar behaviour", | 295 | "settings.app.form.navigationBarBehaviour": "Navigation bar behaviour", |
295 | "settings.app.form.noUpdates": "Disable updates", | 296 | "settings.app.form.noUpdates": "Disable updates", |
297 | "settings.app.form.predefinedTodoServer": "Todo Server", | ||
296 | "settings.app.form.privateNotifications": "Don't show message content in notifications", | 298 | "settings.app.form.privateNotifications": "Don't show message content in notifications", |
297 | "settings.app.form.reloadAfterResume": "Reload Ferdi after system resume", | 299 | "settings.app.form.reloadAfterResume": "Reload Ferdi after system resume", |
298 | "settings.app.form.runInBackground": "Keep Ferdi in background when closing the window", | 300 | "settings.app.form.runInBackground": "Keep Ferdi in background when closing the window", |
@@ -304,7 +306,6 @@ | |||
304 | "settings.app.form.showDisabledServices": "Display disabled services tabs", | 306 | "settings.app.form.showDisabledServices": "Display disabled services tabs", |
305 | "settings.app.form.showMessagesBadgesWhenMuted": "Show unread message badge when notifications are disabled", | 307 | "settings.app.form.showMessagesBadgesWhenMuted": "Show unread message badge when notifications are disabled", |
306 | "settings.app.form.startMinimized": "Start minimized in tray", | 308 | "settings.app.form.startMinimized": "Start minimized in tray", |
307 | "settings.app.form.todoServer": "Todo Server", | ||
308 | "settings.app.form.universalDarkMode": "Enable universal Dark Mode", | 309 | "settings.app.form.universalDarkMode": "Enable universal Dark Mode", |
309 | "settings.app.form.useTouchIdToUnlock": "Allow using TouchID to unlock Ferdi", | 310 | "settings.app.form.useTouchIdToUnlock": "Allow using TouchID to unlock Ferdi", |
310 | "settings.app.headline": "Settings", | 311 | "settings.app.headline": "Settings", |
@@ -324,7 +325,7 @@ | |||
324 | "settings.app.scheduledDNDTimeInfo": "Times in 24-Hour-Format. End time can be before start time (e.g. start 17:00, end 09:00) to enable Do-not-Disturb overnight.", | 325 | "settings.app.scheduledDNDTimeInfo": "Times in 24-Hour-Format. End time can be before start time (e.g. start 17:00, end 09:00) to enable Do-not-Disturb overnight.", |
325 | "settings.app.sentryInfo": "Sending telemetry data allows us to find errors in Ferdi - we will not send any personal information like your message data! Changing this option requires you to restart Ferdi.", | 326 | "settings.app.sentryInfo": "Sending telemetry data allows us to find errors in Ferdi - we will not send any personal information like your message data! Changing this option requires you to restart Ferdi.", |
326 | "settings.app.subheadlineCache": "Cache", | 327 | "settings.app.subheadlineCache": "Cache", |
327 | "settings.app.todoServerInfo": "This server will be used for the \"Ferdi Todo\" feature. (default: https://app.franztodos.com)", | 328 | "settings.app.todoServerInfo": "This server will be used for the \"Ferdi Todo\" feature.", |
328 | "settings.app.translationHelp": "Help us to translate Ferdi into your language.", | 329 | "settings.app.translationHelp": "Help us to translate Ferdi into your language.", |
329 | "settings.app.universalDarkModeInfo": "Universal Dark Mode tries to dynamically generate dark mode styles for services that are otherwise not currently supported.", | 330 | "settings.app.universalDarkModeInfo": "Universal Dark Mode tries to dynamically generate dark mode styles for services that are otherwise not currently supported.", |
330 | "settings.app.updateStatusAvailable": "Update available, downloading...", | 331 | "settings.app.updateStatusAvailable": "Update available, downloading...", |
@@ -510,4 +511,4 @@ | |||
510 | "workspaceDrawer.workspaceFeatureInfo": "<p>Ferdi Workspaces let you focus on what’s important right now. Set up different sets of services and easily switch between them at any time.</p><p>You decide which services you need when and where, so we can help you stay on top of your game - or easily switch off from work whenever you want.</p>", | 511 | "workspaceDrawer.workspaceFeatureInfo": "<p>Ferdi Workspaces let you focus on what’s important right now. Set up different sets of services and easily switch between them at any time.</p><p>You decide which services you need when and where, so we can help you stay on top of your game - or easily switch off from work whenever you want.</p>", |
511 | "workspaceDrawer.workspacesSettingsTooltip": "Edit workspaces settings", | 512 | "workspaceDrawer.workspacesSettingsTooltip": "Edit workspaces settings", |
512 | "workspaces.switchingIndicator.switchingTo": "Switching to" | 513 | "workspaces.switchingIndicator.switchingTo": "Switching to" |
513 | } | 514 | } \ No newline at end of file |
diff --git a/src/i18n/locales/whitelist_en-US.json b/src/i18n/locales/whitelist_en-US.json index fe51488c7..32960f8ce 100644 --- a/src/i18n/locales/whitelist_en-US.json +++ b/src/i18n/locales/whitelist_en-US.json | |||
@@ -1 +1,2 @@ | |||
1 | [] | 1 | [ |
2 | ] \ No newline at end of file | ||
diff --git a/src/i18n/messages/src/containers/settings/EditSettingsScreen.json b/src/i18n/messages/src/containers/settings/EditSettingsScreen.json index 6777a0d83..4293c93b4 100644 --- a/src/i18n/messages/src/containers/settings/EditSettingsScreen.json +++ b/src/i18n/messages/src/containers/settings/EditSettingsScreen.json | |||
@@ -156,7 +156,7 @@ | |||
156 | } | 156 | } |
157 | }, | 157 | }, |
158 | { | 158 | { |
159 | "id": "settings.app.form.todoServer", | 159 | "id": "settings.app.form.predefinedTodoServer", |
160 | "defaultMessage": "!!!Todo Server", | 160 | "defaultMessage": "!!!Todo Server", |
161 | "file": "src/containers/settings/EditSettingsScreen.js", | 161 | "file": "src/containers/settings/EditSettingsScreen.js", |
162 | "start": { | 162 | "start": { |
@@ -169,6 +169,19 @@ | |||
169 | } | 169 | } |
170 | }, | 170 | }, |
171 | { | 171 | { |
172 | "id": "settings.app.form.customTodoServer", | ||
173 | "defaultMessage": "!!!Custom Todo Server", | ||
174 | "file": "src/containers/settings/EditSettingsScreen.js", | ||
175 | "start": { | ||
176 | "line": 79, | ||
177 | "column": 14 | ||
178 | }, | ||
179 | "end": { | ||
180 | "line": 82, | ||
181 | "column": 3 | ||
182 | } | ||
183 | }, | ||
184 | { | ||
172 | "id": "settings.app.form.enableLock", | 185 | "id": "settings.app.form.enableLock", |
173 | "defaultMessage": "!!!Enable Password Lock", | 186 | "defaultMessage": "!!!Enable Password Lock", |
174 | "file": "src/containers/settings/EditSettingsScreen.js", | 187 | "file": "src/containers/settings/EditSettingsScreen.js", |
@@ -454,4 +467,4 @@ | |||
454 | "column": 3 | 467 | "column": 3 |
455 | } | 468 | } |
456 | } | 469 | } |
457 | ] \ No newline at end of file | 470 | ] |
diff --git a/src/i18n/messages/src/features/todos/components/TodosWebview.json b/src/i18n/messages/src/features/todos/components/TodosWebview.json index 19ea81171..173389570 100644 --- a/src/i18n/messages/src/features/todos/components/TodosWebview.json +++ b/src/i18n/messages/src/features/todos/components/TodosWebview.json | |||
@@ -4,11 +4,11 @@ | |||
4 | "defaultMessage": "!!!Franz Todos are available to premium users now!", | 4 | "defaultMessage": "!!!Franz Todos are available to premium users now!", |
5 | "file": "src/features/todos/components/TodosWebview.js", | 5 | "file": "src/features/todos/components/TodosWebview.js", |
6 | "start": { | 6 | "start": { |
7 | "line": 17, | 7 | "line": 27, |
8 | "column": 15 | 8 | "column": 15 |
9 | }, | 9 | }, |
10 | "end": { | 10 | "end": { |
11 | "line": 20, | 11 | "line": 30, |
12 | "column": 3 | 12 | "column": 3 |
13 | } | 13 | } |
14 | }, | 14 | }, |
@@ -17,11 +17,11 @@ | |||
17 | "defaultMessage": "!!!Upgrade Account", | 17 | "defaultMessage": "!!!Upgrade Account", |
18 | "file": "src/features/todos/components/TodosWebview.js", | 18 | "file": "src/features/todos/components/TodosWebview.js", |
19 | "start": { | 19 | "start": { |
20 | "line": 21, | 20 | "line": 31, |
21 | "column": 14 | 21 | "column": 14 |
22 | }, | 22 | }, |
23 | "end": { | 23 | "end": { |
24 | "line": 24, | 24 | "line": 34, |
25 | "column": 3 | 25 | "column": 3 |
26 | } | 26 | } |
27 | }, | 27 | }, |
@@ -30,11 +30,11 @@ | |||
30 | "defaultMessage": "!!!Everyone else will have to wait a little longer.", | 30 | "defaultMessage": "!!!Everyone else will have to wait a little longer.", |
31 | "file": "src/features/todos/components/TodosWebview.js", | 31 | "file": "src/features/todos/components/TodosWebview.js", |
32 | "start": { | 32 | "start": { |
33 | "line": 25, | 33 | "line": 35, |
34 | "column": 15 | 34 | "column": 15 |
35 | }, | 35 | }, |
36 | "end": { | 36 | "end": { |
37 | "line": 28, | 37 | "line": 38, |
38 | "column": 3 | 38 | "column": 3 |
39 | } | 39 | } |
40 | } | 40 | } |
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index 71d4e1702..f83bc21ad 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js | |||
@@ -263,5 +263,24 @@ export default class SettingsStore extends Store { | |||
263 | }, | 263 | }, |
264 | }); | 264 | }); |
265 | } | 265 | } |
266 | |||
267 | if (!this.all.migration['5.4.4-beta.4-settings']) { | ||
268 | this.actions.settings.update({ | ||
269 | type: 'app', | ||
270 | data: { | ||
271 | todoServer: 'isUsingCustomTodoService', | ||
272 | customTodoServer: legacySettings.todoServer, | ||
273 | }, | ||
274 | }); | ||
275 | |||
276 | this.actions.settings.update({ | ||
277 | type: 'migration', | ||
278 | data: { | ||
279 | '5.4.4-beta.4-settings': true, | ||
280 | }, | ||
281 | }); | ||
282 | |||
283 | debug('Migrated old todo setting to new custom todo setting'); | ||
284 | } | ||
266 | } | 285 | } |
267 | } | 286 | } |