From c9c067b286505621fbae3fc212638b45ae1c733a Mon Sep 17 00:00:00 2001 From: Bennett Date: Sun, 4 Oct 2020 16:27:26 +0200 Subject: Add setting to enable nightly releases updates (#742) Co-authored-by: Amine Mouafik --- src/components/layout/AppLayout.js | 2 + .../settings/settings/EditSettingsForm.js | 12 ++ src/components/ui/ToggleRaw.js | 74 ++++++++ src/config.js | 1 + src/containers/settings/EditSettingsScreen.js | 1 + src/electron/ipc-api/autoUpdate.js | 9 + src/features/nightlyBuilds/Component.js | 141 +++++++++++++++ src/features/nightlyBuilds/index.js | 45 +++++ src/i18n/locales/defaultMessages.json | 197 +++++++++++++-------- src/i18n/locales/en-US.json | 6 +- src/i18n/locales/whitelist_en-US.json | 3 +- .../messages/src/components/layout/AppLayout.json | 16 +- .../settings/settings/EditSettingsForm.json | 124 ++++++------- .../src/features/nightlyBuilds/Component.json | 54 ++++++ src/stores/FeaturesStore.js | 2 + src/styles/features.scss | 13 ++ src/styles/main.scss | 2 +- src/styles/quick-switch.scss | 13 -- 18 files changed, 559 insertions(+), 156 deletions(-) create mode 100644 src/components/ui/ToggleRaw.js create mode 100644 src/features/nightlyBuilds/Component.js create mode 100644 src/features/nightlyBuilds/index.js create mode 100644 src/i18n/messages/src/features/nightlyBuilds/Component.json create mode 100644 src/styles/features.scss delete mode 100644 src/styles/quick-switch.scss (limited to 'src') diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index 3b732e602..a60270a6f 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js @@ -9,6 +9,7 @@ import InfoBar from '../ui/InfoBar'; import { Component as BasicAuth } from '../../features/basicAuth'; import { Component as ShareFranz } from '../../features/shareFranz'; import { Component as QuickSwitch } from '../../features/quickSwitch'; +import { Component as NightlyBuilds } from '../../features/nightlyBuilds'; import { Component as PublishDebugInfo } from '../../features/publishDebugInfo'; import ErrorBoundary from '../util/ErrorBoundary'; @@ -197,6 +198,7 @@ class AppLayout extends Component { + {services} {children} diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index 031203308..b6698b8e2 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js @@ -7,6 +7,7 @@ import { defineMessages, intlShape } from 'react-intl'; import Form from '../../../lib/Form'; import Button from '../../ui/Button'; import Toggle from '../../ui/Toggle'; +import ToggleRaw from '../../ui/ToggleRaw'; import Select from '../../ui/Select'; import PremiumFeatureContainer from '../../ui/PremiumFeatureContainer'; import Input from '../../ui/Input'; @@ -170,6 +171,7 @@ export default @observer class EditSettingsForm extends Component { hibernationEnabled: PropTypes.bool.isRequired, isDarkmodeEnabled: PropTypes.bool.isRequired, isAdaptableDarkModeEnabled: PropTypes.bool.isRequired, + isNightlyEnabled: PropTypes.bool.isRequired, openProcessManager: PropTypes.func.isRequired, }; @@ -224,6 +226,7 @@ export default @observer class EditSettingsForm extends Component { isDarkmodeEnabled, openProcessManager, isTodosActivated, + isNightlyEnabled, } = this.props; const { intl } = this.context; @@ -593,6 +596,15 @@ export default @observer class EditSettingsForm extends Component { {automaticUpdates && (
+ {updateIsReadyToInstall ? (
+ + ); + } +} + +nightlyBuildsModal.wrappedComponent.propTypes = { + stores: PropTypes.shape({ + settings: PropTypes.instanceOf(SettingsStore).isRequired, + }).isRequired, + actions: PropTypes.shape({ + settings: PropTypes.shape({ + update: PropTypes.func.isRequired, + }).isRequired, + user: PropTypes.shape({ + update: PropTypes.func.isRequired, + }).isRequired, + ui: PropTypes.shape({ + openSettings: PropTypes.func.isRequired, + }).isRequired, + }).isRequired, + classes: PropTypes.object.isRequired, +}; diff --git a/src/features/nightlyBuilds/index.js b/src/features/nightlyBuilds/index.js new file mode 100644 index 000000000..34fe37d4d --- /dev/null +++ b/src/features/nightlyBuilds/index.js @@ -0,0 +1,45 @@ +import { observable } from 'mobx'; + +export { default as Component } from './Component'; + +const debug = require('debug')('Ferdi:feature:nightlyBuilds'); + +const defaultState = { + isModalVisible: false, +}; + +export const state = observable(defaultState); + +export default function initialize() { + debug('Initialize nightlyBuilds feature'); + + function showModal() { + state.isModalVisible = true; + } + + function toggleFeature() { + if (window.ferdi.stores.settings.app.nightly) { + window.ferdi.actions.settings.update({ + type: 'app', + data: { + nightly: false, + }, + }); + window.ferdi.actions.user.update({ + userData: { + nightly: false, + }, + }); + } else { + // We need to close the settings, otherwise the modal will be drawn under the settings window + window.ferdi.actions.ui.closeSettings(); + showModal(); + } + } + + window.ferdi.features.nightlyBuilds = { + state, + showModal, + toggleFeature, + }; +} diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json index 58f37ebad..34bf58203 100644 --- a/src/i18n/locales/defaultMessages.json +++ b/src/i18n/locales/defaultMessages.json @@ -1056,52 +1056,52 @@ "defaultMessage": "!!!Your services have been updated.", "end": { "column": 3, - "line": 34 + "line": 35 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.servicesUpdated", "start": { "column": 19, - "line": 31 + "line": 32 } }, { "defaultMessage": "!!!Reload services", "end": { "column": 3, - "line": 38 + "line": 39 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.buttonReloadServices", "start": { "column": 24, - "line": 35 + "line": 36 } }, { "defaultMessage": "!!!Could not load services and user information", "end": { "column": 3, - "line": 42 + "line": 43 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.requiredRequestsFailed", "start": { "column": 26, - "line": 39 + "line": 40 } }, { "defaultMessage": "!!!There were errors while trying to perform an authenticated request. Please try logging out and back in if this error persists.", "end": { "column": 3, - "line": 46 + "line": 47 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.authRequestFailed", "start": { "column": 21, - "line": 43 + "line": 44 } } ], @@ -3075,403 +3075,403 @@ "defaultMessage": "!!!Settings", "end": { "column": 3, - "line": 25 + "line": 26 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.headline", "start": { "column": 12, - "line": 22 + "line": 23 } }, { "defaultMessage": "!!!General", "end": { "column": 3, - "line": 29 + "line": 30 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.headlineGeneral", "start": { "column": 19, - "line": 26 + "line": 27 } }, { "defaultMessage": "!!!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.", "end": { "column": 3, - "line": 33 + "line": 34 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.sentryInfo", "start": { "column": 14, - "line": 30 + "line": 31 } }, { "defaultMessage": "!!!By default, Ferdi will keep all your services open and loaded in the background so they are ready when you want to use them. Service Hibernation will unload your services after a specified amount. This is useful to save RAM or keeping services from slowing down your computer.", "end": { "column": 3, - "line": 37 + "line": 38 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.hibernateInfo", "start": { "column": 17, - "line": 34 + "line": 35 } }, { "defaultMessage": "!!!Minutes of inactivity, after which Ferdi should automatically lock. Use 0 to disable", "end": { "column": 3, - "line": 41 + "line": 42 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.inactivityLockInfo", "start": { "column": 22, - "line": 38 + "line": 39 } }, { "defaultMessage": "!!!This server will be used for the \"Franz Todo\" feature. (default: https://app.franztodos.com)", "end": { "column": 3, - "line": 45 + "line": 46 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.todoServerInfo", "start": { "column": 18, - "line": 42 + "line": 43 } }, { "defaultMessage": "!!!Password", "end": { "column": 3, - "line": 49 + "line": 50 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.lockedPassword", "start": { "column": 18, - "line": 46 + "line": 47 } }, { "defaultMessage": "!!!Please make sure to set a password you'll remember.\nIf you loose this password, you will have to reinstall Ferdi.", "end": { "column": 3, - "line": 53 + "line": 54 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.lockedPasswordInfo", "start": { "column": 22, - "line": 50 + "line": 51 } }, { "defaultMessage": "!!!Password Lock allows you to keep your messages protected.\nUsing Password Lock, you will be prompted to enter your password everytime you start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut CMD/CTRL+Shift+L.", "end": { "column": 3, - "line": 57 + "line": 58 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.lockInfo", "start": { "column": 12, - "line": 54 + "line": 55 } }, { "defaultMessage": "!!!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.", "end": { "column": 3, - "line": 61 + "line": 62 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.scheduledDNDTimeInfo", "start": { "column": 24, - "line": 58 + "line": 59 } }, { "defaultMessage": "!!!Scheduled Do-not-Disturb allows you to define a period of time in which you do not want to get Notifications from Ferdi.", "end": { "column": 3, - "line": 65 + "line": 66 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.scheduledDNDInfo", "start": { "column": 20, - "line": 62 + "line": 63 } }, { "defaultMessage": "!!!Language", "end": { "column": 3, - "line": 69 + "line": 70 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.headlineLanguage", "start": { "column": 20, - "line": 66 + "line": 67 } }, { "defaultMessage": "!!!Updates", "end": { "column": 3, - "line": 73 + "line": 74 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.headlineUpdates", "start": { "column": 19, - "line": 70 + "line": 71 } }, { "defaultMessage": "!!!Appearance", "end": { "column": 3, - "line": 77 + "line": 78 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.headlineAppearance", "start": { "column": 22, - "line": 74 + "line": 75 } }, { "defaultMessage": "!!!Universal Dark Mode tries to dynamically generate dark mode styles for services that are otherwise not currently supported.", "end": { "column": 3, - "line": 81 + "line": 82 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.universalDarkModeInfo", "start": { "column": 25, - "line": 78 + "line": 79 } }, { "defaultMessage": "!!!Write your accent color in a CSS-compatible format. (Default: #7367f0)", "end": { "column": 3, - "line": 85 + "line": 86 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.accentColorInfo", "start": { "column": 19, - "line": 82 + "line": 83 } }, { "defaultMessage": "!!!Advanced", "end": { "column": 3, - "line": 89 + "line": 90 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.headlineAdvanced", "start": { "column": 20, - "line": 86 + "line": 87 } }, { "defaultMessage": "!!!Help us to translate Ferdi into your language.", "end": { "column": 3, - "line": 93 + "line": 94 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.translationHelp", "start": { "column": 19, - "line": 90 + "line": 91 } }, { "defaultMessage": "!!!Ferdi uses your Mac's build-in spellchecker to check for typos. If you want to change the languages the spellchecker checks for, you can do so in your Mac's System Preferences.", "end": { "column": 3, - "line": 97 + "line": 98 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.spellCheckerLanguageInfo", "start": { "column": 28, - "line": 94 + "line": 95 } }, { "defaultMessage": "!!!Cache", "end": { "column": 3, - "line": 101 + "line": 102 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.subheadlineCache", "start": { "column": 20, - "line": 98 + "line": 99 } }, { "defaultMessage": "!!!Ferdi cache is currently using {size} of disk space.", "end": { "column": 3, - "line": 105 + "line": 106 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.cacheInfo", "start": { "column": 13, - "line": 102 + "line": 103 } }, { "defaultMessage": "!!!Couldn't clear all cache", "end": { "column": 3, - "line": 109 + "line": 110 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.cacheNotCleared", "start": { "column": 19, - "line": 106 + "line": 107 } }, { "defaultMessage": "!!!Clear cache", "end": { "column": 3, - "line": 113 + "line": 114 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.buttonClearAllCache", "start": { "column": 23, - "line": 110 + "line": 111 } }, { "defaultMessage": "!!!Check for updates", "end": { "column": 3, - "line": 117 + "line": 118 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.buttonSearchForUpdate", "start": { "column": 25, - "line": 114 + "line": 115 } }, { "defaultMessage": "!!!Restart & install update", "end": { "column": 3, - "line": 121 + "line": 122 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.buttonInstallUpdate", "start": { "column": 23, - "line": 118 + "line": 119 } }, { "defaultMessage": "!!!Is searching for update", "end": { "column": 3, - "line": 125 + "line": 126 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.updateStatusSearching", "start": { "column": 25, - "line": 122 + "line": 123 } }, { "defaultMessage": "!!!Update available, downloading...", "end": { "column": 3, - "line": 129 + "line": 130 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.updateStatusAvailable", "start": { "column": 25, - "line": 126 + "line": 127 } }, { "defaultMessage": "!!!You are using the latest version of Ferdi", "end": { "column": 3, - "line": 133 + "line": 134 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.updateStatusUpToDate", "start": { "column": 24, - "line": 130 + "line": 131 } }, { "defaultMessage": "!!!Current version:", "end": { "column": 3, - "line": 137 + "line": 138 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.currentVersion", "start": { "column": 18, - "line": 134 + "line": 135 } }, { "defaultMessage": "!!!Changes require restart", "end": { "column": 3, - "line": 141 + "line": 142 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.restartRequired", "start": { "column": 29, - "line": 138 + "line": 139 } }, { "defaultMessage": "!!!Official translations are English & German. All other languages are community based translations.", "end": { "column": 3, - "line": 145 + "line": 146 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.languageDisclaimer", "start": { "column": 22, - "line": 142 + "line": 143 } } ], @@ -5314,6 +5314,63 @@ ], "path": "src/features/delayApp/Component.json" }, + { + "descriptors": [ + { + "defaultMessage": "!!!Nightly Builds", + "end": { + "column": 3, + "line": 17 + }, + "file": "src/features/nightlyBuilds/Component.js", + "id": "feature.nightlyBuilds.title", + "start": { + "column": 9, + "line": 14 + } + }, + { + "defaultMessage": "!!!Nightly builds are highly experimental versions of Ferdi that may contain unpolished or uncompleted features. These nightly builds are mainly used by developers to test their newly developed features and how they will perform in the final build. If you don't know what you are doing, we suggest not activating nightly builds.", + "end": { + "column": 3, + "line": 21 + }, + "file": "src/features/nightlyBuilds/Component.js", + "id": "feature.nightlyBuilds.info", + "start": { + "column": 8, + "line": 18 + } + }, + { + "defaultMessage": "!!!Activate", + "end": { + "column": 3, + "line": 25 + }, + "file": "src/features/nightlyBuilds/Component.js", + "id": "feature.nightlyBuilds.activate", + "start": { + "column": 12, + "line": 22 + } + }, + { + "defaultMessage": "!!!Cancel", + "end": { + "column": 3, + "line": 29 + }, + "file": "src/features/nightlyBuilds/Component.js", + "id": "feature.nightlyBuilds.cancel", + "start": { + "column": 10, + "line": 26 + } + } + ], + "path": "src/features/nightlyBuilds/Component.json" + }, { "descriptors": [ { diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json index fd5c0755b..95481f5de 100644 --- a/src/i18n/locales/en-US.json +++ b/src/i18n/locales/en-US.json @@ -19,6 +19,10 @@ "feature.delayApp.trial.headline": "Get the free Ferdi Professional 14 day trial and skip the line", "feature.delayApp.upgrade.action": "Get a Ferdi Supporter License", "feature.delayApp.upgrade.actionShort": "Upgrade account", + "feature.nightlyBuilds.activate": "Activate", + "feature.nightlyBuilds.cancel": "Cancel", + "feature.nightlyBuilds.info": "Nightly builds are highly experimental versions of Ferdi that may contain unpolished or uncompleted features. These nightly builds are mainly used by developers to test their newly developed features and how they will perform in the final build. If you don't know what you are doing, we suggest not activating nightly builds.", + "feature.nightlyBuilds.title": "Nightly Builds", "feature.planSelection.cta.ctaDowngradeFree": "Downgrade to Free", "feature.planSelection.cta.stayOnFree": "Stay on Free", "feature.planSelection.cta.trial": "Start my free 14-days Trial", @@ -529,4 +533,4 @@ "workspaceDrawer.workspaceFeatureInfo": "

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.

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.

", "workspaceDrawer.workspacesSettingsTooltip": "Edit workspaces settings", "workspaces.switchingIndicator.switchingTo": "Switching to" -} +} \ 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 @@ -[] +[ +] \ No newline at end of file diff --git a/src/i18n/messages/src/components/layout/AppLayout.json b/src/i18n/messages/src/components/layout/AppLayout.json index 5a8e082f2..554758f82 100644 --- a/src/i18n/messages/src/components/layout/AppLayout.json +++ b/src/i18n/messages/src/components/layout/AppLayout.json @@ -4,11 +4,11 @@ "defaultMessage": "!!!Your services have been updated.", "file": "src/components/layout/AppLayout.js", "start": { - "line": 31, + "line": 32, "column": 19 }, "end": { - "line": 34, + "line": 35, "column": 3 } }, @@ -17,11 +17,11 @@ "defaultMessage": "!!!Reload services", "file": "src/components/layout/AppLayout.js", "start": { - "line": 35, + "line": 36, "column": 24 }, "end": { - "line": 38, + "line": 39, "column": 3 } }, @@ -30,11 +30,11 @@ "defaultMessage": "!!!Could not load services and user information", "file": "src/components/layout/AppLayout.js", "start": { - "line": 39, + "line": 40, "column": 26 }, "end": { - "line": 42, + "line": 43, "column": 3 } }, @@ -43,11 +43,11 @@ "defaultMessage": "!!!There were errors while trying to perform an authenticated request. Please try logging out and back in if this error persists.", "file": "src/components/layout/AppLayout.js", "start": { - "line": 43, + "line": 44, "column": 21 }, "end": { - "line": 46, + "line": 47, "column": 3 } } diff --git a/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json b/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json index 373cd78f9..ccd006117 100644 --- a/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json +++ b/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json @@ -4,11 +4,11 @@ "defaultMessage": "!!!Settings", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 22, + "line": 23, "column": 12 }, "end": { - "line": 25, + "line": 26, "column": 3 } }, @@ -17,11 +17,11 @@ "defaultMessage": "!!!General", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 26, + "line": 27, "column": 19 }, "end": { - "line": 29, + "line": 30, "column": 3 } }, @@ -30,11 +30,11 @@ "defaultMessage": "!!!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.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 30, + "line": 31, "column": 14 }, "end": { - "line": 33, + "line": 34, "column": 3 } }, @@ -43,11 +43,11 @@ "defaultMessage": "!!!By default, Ferdi will keep all your services open and loaded in the background so they are ready when you want to use them. Service Hibernation will unload your services after a specified amount. This is useful to save RAM or keeping services from slowing down your computer.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 34, + "line": 35, "column": 17 }, "end": { - "line": 37, + "line": 38, "column": 3 } }, @@ -56,11 +56,11 @@ "defaultMessage": "!!!Minutes of inactivity, after which Ferdi should automatically lock. Use 0 to disable", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 38, + "line": 39, "column": 22 }, "end": { - "line": 41, + "line": 42, "column": 3 } }, @@ -69,11 +69,11 @@ "defaultMessage": "!!!This server will be used for the \"Franz Todo\" feature. (default: https://app.franztodos.com)", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 42, + "line": 43, "column": 18 }, "end": { - "line": 45, + "line": 46, "column": 3 } }, @@ -82,11 +82,11 @@ "defaultMessage": "!!!Password", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 46, + "line": 47, "column": 18 }, "end": { - "line": 49, + "line": 50, "column": 3 } }, @@ -95,11 +95,11 @@ "defaultMessage": "!!!Please make sure to set a password you'll remember.\nIf you loose this password, you will have to reinstall Ferdi.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 50, + "line": 51, "column": 22 }, "end": { - "line": 53, + "line": 54, "column": 3 } }, @@ -108,11 +108,11 @@ "defaultMessage": "!!!Password Lock allows you to keep your messages protected.\nUsing Password Lock, you will be prompted to enter your password everytime you start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut CMD/CTRL+Shift+L.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 54, + "line": 55, "column": 12 }, "end": { - "line": 57, + "line": 58, "column": 3 } }, @@ -121,11 +121,11 @@ "defaultMessage": "!!!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.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 58, + "line": 59, "column": 24 }, "end": { - "line": 61, + "line": 62, "column": 3 } }, @@ -134,11 +134,11 @@ "defaultMessage": "!!!Scheduled Do-not-Disturb allows you to define a period of time in which you do not want to get Notifications from Ferdi.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 62, + "line": 63, "column": 20 }, "end": { - "line": 65, + "line": 66, "column": 3 } }, @@ -147,11 +147,11 @@ "defaultMessage": "!!!Language", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 66, + "line": 67, "column": 20 }, "end": { - "line": 69, + "line": 70, "column": 3 } }, @@ -160,11 +160,11 @@ "defaultMessage": "!!!Updates", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 70, + "line": 71, "column": 19 }, "end": { - "line": 73, + "line": 74, "column": 3 } }, @@ -173,11 +173,11 @@ "defaultMessage": "!!!Appearance", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 74, + "line": 75, "column": 22 }, "end": { - "line": 77, + "line": 78, "column": 3 } }, @@ -186,11 +186,11 @@ "defaultMessage": "!!!Universal Dark Mode tries to dynamically generate dark mode styles for services that are otherwise not currently supported.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 78, + "line": 79, "column": 25 }, "end": { - "line": 81, + "line": 82, "column": 3 } }, @@ -199,11 +199,11 @@ "defaultMessage": "!!!Write your accent color in a CSS-compatible format. (Default: #7367f0)", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 82, + "line": 83, "column": 19 }, "end": { - "line": 85, + "line": 86, "column": 3 } }, @@ -212,11 +212,11 @@ "defaultMessage": "!!!Advanced", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 86, + "line": 87, "column": 20 }, "end": { - "line": 89, + "line": 90, "column": 3 } }, @@ -225,11 +225,11 @@ "defaultMessage": "!!!Help us to translate Ferdi into your language.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 90, + "line": 91, "column": 19 }, "end": { - "line": 93, + "line": 94, "column": 3 } }, @@ -238,11 +238,11 @@ "defaultMessage": "!!!Ferdi uses your Mac's build-in spellchecker to check for typos. If you want to change the languages the spellchecker checks for, you can do so in your Mac's System Preferences.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 94, + "line": 95, "column": 28 }, "end": { - "line": 97, + "line": 98, "column": 3 } }, @@ -251,11 +251,11 @@ "defaultMessage": "!!!Cache", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 98, + "line": 99, "column": 20 }, "end": { - "line": 101, + "line": 102, "column": 3 } }, @@ -264,11 +264,11 @@ "defaultMessage": "!!!Ferdi cache is currently using {size} of disk space.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 102, + "line": 103, "column": 13 }, "end": { - "line": 105, + "line": 106, "column": 3 } }, @@ -277,11 +277,11 @@ "defaultMessage": "!!!Couldn't clear all cache", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 106, + "line": 107, "column": 19 }, "end": { - "line": 109, + "line": 110, "column": 3 } }, @@ -290,11 +290,11 @@ "defaultMessage": "!!!Clear cache", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 110, + "line": 111, "column": 23 }, "end": { - "line": 113, + "line": 114, "column": 3 } }, @@ -303,11 +303,11 @@ "defaultMessage": "!!!Check for updates", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 114, + "line": 115, "column": 25 }, "end": { - "line": 117, + "line": 118, "column": 3 } }, @@ -316,11 +316,11 @@ "defaultMessage": "!!!Restart & install update", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 118, + "line": 119, "column": 23 }, "end": { - "line": 121, + "line": 122, "column": 3 } }, @@ -329,11 +329,11 @@ "defaultMessage": "!!!Is searching for update", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 122, + "line": 123, "column": 25 }, "end": { - "line": 125, + "line": 126, "column": 3 } }, @@ -342,11 +342,11 @@ "defaultMessage": "!!!Update available, downloading...", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 126, + "line": 127, "column": 25 }, "end": { - "line": 129, + "line": 130, "column": 3 } }, @@ -355,11 +355,11 @@ "defaultMessage": "!!!You are using the latest version of Ferdi", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 130, + "line": 131, "column": 24 }, "end": { - "line": 133, + "line": 134, "column": 3 } }, @@ -368,11 +368,11 @@ "defaultMessage": "!!!Current version:", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 134, + "line": 135, "column": 18 }, "end": { - "line": 137, + "line": 138, "column": 3 } }, @@ -381,11 +381,11 @@ "defaultMessage": "!!!Changes require restart", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 138, + "line": 139, "column": 29 }, "end": { - "line": 141, + "line": 142, "column": 3 } }, @@ -394,11 +394,11 @@ "defaultMessage": "!!!Official translations are English & German. All other languages are community based translations.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 142, + "line": 143, "column": 22 }, "end": { - "line": 145, + "line": 146, "column": 3 } } diff --git a/src/i18n/messages/src/features/nightlyBuilds/Component.json b/src/i18n/messages/src/features/nightlyBuilds/Component.json new file mode 100644 index 000000000..6b86ec29f --- /dev/null +++ b/src/i18n/messages/src/features/nightlyBuilds/Component.json @@ -0,0 +1,54 @@ +[ + { + "id": "feature.nightlyBuilds.title", + "defaultMessage": "!!!Nightly Builds", + "file": "src/features/nightlyBuilds/Component.js", + "start": { + "line": 14, + "column": 9 + }, + "end": { + "line": 17, + "column": 3 + } + }, + { + "id": "feature.nightlyBuilds.info", + "defaultMessage": "!!!Nightly builds are highly experimental versions of Ferdi that may contain unpolished or uncompleted features. These nightly builds are mainly used by developers to test their newly developed features and how they will perform in the final build. If you don't know what you are doing, we suggest not activating nightly builds.", + "file": "src/features/nightlyBuilds/Component.js", + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 21, + "column": 3 + } + }, + { + "id": "feature.nightlyBuilds.activate", + "defaultMessage": "!!!Activate", + "file": "src/features/nightlyBuilds/Component.js", + "start": { + "line": 22, + "column": 12 + }, + "end": { + "line": 25, + "column": 3 + } + }, + { + "id": "feature.nightlyBuilds.cancel", + "defaultMessage": "!!!Cancel", + "file": "src/features/nightlyBuilds/Component.js", + "start": { + "line": 26, + "column": 10 + }, + "end": { + "line": 29, + "column": 3 + } + } +] \ No newline at end of file diff --git a/src/stores/FeaturesStore.js b/src/stores/FeaturesStore.js index 8a279bc8a..631d0318e 100644 --- a/src/stores/FeaturesStore.js +++ b/src/stores/FeaturesStore.js @@ -14,6 +14,7 @@ import serviceProxy from '../features/serviceProxy'; import basicAuth from '../features/basicAuth'; import workspaces from '../features/workspaces'; import quickSwitch from '../features/quickSwitch'; +import nightlyBuilds from '../features/nightlyBuilds'; import publishDebugInfo from '../features/publishDebugInfo'; import shareFranz from '../features/shareFranz'; import announcements from '../features/announcements'; @@ -85,6 +86,7 @@ export default class FeaturesStore extends Store { basicAuth(this.stores, this.actions); workspaces(this.stores, this.actions); quickSwitch(this.stores, this.actions); + nightlyBuilds(this.stores, this.actions); publishDebugInfo(this.stores, this.actions); shareFranz(this.stores, this.actions); announcements(this.stores, this.actions); diff --git a/src/styles/features.scss b/src/styles/features.scss new file mode 100644 index 000000000..d2931f837 --- /dev/null +++ b/src/styles/features.scss @@ -0,0 +1,13 @@ +.theme__dark .quick-switch { + background: $dark-theme-gray-darkest; + + .service { + background: $dark-theme-gray-dark; + color: $dark-theme-gray-lightest; + border: inherit; + } + + .active { + background: $theme-brand-primary; + } +} diff --git a/src/styles/main.scss b/src/styles/main.scss index ceec4a95e..c57dc6fcd 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -30,7 +30,7 @@ $mdi-font-path: '../node_modules/mdi/fonts'; @import './content-tabs.scss'; @import './invite.scss'; @import './title-bar.scss'; -@import './quick-switch.scss'; +@import './features.scss'; // form @import './input.scss'; diff --git a/src/styles/quick-switch.scss b/src/styles/quick-switch.scss deleted file mode 100644 index 356123c4c..000000000 --- a/src/styles/quick-switch.scss +++ /dev/null @@ -1,13 +0,0 @@ -.theme__dark .quick-switch { - background: $dark-theme-gray-darkest; - - .service { - background: $dark-theme-gray-dark; - color: $dark-theme-gray-lightest; - border: inherit; - } - - .active { - background: $theme-brand-primary; - } -} \ No newline at end of file -- cgit v1.2.3-70-g09d2