From 5130935ad52c149837fd45e936c943223d13dfc4 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Fri, 13 Aug 2021 08:18:13 +0530 Subject: chore: Refactoring to reuse already defined constants --- src/components/settings/settings/EditSettingsForm.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/components') diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index 87a4ada27..9db434099 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js @@ -1,4 +1,4 @@ -import { app, systemPreferences } from '@electron/remote'; +import { systemPreferences } from '@electron/remote'; import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { observer } from 'mobx-react'; @@ -16,7 +16,7 @@ import { FRANZ_TRANSLATION, GITHUB_FRANZ_URL, } from '../../../config'; -import { DEFAULT_APP_SETTINGS, isMac, isWindows, lockFerdiShortcutKey } from '../../../environment'; +import { DEFAULT_APP_SETTINGS, ferdiVersion, isMac, isWindows, lockFerdiShortcutKey } from '../../../environment'; import globalMessages from '../../../i18n/globalMessages'; const messages = defineMessages({ @@ -669,7 +669,7 @@ export default @observer class EditSettingsForm extends Component { )} {intl.formatMessage(messages.currentVersion)} {' '} - {app.getVersion()} + {ferdiVersion} {noUpdateAvailable && ( <>
-- cgit v1.2.3-54-g00ecf From ae033f72650f54c5804134a2ff2a461294b7c2f5 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sat, 14 Aug 2021 15:17:27 +0530 Subject: feat: Add buttons in the 'Advanced' section of preferences to allow the user to quickly open the Ferdi profile folder --- .../settings/settings/EditSettingsForm.js | 41 ++++++++++++- src/containers/settings/RecipesScreen.js | 14 ++--- src/environment.js | 7 +++ src/i18n/locales/defaultMessages.json | 71 +++++++++++++++++----- src/i18n/locales/en-US.json | 3 + .../settings/settings/EditSettingsForm.json | 71 +++++++++++++++++----- src/index.js | 2 +- src/styles/settings.scss | 4 +- 8 files changed, 167 insertions(+), 46 deletions(-) (limited to 'src/components') diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index 9db434099..1df8c3527 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js @@ -16,7 +16,7 @@ import { FRANZ_TRANSLATION, GITHUB_FRANZ_URL, } from '../../../config'; -import { DEFAULT_APP_SETTINGS, ferdiVersion, isMac, isWindows, lockFerdiShortcutKey } from '../../../environment'; +import { DEFAULT_APP_SETTINGS, ferdiVersion, isMac, isWindows, lockFerdiShortcutKey, openPath, userDataPath, userDataRecipesPath } from '../../../environment'; import globalMessages from '../../../i18n/globalMessages'; const messages = defineMessages({ @@ -116,6 +116,18 @@ const messages = defineMessages({ id: 'settings.app.buttonClearAllCache', defaultMessage: '!!!Clear cache', }, + subheadlineFerdiProfile: { + id: 'settings.app.subheadlineFerdiProfile', + defaultMessage: '!!!Ferdi Profile', + }, + buttonOpenFerdiProfileFolder: { + id: 'settings.app.buttonOpenFerdiProfileFolder', + defaultMessage: '!!!Open Profile folder', + }, + buttonOpenFerdiServiceRecipesFolder: { + id: 'settings.app.buttonOpenFerdiServiceRecipesFolder', + defaultMessage: '!!!Open Service Recipes folder', + }, buttonSearchForUpdate: { id: 'settings.app.buttonSearchForUpdate', defaultMessage: '!!!Check for updates', @@ -259,6 +271,9 @@ export default @observer class EditSettingsForm extends Component { } } + const profileFolder = userDataPath(); + const recipeFolder = userDataRecipesPath(); + return (
@@ -631,6 +646,30 @@ export default @observer class EditSettingsForm extends Component { />

+ +
+ +
+

+ {intl.formatMessage(messages.subheadlineFerdiProfile)} +

+

+

+
+

+
)} diff --git a/src/containers/settings/RecipesScreen.js b/src/containers/settings/RecipesScreen.js index 52bf31383..526e0a1a9 100644 --- a/src/containers/settings/RecipesScreen.js +++ b/src/containers/settings/RecipesScreen.js @@ -1,5 +1,4 @@ -import { shell } from 'electron'; -import { ensureDirSync, readJsonSync } from 'fs-extra'; +import { readJsonSync } from 'fs-extra'; import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { autorun } from 'mobx'; @@ -13,7 +12,7 @@ import UserStore from '../../stores/UserStore'; import RecipesDashboard from '../../components/settings/recipes/RecipesDashboard'; import ErrorBoundary from '../../components/util/ErrorBoundary'; import { CUSTOM_WEBSITE_RECIPE_ID, FRANZ_DEV_DOCS } from '../../config'; -import { asarRecipesPath, userDataRecipesPath } from '../../environment'; +import { asarRecipesPath, openPath, userDataRecipesPath } from '../../environment'; import { communityRecipesStore } from '../../features/communityRecipes'; import RecipePreview from '../../models/RecipePreview'; import AppStore from '../../stores/AppStore'; @@ -154,13 +153,8 @@ export default @inject('stores', 'actions') @observer class RecipesScreen extend serviceStatus={services.actionStatus} recipeFilter={filter} recipeDirectory={recipeDirectory} - openRecipeDirectory={async () => { - ensureDirSync(recipeDirectory); - shell.openExternal(`file://${recipeDirectory}`); - }} - openDevDocs={() => { - appActions.openExternalUrl({ url: FRANZ_DEV_DOCS }); - }} + openRecipeDirectory={() => openPath(recipeDirectory)} + openDevDocs={() => appActions.openExternalUrl({ url: FRANZ_DEV_DOCS })} /> ); diff --git a/src/environment.js b/src/environment.js index f2a889be4..6332ad67b 100644 --- a/src/environment.js +++ b/src/environment.js @@ -1,7 +1,9 @@ import os from 'os'; import { join } from 'path'; +import { ensureDirSync } from 'fs-extra'; import { is, api as electronApi } from 'electron-util'; +import { shell } from 'electron'; import { DEFAULT_ACCENT_COLOR } from '@meetfranz/theme'; @@ -63,6 +65,11 @@ export function asarRecipesPath(...segments) { return join(asarPath(join(__dirname, 'recipes')), ...([segments].flat())); } +export async function openPath(folderName) { + ensureDirSync(folderName); + shell.openPath(folderName); +} + export const useLiveAPI = process.env.USE_LIVE_API; const useLocalAPI = process.env.USE_LOCAL_API; diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json index 683ec4628..da23ba1a3 100644 --- a/src/i18n/locales/defaultMessages.json +++ b/src/i18n/locales/defaultMessages.json @@ -3202,107 +3202,146 @@ } }, { - "defaultMessage": "!!!Check for updates", + "defaultMessage": "!!!Ferdi Profile", "end": { "column": 3, "line": 122 }, "file": "src/components/settings/settings/EditSettingsForm.js", + "id": "settings.app.subheadlineFerdiProfile", + "start": { + "column": 27, + "line": 119 + } + }, + { + "defaultMessage": "!!!Open Profile folder", + "end": { + "column": 3, + "line": 126 + }, + "file": "src/components/settings/settings/EditSettingsForm.js", + "id": "settings.app.buttonOpenFerdiProfileFolder", + "start": { + "column": 32, + "line": 123 + } + }, + { + "defaultMessage": "!!!Open Service Recipes folder", + "end": { + "column": 3, + "line": 130 + }, + "file": "src/components/settings/settings/EditSettingsForm.js", + "id": "settings.app.buttonOpenFerdiServiceRecipesFolder", + "start": { + "column": 39, + "line": 127 + } + }, + { + "defaultMessage": "!!!Check for updates", + "end": { + "column": 3, + "line": 134 + }, + "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.buttonSearchForUpdate", "start": { "column": 25, - "line": 119 + "line": 131 } }, { "defaultMessage": "!!!Restart & install update", "end": { "column": 3, - "line": 126 + "line": 138 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.buttonInstallUpdate", "start": { "column": 23, - "line": 123 + "line": 135 } }, { "defaultMessage": "!!!Is searching for update", "end": { "column": 3, - "line": 130 + "line": 142 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.updateStatusSearching", "start": { "column": 25, - "line": 127 + "line": 139 } }, { "defaultMessage": "!!!Update available, downloading...", "end": { "column": 3, - "line": 134 + "line": 146 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.updateStatusAvailable", "start": { "column": 25, - "line": 131 + "line": 143 } }, { "defaultMessage": "!!!You are using the latest version of Ferdi", "end": { "column": 3, - "line": 138 + "line": 150 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.updateStatusUpToDate", "start": { "column": 24, - "line": 135 + "line": 147 } }, { "defaultMessage": "!!!Current version:", "end": { "column": 3, - "line": 142 + "line": 154 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.currentVersion", "start": { "column": 18, - "line": 139 + "line": 151 } }, { "defaultMessage": "!!!Changes require restart", "end": { "column": 3, - "line": 146 + "line": 158 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.restartRequired", "start": { "column": 22, - "line": 143 + "line": 155 } }, { "defaultMessage": "!!!Official translations are English & German. All other languages are community based translations.", "end": { "column": 3, - "line": 150 + "line": 162 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.languageDisclaimer", "start": { "column": 22, - "line": 147 + "line": 159 } } ], diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json index 002ea5655..1afa2c183 100644 --- a/src/i18n/locales/en-US.json +++ b/src/i18n/locales/en-US.json @@ -205,6 +205,8 @@ "settings.app.accentColorInfo": "Write your accent color in a CSS-compatible format. (Default: {defaultAccentColor})", "settings.app.buttonClearAllCache": "Clear cache", "settings.app.buttonInstallUpdate": "Restart & install update", + "settings.app.buttonOpenFerdiProfileFolder": "Open Profile folder", + "settings.app.buttonOpenFerdiServiceRecipesFolder": "Open Service Recipes folder", "settings.app.buttonSearchForUpdate": "Check for updates", "settings.app.cacheInfo": "Ferdi cache is currently using {size} of disk space.", "settings.app.cacheNotCleared": "Couldn't clear all cache", @@ -275,6 +277,7 @@ "settings.app.sentryInfo": "Sending telemetry data allows us to find errors in Ferdi - we will not send any personal information like your message data!", "settings.app.spellCheckerLanguageInfo": "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.", "settings.app.subheadlineCache": "Cache", + "settings.app.subheadlineFerdiProfile": "Ferdi Profile", "settings.app.todoServerInfo": "This server will be used for the \"Ferdi Todo\" feature.", "settings.app.translationHelp": "Help us to translate Ferdi into your language.", "settings.app.universalDarkModeInfo": "Universal Dark Mode tries to dynamically generate dark mode styles for services that are otherwise not currently supported.", diff --git a/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json b/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json index 548d52af9..2b9a00daf 100644 --- a/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json +++ b/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json @@ -311,16 +311,55 @@ "column": 3 } }, + { + "id": "settings.app.subheadlineFerdiProfile", + "defaultMessage": "!!!Ferdi Profile", + "file": "src/components/settings/settings/EditSettingsForm.js", + "start": { + "line": 119, + "column": 27 + }, + "end": { + "line": 122, + "column": 3 + } + }, + { + "id": "settings.app.buttonOpenFerdiProfileFolder", + "defaultMessage": "!!!Open Profile folder", + "file": "src/components/settings/settings/EditSettingsForm.js", + "start": { + "line": 123, + "column": 32 + }, + "end": { + "line": 126, + "column": 3 + } + }, + { + "id": "settings.app.buttonOpenFerdiServiceRecipesFolder", + "defaultMessage": "!!!Open Service Recipes folder", + "file": "src/components/settings/settings/EditSettingsForm.js", + "start": { + "line": 127, + "column": 39 + }, + "end": { + "line": 130, + "column": 3 + } + }, { "id": "settings.app.buttonSearchForUpdate", "defaultMessage": "!!!Check for updates", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 119, + "line": 131, "column": 25 }, "end": { - "line": 122, + "line": 134, "column": 3 } }, @@ -329,11 +368,11 @@ "defaultMessage": "!!!Restart & install update", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 123, + "line": 135, "column": 23 }, "end": { - "line": 126, + "line": 138, "column": 3 } }, @@ -342,11 +381,11 @@ "defaultMessage": "!!!Is searching for update", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 127, + "line": 139, "column": 25 }, "end": { - "line": 130, + "line": 142, "column": 3 } }, @@ -355,11 +394,11 @@ "defaultMessage": "!!!Update available, downloading...", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 131, + "line": 143, "column": 25 }, "end": { - "line": 134, + "line": 146, "column": 3 } }, @@ -368,11 +407,11 @@ "defaultMessage": "!!!You are using the latest version of Ferdi", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 135, + "line": 147, "column": 24 }, "end": { - "line": 138, + "line": 150, "column": 3 } }, @@ -381,11 +420,11 @@ "defaultMessage": "!!!Current version:", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 139, + "line": 151, "column": 18 }, "end": { - "line": 142, + "line": 154, "column": 3 } }, @@ -394,11 +433,11 @@ "defaultMessage": "!!!Changes require restart", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 143, + "line": 155, "column": 22 }, "end": { - "line": 146, + "line": 158, "column": 3 } }, @@ -407,11 +446,11 @@ "defaultMessage": "!!!Official translations are English & German. All other languages are community based translations.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 147, + "line": 159, "column": 22 }, "end": { - "line": 150, + "line": 162, "column": 3 } } diff --git a/src/index.js b/src/index.js index b1d4907cc..f6573d8f5 100644 --- a/src/index.js +++ b/src/index.js @@ -329,7 +329,7 @@ const createWindow = () => { if (isMac) { // eslint-disable-next-line global-require - const { default: askFormacOSPermissions } = require('./electron/macOSPermissions'); + const { askFormacOSPermissions } = require('./electron/macOSPermissions'); setTimeout(() => askFormacOSPermissions(mainWindow), ms('30s')); } diff --git a/src/styles/settings.scss b/src/styles/settings.scss index 501f97b98..f06ed7ef8 100644 --- a/src/styles/settings.scss +++ b/src/styles/settings.scss @@ -361,11 +361,11 @@ .settings__delete-button { right: 0; } - .settings__open-recipe-file-button { + .settings__open-recipe-file-button, .settings__open-settings-file-button { cursor: pointer; margin-right: 10px; } - .settings__open-recipe-file-container { + .settings__open-recipe-file-container, .settings__open-settings-file-container { margin-top: 20px; display: flex; height: auto !important; -- cgit v1.2.3-54-g00ecf From 8a37b92bc83db229a788008c5a6a68cf51216ed2 Mon Sep 17 00:00:00 2001 From: Vijay Raghavan Aravamudhan Date: Sat, 14 Aug 2021 14:52:24 +0000 Subject: Refactoring: Url helpers (#1789) These changes are mainly to ensure that 'shell.open*' invocations are only in a single file. * Moved 'openPath' into the 'url-helpers' file. * Extract 'openExternalUrl' into a common location in 'url-helpers' This is done so that we can then apply vetting rules to ensure that there is no security concern as described in https://benjamin-altpeter.de/shell-openexternal-dangers/ --- .../settings/settings/EditSettingsForm.js | 8 +- src/components/ui/Link.js | 10 +- src/containers/settings/RecipesScreen.js | 3 +- src/environment.js | 7 - src/helpers/url-helpers.js | 16 ++ .../settings/settings/EditSettingsForm.json | 140 +++++----- src/i18n/messages/src/lib/Menu.json | 292 ++++++++++----------- src/index.js | 9 +- src/lib/Menu.js | 19 +- src/stores/AppStore.js | 12 +- src/webview/contextMenuBuilder.js | 11 +- 11 files changed, 264 insertions(+), 263 deletions(-) (limited to 'src/components') diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index 1df8c3527..41580ca78 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js @@ -12,11 +12,9 @@ import ToggleRaw from '../../ui/ToggleRaw'; import Select from '../../ui/Select'; import Input from '../../ui/Input'; -import { - FRANZ_TRANSLATION, - GITHUB_FRANZ_URL, -} from '../../../config'; -import { DEFAULT_APP_SETTINGS, ferdiVersion, isMac, isWindows, lockFerdiShortcutKey, openPath, userDataPath, userDataRecipesPath } from '../../../environment'; +import { FRANZ_TRANSLATION, GITHUB_FRANZ_URL } from '../../../config'; +import { DEFAULT_APP_SETTINGS, ferdiVersion, isMac, isWindows, lockFerdiShortcutKey, userDataPath, userDataRecipesPath } from '../../../environment'; +import { openPath } from '../../../helpers/url-helpers'; import globalMessages from '../../../i18n/globalMessages'; const messages = defineMessages({ diff --git a/src/components/ui/Link.js b/src/components/ui/Link.js index fd14b7018..003211e5c 100644 --- a/src/components/ui/Link.js +++ b/src/components/ui/Link.js @@ -1,4 +1,3 @@ -import { shell } from 'electron'; import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { inject, observer } from 'mobx-react'; @@ -7,15 +6,18 @@ import classnames from 'classnames'; import { oneOrManyChildElements } from '../../prop-types'; import { matchRoute } from '../../helpers/routing-helpers'; +import { openExternalUrl } from '../../helpers/url-helpers'; // TODO: create container component for this component export default @inject('stores') @observer class Link extends Component { onClick(e) { - if (this.props.disabled) e.preventDefault(); - else if (this.props.target === '_blank') { + if (this.props.disabled) { e.preventDefault(); - shell.openExternal(this.props.to); + } else if (this.props.target === '_blank') { + e.preventDefault(); + openExternalUrl(this.props.to, true); } + // Note: if neither of the above, then let the other onClick handlers process it } render() { diff --git a/src/containers/settings/RecipesScreen.js b/src/containers/settings/RecipesScreen.js index 526e0a1a9..fa8245c6e 100644 --- a/src/containers/settings/RecipesScreen.js +++ b/src/containers/settings/RecipesScreen.js @@ -12,10 +12,11 @@ import UserStore from '../../stores/UserStore'; import RecipesDashboard from '../../components/settings/recipes/RecipesDashboard'; import ErrorBoundary from '../../components/util/ErrorBoundary'; import { CUSTOM_WEBSITE_RECIPE_ID, FRANZ_DEV_DOCS } from '../../config'; -import { asarRecipesPath, openPath, userDataRecipesPath } from '../../environment'; +import { asarRecipesPath, userDataRecipesPath } from '../../environment'; import { communityRecipesStore } from '../../features/communityRecipes'; import RecipePreview from '../../models/RecipePreview'; import AppStore from '../../stores/AppStore'; +import { openPath } from '../../helpers/url-helpers'; export default @inject('stores', 'actions') @observer class RecipesScreen extends Component { static propTypes = { diff --git a/src/environment.js b/src/environment.js index 6332ad67b..f2a889be4 100644 --- a/src/environment.js +++ b/src/environment.js @@ -1,9 +1,7 @@ import os from 'os'; import { join } from 'path'; -import { ensureDirSync } from 'fs-extra'; import { is, api as electronApi } from 'electron-util'; -import { shell } from 'electron'; import { DEFAULT_ACCENT_COLOR } from '@meetfranz/theme'; @@ -65,11 +63,6 @@ export function asarRecipesPath(...segments) { return join(asarPath(join(__dirname, 'recipes')), ...([segments].flat())); } -export async function openPath(folderName) { - ensureDirSync(folderName); - shell.openPath(folderName); -} - export const useLiveAPI = process.env.USE_LIVE_API; const useLocalAPI = process.env.USE_LOCAL_API; diff --git a/src/helpers/url-helpers.js b/src/helpers/url-helpers.js index 972f9b79a..b0dc9afbb 100644 --- a/src/helpers/url-helpers.js +++ b/src/helpers/url-helpers.js @@ -1,4 +1,8 @@ +// This is taken from: https://benjamin-altpeter.de/shell-openexternal-dangers/ + import { URL } from 'url'; +import { ensureDirSync } from 'fs-extra'; +import { shell } from 'electron'; import { ALLOWED_PROTOCOLS } from '../config'; @@ -18,3 +22,15 @@ export function isValidExternalURL(url) { return isAllowed; } + +export async function openPath(folderName) { + ensureDirSync(folderName); + shell.openPath(folderName); +} + +// TODO: Need to verify and fix/remove the skipping logic. Ideally, we should never skip this check +export function openExternalUrl(url, skipValidityCheck = false) { + if (skipValidityCheck || isValidExternalURL(url)) { + shell.openExternal(url); + } +} diff --git a/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json b/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json index 2b9a00daf..da1581864 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": 23, + "line": 21, "column": 12 }, "end": { - "line": 26, + "line": 24, "column": 3 } }, @@ -17,11 +17,11 @@ "defaultMessage": "!!!General", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 27, + "line": 25, "column": 19 }, "end": { - "line": 30, + "line": 28, "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!", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 31, + "line": 29, "column": 14 }, "end": { - "line": 34, + "line": 32, "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": 35, + "line": 33, "column": 17 }, "end": { - "line": 38, + "line": 36, "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": 39, + "line": 37, "column": 22 }, "end": { - "line": 42, + "line": 40, "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": 43, + "line": 41, "column": 18 }, "end": { - "line": 46, + "line": 44, "column": 3 } }, @@ -82,11 +82,11 @@ "defaultMessage": "!!!Password", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 47, + "line": 45, "column": 18 }, "end": { - "line": 50, + "line": 48, "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": 51, + "line": 49, "column": 22 }, "end": { - "line": 54, + "line": 52, "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 {lockShortcut}.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 55, + "line": 53, "column": 12 }, "end": { - "line": 58, + "line": 56, "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": 59, + "line": 57, "column": 24 }, "end": { - "line": 62, + "line": 60, "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": 63, + "line": 61, "column": 20 }, "end": { - "line": 66, + "line": 64, "column": 3 } }, @@ -147,11 +147,11 @@ "defaultMessage": "!!!Language", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 67, + "line": 65, "column": 20 }, "end": { - "line": 70, + "line": 68, "column": 3 } }, @@ -160,11 +160,11 @@ "defaultMessage": "!!!Updates", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 71, + "line": 69, "column": 19 }, "end": { - "line": 74, + "line": 72, "column": 3 } }, @@ -173,11 +173,11 @@ "defaultMessage": "!!!Appearance", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 75, + "line": 73, "column": 22 }, "end": { - "line": 78, + "line": 76, "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": 79, + "line": 77, "column": 25 }, "end": { - "line": 82, + "line": 80, "column": 3 } }, @@ -199,11 +199,11 @@ "defaultMessage": "!!!Write your accent color in a CSS-compatible format. (Default: {defaultAccentColor})", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 83, + "line": 81, "column": 19 }, "end": { - "line": 86, + "line": 84, "column": 3 } }, @@ -212,11 +212,11 @@ "defaultMessage": "!!!Privacy", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 87, + "line": 85, "column": 19 }, "end": { - "line": 90, + "line": 88, "column": 3 } }, @@ -225,11 +225,11 @@ "defaultMessage": "!!!Advanced", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 91, + "line": 89, "column": 20 }, "end": { - "line": 94, + "line": 92, "column": 3 } }, @@ -238,11 +238,11 @@ "defaultMessage": "!!!Help us to translate Ferdi into your language.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 95, + "line": 93, "column": 19 }, "end": { - "line": 98, + "line": 96, "column": 3 } }, @@ -251,11 +251,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": 99, + "line": 97, "column": 28 }, "end": { - "line": 102, + "line": 100, "column": 3 } }, @@ -264,11 +264,11 @@ "defaultMessage": "!!!Cache", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 103, + "line": 101, "column": 20 }, "end": { - "line": 106, + "line": 104, "column": 3 } }, @@ -277,11 +277,11 @@ "defaultMessage": "!!!Ferdi cache is currently using {size} of disk space.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 107, + "line": 105, "column": 13 }, "end": { - "line": 110, + "line": 108, "column": 3 } }, @@ -290,11 +290,11 @@ "defaultMessage": "!!!Couldn't clear all cache", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 111, + "line": 109, "column": 19 }, "end": { - "line": 114, + "line": 112, "column": 3 } }, @@ -303,11 +303,11 @@ "defaultMessage": "!!!Clear cache", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 115, + "line": 113, "column": 23 }, "end": { - "line": 118, + "line": 116, "column": 3 } }, @@ -316,11 +316,11 @@ "defaultMessage": "!!!Ferdi Profile", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 119, + "line": 117, "column": 27 }, "end": { - "line": 122, + "line": 120, "column": 3 } }, @@ -329,11 +329,11 @@ "defaultMessage": "!!!Open Profile folder", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 123, + "line": 121, "column": 32 }, "end": { - "line": 126, + "line": 124, "column": 3 } }, @@ -342,11 +342,11 @@ "defaultMessage": "!!!Open Service Recipes folder", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 127, + "line": 125, "column": 39 }, "end": { - "line": 130, + "line": 128, "column": 3 } }, @@ -355,11 +355,11 @@ "defaultMessage": "!!!Check for updates", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 131, + "line": 129, "column": 25 }, "end": { - "line": 134, + "line": 132, "column": 3 } }, @@ -368,11 +368,11 @@ "defaultMessage": "!!!Restart & install update", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 135, + "line": 133, "column": 23 }, "end": { - "line": 138, + "line": 136, "column": 3 } }, @@ -381,11 +381,11 @@ "defaultMessage": "!!!Is searching for update", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 139, + "line": 137, "column": 25 }, "end": { - "line": 142, + "line": 140, "column": 3 } }, @@ -394,11 +394,11 @@ "defaultMessage": "!!!Update available, downloading...", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 143, + "line": 141, "column": 25 }, "end": { - "line": 146, + "line": 144, "column": 3 } }, @@ -407,11 +407,11 @@ "defaultMessage": "!!!You are using the latest version of Ferdi", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 147, + "line": 145, "column": 24 }, "end": { - "line": 150, + "line": 148, "column": 3 } }, @@ -420,11 +420,11 @@ "defaultMessage": "!!!Current version:", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 151, + "line": 149, "column": 18 }, "end": { - "line": 154, + "line": 152, "column": 3 } }, @@ -433,11 +433,11 @@ "defaultMessage": "!!!Changes require restart", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 155, + "line": 153, "column": 22 }, "end": { - "line": 158, + "line": 156, "column": 3 } }, @@ -446,11 +446,11 @@ "defaultMessage": "!!!Official translations are English & German. All other languages are community based translations.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 159, + "line": 157, "column": 22 }, "end": { - "line": 162, + "line": 160, "column": 3 } } diff --git a/src/i18n/messages/src/lib/Menu.json b/src/i18n/messages/src/lib/Menu.json index e8fa0d10b..373c3a64b 100644 --- a/src/i18n/messages/src/lib/Menu.json +++ b/src/i18n/messages/src/lib/Menu.json @@ -4,11 +4,11 @@ "defaultMessage": "!!!Edit", "file": "src/lib/Menu.js", "start": { - "line": 20, + "line": 19, "column": 8 }, "end": { - "line": 23, + "line": 22, "column": 3 } }, @@ -17,11 +17,11 @@ "defaultMessage": "!!!Undo", "file": "src/lib/Menu.js", "start": { - "line": 24, + "line": 23, "column": 8 }, "end": { - "line": 27, + "line": 26, "column": 3 } }, @@ -30,11 +30,11 @@ "defaultMessage": "!!!Redo", "file": "src/lib/Menu.js", "start": { - "line": 28, + "line": 27, "column": 8 }, "end": { - "line": 31, + "line": 30, "column": 3 } }, @@ -43,11 +43,11 @@ "defaultMessage": "!!!Cut", "file": "src/lib/Menu.js", "start": { - "line": 32, + "line": 31, "column": 7 }, "end": { - "line": 35, + "line": 34, "column": 3 } }, @@ -56,11 +56,11 @@ "defaultMessage": "!!!Copy", "file": "src/lib/Menu.js", "start": { - "line": 36, + "line": 35, "column": 8 }, "end": { - "line": 39, + "line": 38, "column": 3 } }, @@ -69,11 +69,11 @@ "defaultMessage": "!!!Paste", "file": "src/lib/Menu.js", "start": { - "line": 40, + "line": 39, "column": 9 }, "end": { - "line": 43, + "line": 42, "column": 3 } }, @@ -82,11 +82,11 @@ "defaultMessage": "!!!Paste And Match Style", "file": "src/lib/Menu.js", "start": { - "line": 44, + "line": 43, "column": 22 }, "end": { - "line": 47, + "line": 46, "column": 3 } }, @@ -95,11 +95,11 @@ "defaultMessage": "!!!Delete", "file": "src/lib/Menu.js", "start": { - "line": 48, + "line": 47, "column": 10 }, "end": { - "line": 51, + "line": 50, "column": 3 } }, @@ -108,11 +108,11 @@ "defaultMessage": "!!!Select All", "file": "src/lib/Menu.js", "start": { - "line": 52, + "line": 51, "column": 13 }, "end": { - "line": 55, + "line": 54, "column": 3 } }, @@ -121,11 +121,11 @@ "defaultMessage": "!!!Find in Page", "file": "src/lib/Menu.js", "start": { - "line": 56, + "line": 55, "column": 14 }, "end": { - "line": 59, + "line": 58, "column": 3 } }, @@ -134,11 +134,11 @@ "defaultMessage": "!!!Speech", "file": "src/lib/Menu.js", "start": { - "line": 60, + "line": 59, "column": 10 }, "end": { - "line": 63, + "line": 62, "column": 3 } }, @@ -147,11 +147,11 @@ "defaultMessage": "!!!Start Speaking", "file": "src/lib/Menu.js", "start": { - "line": 64, + "line": 63, "column": 17 }, "end": { - "line": 67, + "line": 66, "column": 3 } }, @@ -160,11 +160,11 @@ "defaultMessage": "!!!Stop Speaking", "file": "src/lib/Menu.js", "start": { - "line": 68, + "line": 67, "column": 16 }, "end": { - "line": 71, + "line": 70, "column": 3 } }, @@ -173,11 +173,11 @@ "defaultMessage": "!!!Start Dictation", "file": "src/lib/Menu.js", "start": { - "line": 72, + "line": 71, "column": 18 }, "end": { - "line": 75, + "line": 74, "column": 3 } }, @@ -186,11 +186,11 @@ "defaultMessage": "!!!Emoji & Symbols", "file": "src/lib/Menu.js", "start": { - "line": 76, + "line": 75, "column": 16 }, "end": { - "line": 79, + "line": 78, "column": 3 } }, @@ -199,11 +199,11 @@ "defaultMessage": "!!!Open Quick Switch", "file": "src/lib/Menu.js", "start": { - "line": 80, + "line": 79, "column": 19 }, "end": { - "line": 83, + "line": 82, "column": 3 } }, @@ -212,11 +212,11 @@ "defaultMessage": "!!!Back", "file": "src/lib/Menu.js", "start": { - "line": 84, + "line": 83, "column": 8 }, "end": { - "line": 87, + "line": 86, "column": 3 } }, @@ -225,11 +225,11 @@ "defaultMessage": "!!!Forward", "file": "src/lib/Menu.js", "start": { - "line": 88, + "line": 87, "column": 11 }, "end": { - "line": 91, + "line": 90, "column": 3 } }, @@ -238,11 +238,11 @@ "defaultMessage": "!!!Actual Size", "file": "src/lib/Menu.js", "start": { - "line": 92, + "line": 91, "column": 13 }, "end": { - "line": 95, + "line": 94, "column": 3 } }, @@ -251,11 +251,11 @@ "defaultMessage": "!!!Zoom In", "file": "src/lib/Menu.js", "start": { - "line": 96, + "line": 95, "column": 10 }, "end": { - "line": 99, + "line": 98, "column": 3 } }, @@ -264,11 +264,11 @@ "defaultMessage": "!!!Zoom Out", "file": "src/lib/Menu.js", "start": { - "line": 100, + "line": 99, "column": 11 }, "end": { - "line": 103, + "line": 102, "column": 3 } }, @@ -277,11 +277,11 @@ "defaultMessage": "!!!Toggle Full Screen", "file": "src/lib/Menu.js", "start": { - "line": 104, + "line": 103, "column": 20 }, "end": { - "line": 107, + "line": 106, "column": 3 } }, @@ -290,11 +290,11 @@ "defaultMessage": "!!!Toggle Dark Mode", "file": "src/lib/Menu.js", "start": { - "line": 108, + "line": 107, "column": 18 }, "end": { - "line": 111, + "line": 110, "column": 3 } }, @@ -303,11 +303,11 @@ "defaultMessage": "!!!Toggle Developer Tools", "file": "src/lib/Menu.js", "start": { - "line": 112, + "line": 111, "column": 18 }, "end": { - "line": 115, + "line": 114, "column": 3 } }, @@ -316,11 +316,11 @@ "defaultMessage": "!!!Toggle Todos Developer Tools", "file": "src/lib/Menu.js", "start": { - "line": 116, + "line": 115, "column": 23 }, "end": { - "line": 119, + "line": 118, "column": 3 } }, @@ -329,11 +329,11 @@ "defaultMessage": "!!!Toggle Service Developer Tools", "file": "src/lib/Menu.js", "start": { - "line": 120, + "line": 119, "column": 25 }, "end": { - "line": 123, + "line": 122, "column": 3 } }, @@ -342,11 +342,11 @@ "defaultMessage": "!!!Reload Service", "file": "src/lib/Menu.js", "start": { - "line": 124, + "line": 123, "column": 17 }, "end": { - "line": 127, + "line": 126, "column": 3 } }, @@ -355,11 +355,11 @@ "defaultMessage": "!!!Reload Ferdi", "file": "src/lib/Menu.js", "start": { - "line": 128, + "line": 127, "column": 15 }, "end": { - "line": 131, + "line": 130, "column": 3 } }, @@ -368,11 +368,11 @@ "defaultMessage": "!!!Lock Ferdi", "file": "src/lib/Menu.js", "start": { - "line": 132, + "line": 131, "column": 13 }, "end": { - "line": 135, + "line": 134, "column": 3 } }, @@ -381,11 +381,11 @@ "defaultMessage": "!!!Reload ToDos", "file": "src/lib/Menu.js", "start": { - "line": 136, + "line": 135, "column": 15 }, "end": { - "line": 139, + "line": 138, "column": 3 } }, @@ -394,11 +394,11 @@ "defaultMessage": "!!!Minimize", "file": "src/lib/Menu.js", "start": { - "line": 140, + "line": 139, "column": 12 }, "end": { - "line": 143, + "line": 142, "column": 3 } }, @@ -407,11 +407,11 @@ "defaultMessage": "!!!Close", "file": "src/lib/Menu.js", "start": { - "line": 144, + "line": 143, "column": 9 }, "end": { - "line": 147, + "line": 146, "column": 3 } }, @@ -420,11 +420,11 @@ "defaultMessage": "!!!Learn More", "file": "src/lib/Menu.js", "start": { - "line": 148, + "line": 147, "column": 13 }, "end": { - "line": 151, + "line": 150, "column": 3 } }, @@ -433,11 +433,11 @@ "defaultMessage": "!!!Changelog", "file": "src/lib/Menu.js", "start": { - "line": 152, + "line": 151, "column": 13 }, "end": { - "line": 155, + "line": 154, "column": 3 } }, @@ -446,11 +446,11 @@ "defaultMessage": "!!!Import/Export Configuration Data", "file": "src/lib/Menu.js", "start": { - "line": 156, + "line": 155, "column": 20 }, "end": { - "line": 159, + "line": 158, "column": 3 } }, @@ -459,11 +459,11 @@ "defaultMessage": "!!!Support", "file": "src/lib/Menu.js", "start": { - "line": 160, + "line": 159, "column": 11 }, "end": { - "line": 163, + "line": 162, "column": 3 } }, @@ -472,11 +472,11 @@ "defaultMessage": "!!!Copy Debug Information", "file": "src/lib/Menu.js", "start": { - "line": 164, + "line": 163, "column": 13 }, "end": { - "line": 167, + "line": 166, "column": 3 } }, @@ -485,11 +485,11 @@ "defaultMessage": "!!!Publish Debug Information", "file": "src/lib/Menu.js", "start": { - "line": 168, + "line": 167, "column": 20 }, "end": { - "line": 171, + "line": 170, "column": 3 } }, @@ -498,11 +498,11 @@ "defaultMessage": "!!!Ferdi Debug Information", "file": "src/lib/Menu.js", "start": { - "line": 172, + "line": 171, "column": 27 }, "end": { - "line": 175, + "line": 174, "column": 3 } }, @@ -511,11 +511,11 @@ "defaultMessage": "!!!Your Debug Information has been copied to your clipboard.", "file": "src/lib/Menu.js", "start": { - "line": 176, + "line": 175, "column": 23 }, "end": { - "line": 179, + "line": 178, "column": 3 } }, @@ -524,11 +524,11 @@ "defaultMessage": "!!!Unlock with Touch ID", "file": "src/lib/Menu.js", "start": { - "line": 180, + "line": 179, "column": 11 }, "end": { - "line": 183, + "line": 182, "column": 3 } }, @@ -537,11 +537,11 @@ "defaultMessage": "!!!unlock via Touch ID", "file": "src/lib/Menu.js", "start": { - "line": 184, + "line": 183, "column": 17 }, "end": { - "line": 187, + "line": 186, "column": 3 } }, @@ -550,11 +550,11 @@ "defaultMessage": "!!!Terms of Service", "file": "src/lib/Menu.js", "start": { - "line": 188, + "line": 187, "column": 7 }, "end": { - "line": 191, + "line": 190, "column": 3 } }, @@ -563,11 +563,11 @@ "defaultMessage": "!!!Privacy Statement", "file": "src/lib/Menu.js", "start": { - "line": 192, + "line": 191, "column": 11 }, "end": { - "line": 195, + "line": 194, "column": 3 } }, @@ -576,11 +576,11 @@ "defaultMessage": "!!!File", "file": "src/lib/Menu.js", "start": { - "line": 196, + "line": 195, "column": 8 }, "end": { - "line": 199, + "line": 198, "column": 3 } }, @@ -589,11 +589,11 @@ "defaultMessage": "!!!View", "file": "src/lib/Menu.js", "start": { - "line": 200, + "line": 199, "column": 8 }, "end": { - "line": 203, + "line": 202, "column": 3 } }, @@ -602,11 +602,11 @@ "defaultMessage": "!!!Services", "file": "src/lib/Menu.js", "start": { - "line": 204, + "line": 203, "column": 12 }, "end": { - "line": 207, + "line": 206, "column": 3 } }, @@ -615,11 +615,11 @@ "defaultMessage": "!!!Window", "file": "src/lib/Menu.js", "start": { - "line": 208, + "line": 207, "column": 10 }, "end": { - "line": 211, + "line": 210, "column": 3 } }, @@ -628,11 +628,11 @@ "defaultMessage": "!!!Help", "file": "src/lib/Menu.js", "start": { - "line": 212, + "line": 211, "column": 8 }, "end": { - "line": 215, + "line": 214, "column": 3 } }, @@ -641,11 +641,11 @@ "defaultMessage": "!!!About Ferdi", "file": "src/lib/Menu.js", "start": { - "line": 216, + "line": 215, "column": 9 }, "end": { - "line": 219, + "line": 218, "column": 3 } }, @@ -654,11 +654,11 @@ "defaultMessage": "!!!What's new?", "file": "src/lib/Menu.js", "start": { - "line": 220, + "line": 219, "column": 16 }, "end": { - "line": 223, + "line": 222, "column": 3 } }, @@ -667,11 +667,11 @@ "defaultMessage": "!!!Settings", "file": "src/lib/Menu.js", "start": { - "line": 224, + "line": 223, "column": 12 }, "end": { - "line": 227, + "line": 226, "column": 3 } }, @@ -680,11 +680,11 @@ "defaultMessage": "!!!Check for updates", "file": "src/lib/Menu.js", "start": { - "line": 228, + "line": 227, "column": 19 }, "end": { - "line": 231, + "line": 230, "column": 3 } }, @@ -693,11 +693,11 @@ "defaultMessage": "!!!Hide", "file": "src/lib/Menu.js", "start": { - "line": 232, + "line": 231, "column": 8 }, "end": { - "line": 235, + "line": 234, "column": 3 } }, @@ -706,11 +706,11 @@ "defaultMessage": "!!!Hide Others", "file": "src/lib/Menu.js", "start": { - "line": 236, + "line": 235, "column": 14 }, "end": { - "line": 239, + "line": 238, "column": 3 } }, @@ -719,11 +719,11 @@ "defaultMessage": "!!!Unhide", "file": "src/lib/Menu.js", "start": { - "line": 240, + "line": 239, "column": 10 }, "end": { - "line": 243, + "line": 242, "column": 3 } }, @@ -732,11 +732,11 @@ "defaultMessage": "!!!Auto-hide menu bar", "file": "src/lib/Menu.js", "start": { - "line": 244, + "line": 243, "column": 19 }, "end": { - "line": 247, + "line": 246, "column": 3 } }, @@ -745,11 +745,11 @@ "defaultMessage": "!!!Quit", "file": "src/lib/Menu.js", "start": { - "line": 248, + "line": 247, "column": 8 }, "end": { - "line": 251, + "line": 250, "column": 3 } }, @@ -758,11 +758,11 @@ "defaultMessage": "!!!Add New Service...", "file": "src/lib/Menu.js", "start": { - "line": 252, + "line": 251, "column": 17 }, "end": { - "line": 255, + "line": 254, "column": 3 } }, @@ -771,11 +771,11 @@ "defaultMessage": "!!!Add New Workspace...", "file": "src/lib/Menu.js", "start": { - "line": 256, + "line": 255, "column": 19 }, "end": { - "line": 259, + "line": 258, "column": 3 } }, @@ -784,11 +784,11 @@ "defaultMessage": "!!!Open workspace drawer", "file": "src/lib/Menu.js", "start": { - "line": 260, + "line": 259, "column": 23 }, "end": { - "line": 263, + "line": 262, "column": 3 } }, @@ -797,11 +797,11 @@ "defaultMessage": "!!!Close workspace drawer", "file": "src/lib/Menu.js", "start": { - "line": 264, + "line": 263, "column": 24 }, "end": { - "line": 267, + "line": 266, "column": 3 } }, @@ -810,11 +810,11 @@ "defaultMessage": "!!!Activate next service...", "file": "src/lib/Menu.js", "start": { - "line": 268, + "line": 267, "column": 23 }, "end": { - "line": 271, + "line": 270, "column": 3 } }, @@ -823,11 +823,11 @@ "defaultMessage": "!!!Activate previous service...", "file": "src/lib/Menu.js", "start": { - "line": 272, + "line": 271, "column": 27 }, "end": { - "line": 275, + "line": 274, "column": 3 } }, @@ -836,11 +836,11 @@ "defaultMessage": "!!!Disable notifications & audio", "file": "src/lib/Menu.js", "start": { - "line": 276, + "line": 275, "column": 11 }, "end": { - "line": 279, + "line": 278, "column": 3 } }, @@ -849,11 +849,11 @@ "defaultMessage": "!!!Enable notifications & audio", "file": "src/lib/Menu.js", "start": { - "line": 280, + "line": 279, "column": 13 }, "end": { - "line": 283, + "line": 282, "column": 3 } }, @@ -862,11 +862,11 @@ "defaultMessage": "!!!Workspaces", "file": "src/lib/Menu.js", "start": { - "line": 284, + "line": 283, "column": 14 }, "end": { - "line": 287, + "line": 286, "column": 3 } }, @@ -875,11 +875,11 @@ "defaultMessage": "!!!Default", "file": "src/lib/Menu.js", "start": { - "line": 288, + "line": 287, "column": 20 }, "end": { - "line": 291, + "line": 290, "column": 3 } }, @@ -888,11 +888,11 @@ "defaultMessage": "!!!Todos", "file": "src/lib/Menu.js", "start": { - "line": 292, + "line": 291, "column": 9 }, "end": { - "line": 295, + "line": 294, "column": 3 } }, @@ -901,11 +901,11 @@ "defaultMessage": "!!!Open Todos drawer", "file": "src/lib/Menu.js", "start": { - "line": 296, + "line": 295, "column": 19 }, "end": { - "line": 299, + "line": 298, "column": 3 } }, @@ -914,11 +914,11 @@ "defaultMessage": "!!!Close Todos drawer", "file": "src/lib/Menu.js", "start": { - "line": 300, + "line": 299, "column": 20 }, "end": { - "line": 303, + "line": 302, "column": 3 } }, @@ -927,11 +927,11 @@ "defaultMessage": "!!!Enable Todos", "file": "src/lib/Menu.js", "start": { - "line": 304, + "line": 303, "column": 15 }, "end": { - "line": 307, + "line": 306, "column": 3 } }, @@ -940,11 +940,11 @@ "defaultMessage": "!!!Home", "file": "src/lib/Menu.js", "start": { - "line": 308, + "line": 307, "column": 17 }, "end": { - "line": 311, + "line": 310, "column": 3 } } diff --git a/src/index.js b/src/index.js index f6573d8f5..563ad08ed 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,6 @@ /* eslint-disable import/first */ -import { app, BrowserWindow, shell, ipcMain, session } from 'electron'; +import { app, BrowserWindow, ipcMain, session } from 'electron'; import { emptyDirSync, ensureFileSync } from 'fs-extra'; import { join } from 'path'; @@ -34,7 +34,7 @@ import { appId } from './package.json'; // eslint-disable-line import/no-unresol import './electron/exception'; import { asarPath } from './helpers/asar-helpers'; -import { isValidExternalURL } from './helpers/url-helpers'; +import { openExternalUrl } from './helpers/url-helpers'; import userAgent from './helpers/userAgent-helpers'; const debug = require('debug')('Ferdi:App'); @@ -344,10 +344,7 @@ const createWindow = () => { mainWindow.webContents.on('new-window', (e, url) => { debug('Open url', url); e.preventDefault(); - - if (isValidExternalURL(url)) { - shell.openExternal(url); - } + openExternalUrl(url); }); if (settings.get('startMinimized')) { diff --git a/src/lib/Menu.js b/src/lib/Menu.js index e4056e536..d34cfc4e6 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js @@ -1,7 +1,5 @@ -import { clipboard, shell } from 'electron'; -import { - app, Menu, dialog, systemPreferences, -} from '@electron/remote'; +import { clipboard } from 'electron'; +import { app, Menu, dialog, systemPreferences } from '@electron/remote'; import { autorun, observable } from 'mobx'; import { defineMessages } from 'react-intl'; import { CUSTOM_WEBSITE_RECIPE_ID, GITHUB_FERDI_URL, LIVE_API_FERDI_WEBSITE } from '../config'; @@ -15,6 +13,7 @@ import { todoActions } from '../features/todos/actions'; import { workspaceActions } from '../features/workspaces/actions'; import { workspaceStore } from '../features/workspaces/index'; import apiBase, { termsBase } from '../api/apiBase'; +import { openExternalUrl } from '../helpers/url-helpers'; const menuItems = defineMessages({ edit: { @@ -514,15 +513,15 @@ const _titleBarTemplateFactory = (intl, locked) => [ submenu: [ { label: intl.formatMessage(menuItems.learnMore), - click() { shell.openExternal(LIVE_API_FERDI_WEBSITE); }, + click() { openExternalUrl(LIVE_API_FERDI_WEBSITE, true); }, }, { label: intl.formatMessage(menuItems.changelog), - click() { shell.openExternal(`${GITHUB_FERDI_URL}/ferdi/blob/master/CHANGELOG.md`); }, + click() { openExternalUrl(`${GITHUB_FERDI_URL}/ferdi/blob/master/CHANGELOG.md`, true); }, }, { label: intl.formatMessage(menuItems.importExportData), - click() { shell.openExternal(apiBase(false)); }, + click() { openExternalUrl(apiBase(false), true); }, enabled: !locked, }, { @@ -540,18 +539,18 @@ const _titleBarTemplateFactory = (intl, locked) => [ }, { label: intl.formatMessage(menuItems.support), - click() { shell.openExternal(`${LIVE_API_FERDI_WEBSITE}/contact`); }, + click() { openExternalUrl(`${LIVE_API_FERDI_WEBSITE}/contact`, true); }, }, { type: 'separator', }, { label: intl.formatMessage(menuItems.tos), - click() { shell.openExternal(`${termsBase()}/terms`); }, + click() { openExternalUrl(`${termsBase()}/terms`, true); }, }, { label: intl.formatMessage(menuItems.privacy), - click() { shell.openExternal(`${termsBase()}/privacy`); }, + click() { openExternalUrl(`${termsBase()}/privacy`, true); }, }, ], }, diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 72ddc2927..9c8cce679 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js @@ -1,4 +1,4 @@ -import { ipcRenderer, shell } from 'electron'; +import { ipcRenderer } from 'electron'; import { app, screen, @@ -33,7 +33,7 @@ import { getServiceIdsFromPartitions, removeServicePartitionDirectory, } from '../helpers/service-helpers'; -import { isValidExternalURL } from '../helpers/url-helpers'; +import { openExternalUrl } from '../helpers/url-helpers'; import { sleep } from '../helpers/async-helpers'; const debug = require('debug')('Ferdi:AppStore'); @@ -388,13 +388,9 @@ export default class AppStore extends Store { } } + // Ideally(?) this should be merged with the 'shell-helpers' functionality @action _openExternalUrl({ url }) { - const parsedUrl = new URL(url); - debug('open external url', parsedUrl); - - if (isValidExternalURL(url)) { - shell.openExternal(url); - } + openExternalUrl(new URL(url)); } @action _checkForUpdates() { diff --git a/src/webview/contextMenuBuilder.js b/src/webview/contextMenuBuilder.js index 602ce06f5..126fa4086 100644 --- a/src/webview/contextMenuBuilder.js +++ b/src/webview/contextMenuBuilder.js @@ -6,13 +6,12 @@ * * Source: https://github.com/electron-userland/electron-spellchecker/blob/master/src/context-menu-builder.js */ -import { - clipboard, ipcRenderer, nativeImage, shell, -} from 'electron'; +import { clipboard, ipcRenderer, nativeImage } from 'electron'; import { Menu, MenuItem } from '@electron/remote'; import { shortcutKey, isMac } from '../environment'; import { SEARCH_ENGINE_NAMES, SEARCH_ENGINE_URLS } from '../config'; +import { openExternalUrl } from '../helpers/url-helpers'; const { URL } = require('url'); @@ -170,7 +169,7 @@ module.exports = class ContextMenuBuilder { const openLink = new MenuItem({ label: this.stringTable.openLinkUrl(), click: () => { - shell.openExternal(menuInfo.linkURL); + openExternalUrl(menuInfo.linkURL, true); }, }); @@ -299,7 +298,7 @@ module.exports = class ContextMenuBuilder { label: this.stringTable.searchWith({ searchEngine: SEARCH_ENGINE_NAMES[menuInfo.searchEngine] }), click: () => { const url = SEARCH_ENGINE_URLS[menuInfo.searchEngine]({ searchTerm: encodeURIComponent(menuInfo.selectionText) }); - shell.openExternal(url); + openExternalUrl(url, true); }, }); @@ -555,7 +554,7 @@ module.exports = class ContextMenuBuilder { label: this.stringTable.openInBrowser(), enabled: true, click: () => { - shell.openExternal(menuInfo.pageURL); + openExternalUrl(menuInfo.pageURL, true); }, })); -- cgit v1.2.3-54-g00ecf From 59e503fdc61802bd9f9fac2c030c2192bd95c4ce Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sun, 15 Aug 2021 20:27:45 +0530 Subject: fix: Fix issue with shortcut accelerators not working on macos where symbols were used for shift/alt keys --- src/components/services/tabs/TabItem.js | 6 +- src/environment.js | 18 +++--- .../workspaces/components/WorkspaceDrawerItem.js | 4 +- src/lib/Menu.js | 72 +++++++++++----------- src/webview/contextMenuBuilder.js | 16 ++--- 5 files changed, 58 insertions(+), 58 deletions(-) (limited to 'src/components') diff --git a/src/components/services/tabs/TabItem.js b/src/components/services/tabs/TabItem.js index 6a6d2c8c5..6ad925670 100644 --- a/src/components/services/tabs/TabItem.js +++ b/src/components/services/tabs/TabItem.js @@ -10,7 +10,7 @@ import ms from 'ms'; import { observable, autorun } from 'mobx'; import ServiceModel from '../../../models/Service'; -import { shortcutKey } from '../../../environment'; +import { cmdOrCtrlShortcutKey } from '../../../environment'; const IS_SERVICE_DEBUGGING_ENABLED = ( localStorage.getItem('debug') || '' @@ -201,7 +201,7 @@ class TabItem extends Component { { label: intl.formatMessage(messages.reload), click: reload, - accelerator: `${shortcutKey()}+R`, + accelerator: `${cmdOrCtrlShortcutKey()}+R`, }, { label: intl.formatMessage(messages.edit), @@ -307,7 +307,7 @@ class TabItem extends Component { onClick={clickHandler} onContextMenu={() => menu.popup(getCurrentWindow())} data-tip={`${service.name} ${ - shortcutIndex <= 9 ? `(${shortcutKey(false)}+${shortcutIndex})` : '' + shortcutIndex <= 9 ? `(${cmdOrCtrlShortcutKey(false)}+${shortcutIndex})` : '' }`} > diff --git a/src/environment.js b/src/environment.js index f2a889be4..f8a51b207 100644 --- a/src/environment.js +++ b/src/environment.js @@ -79,17 +79,17 @@ export const is64Bit = osArch.match(/64/); const ctrlKey = isMac ? '⌘' : 'Ctrl'; const cmdKey = isMac ? 'Cmd' : 'Ctrl'; -export const altKey = isMac ? '⌥' : 'Alt'; -export const shiftKey = isMac ? '⇧' : 'Shift'; +export const altKey = (isAccelerator = true) => (!isAccelerator && isMac ? '⌥' : 'Alt'); +export const shiftKey = (isAccelerator = true) => (!isAccelerator && isMac ? '⇧' : 'Shift'); // Platform specific shortcut keys -export const shortcutKey = (isAccelerator = true) => (isAccelerator ? cmdKey : ctrlKey); -export const lockFerdiShortcutKey = (isAccelerator = true) => `${shortcutKey(isAccelerator)}+${shiftKey}+L`; -export const todosToggleShortcutKey = (isAccelerator = true) => `${shortcutKey(isAccelerator)}+T`; -export const workspaceToggleShortcutKey = (isAccelerator = true) => `${shortcutKey(isAccelerator)}+D`; -export const muteFerdiShortcutKey = (isAccelerator = true) => `${shortcutKey(isAccelerator)}+${shiftKey}+M`; -export const addNewServiceShortcutKey = (isAccelerator = true) => `${shortcutKey(isAccelerator)}+N`; -export const settingsShortcutKey = (isAccelerator = true) => `${shortcutKey(isAccelerator)}+${isMac ? ',' : 'P'}`; +export const cmdOrCtrlShortcutKey = (isAccelerator = true) => (isAccelerator ? cmdKey : ctrlKey); +export const lockFerdiShortcutKey = (isAccelerator = true) => `${cmdOrCtrlShortcutKey(isAccelerator)}+${shiftKey(isAccelerator)}+L`; +export const todosToggleShortcutKey = (isAccelerator = true) => `${cmdOrCtrlShortcutKey(isAccelerator)}+T`; +export const workspaceToggleShortcutKey = (isAccelerator = true) => `${cmdOrCtrlShortcutKey(isAccelerator)}+D`; +export const muteFerdiShortcutKey = (isAccelerator = true) => `${cmdOrCtrlShortcutKey(isAccelerator)}+${shiftKey(isAccelerator)}+M`; +export const addNewServiceShortcutKey = (isAccelerator = true) => `${cmdOrCtrlShortcutKey(isAccelerator)}+N`; +export const settingsShortcutKey = (isAccelerator = true) => `${cmdOrCtrlShortcutKey(isAccelerator)}+${isMac ? ',' : 'P'}`; let api; let wsApi; diff --git a/src/features/workspaces/components/WorkspaceDrawerItem.js b/src/features/workspaces/components/WorkspaceDrawerItem.js index fff607330..252158364 100644 --- a/src/features/workspaces/components/WorkspaceDrawerItem.js +++ b/src/features/workspaces/components/WorkspaceDrawerItem.js @@ -5,7 +5,7 @@ import { observer } from 'mobx-react'; import injectSheet from 'react-jss'; import classnames from 'classnames'; import { defineMessages, intlShape } from 'react-intl'; -import { altKey, shortcutKey } from '../../../environment'; +import { altKey, cmdOrCtrlShortcutKey } from '../../../environment'; const messages = defineMessages({ noServicesAddedYet: { @@ -125,7 +125,7 @@ class WorkspaceDrawerItem extends Component { onContextMenuEditClick && contextMenu.popup(getCurrentWindow()) } data-tip={`${ - shortcutIndex <= 9 ? `(${shortcutKey(false)}+${altKey}+${shortcutIndex})` : '' + shortcutIndex <= 9 ? `(${cmdOrCtrlShortcutKey(false)}+${altKey(false)}+${shortcutIndex})` : '' }`} > [ { label: intl.formatMessage(menuItems.edit), - accelerator: `${altKey}+E`, + accelerator: `${altKey()}+E`, submenu: [ { label: intl.formatMessage(menuItems.undo), @@ -332,22 +332,22 @@ const _titleBarTemplateFactory = (intl, locked) => [ }, { label: intl.formatMessage(menuItems.cut), - accelerator: `${shortcutKey()}+X`, + accelerator: `${cmdOrCtrlShortcutKey()}+X`, role: 'cut', }, { label: intl.formatMessage(menuItems.copy), - accelerator: `${shortcutKey()}+C`, + accelerator: `${cmdOrCtrlShortcutKey()}+C`, role: 'copy', }, { label: intl.formatMessage(menuItems.paste), - accelerator: `${shortcutKey()}+V`, + accelerator: `${cmdOrCtrlShortcutKey()}+V`, role: 'paste', }, { label: intl.formatMessage(menuItems.pasteAndMatchStyle), - accelerator: `${shortcutKey()}+${shiftKey}+V`, // Override the accelerator since this adds new key combo in macos + accelerator: `${cmdOrCtrlShortcutKey()}+${shiftKey()}+V`, // Override the accelerator since this adds new key combo in macos role: 'pasteAndMatchStyle', click() { getActiveWebview().pasteAndMatchStyle(); @@ -359,14 +359,14 @@ const _titleBarTemplateFactory = (intl, locked) => [ }, { label: intl.formatMessage(menuItems.selectAll), - accelerator: `${shortcutKey()}+A`, + accelerator: `${cmdOrCtrlShortcutKey()}+A`, role: 'selectall', }, ], }, { label: intl.formatMessage(menuItems.view), - accelerator: `${altKey}+V`, + accelerator: `${altKey()}+V`, visible: !locked, submenu: [ { @@ -374,7 +374,7 @@ const _titleBarTemplateFactory = (intl, locked) => [ }, { label: intl.formatMessage(menuItems.openQuickSwitch), - accelerator: `${shortcutKey()}+S`, + accelerator: `${cmdOrCtrlShortcutKey()}+S`, click() { window.ferdi.features.quickSwitch.state.isModalVisible = true; }, @@ -384,7 +384,7 @@ const _titleBarTemplateFactory = (intl, locked) => [ }, { label: intl.formatMessage(menuItems.findInPage), - accelerator: `${shortcutKey()}+F`, + accelerator: `${cmdOrCtrlShortcutKey()}+F`, click() { // Check if there is a service active if (!window.ferdi.stores.services.active) return; @@ -405,14 +405,14 @@ const _titleBarTemplateFactory = (intl, locked) => [ }, { label: intl.formatMessage(menuItems.back), - accelerator: `${shortcutKey()}+Left`, + accelerator: `${cmdOrCtrlShortcutKey()}+Left`, click() { getActiveWebview().goBack(); }, }, { label: intl.formatMessage(menuItems.forward), - accelerator: `${shortcutKey()}+Right`, + accelerator: `${cmdOrCtrlShortcutKey()}+Right`, click() { getActiveWebview().goForward(); }, @@ -422,7 +422,7 @@ const _titleBarTemplateFactory = (intl, locked) => [ }, { label: intl.formatMessage(menuItems.resetZoom), - accelerator: `${shortcutKey()}+0`, + accelerator: `${cmdOrCtrlShortcutKey()}+0`, role: 'resetZoom', click() { getActiveWebview().setZoomLevel(0); @@ -430,7 +430,7 @@ const _titleBarTemplateFactory = (intl, locked) => [ }, { label: intl.formatMessage(menuItems.zoomIn), - accelerator: `${shortcutKey()}+plus`, + accelerator: `${cmdOrCtrlShortcutKey()}+plus`, role: 'zoomIn', click() { const activeService = getActiveWebview(); @@ -442,7 +442,7 @@ const _titleBarTemplateFactory = (intl, locked) => [ }, { label: intl.formatMessage(menuItems.zoomOut), - accelerator: `${shortcutKey()}+-`, + accelerator: `${cmdOrCtrlShortcutKey()}+-`, role: 'zoomOut', click() { const activeService = getActiveWebview(); @@ -462,7 +462,7 @@ const _titleBarTemplateFactory = (intl, locked) => [ { label: intl.formatMessage(menuItems.toggleDarkMode), type: 'checkbox', - accelerator: `${shortcutKey()}+${shiftKey}+D`, + accelerator: `${cmdOrCtrlShortcutKey()}+${shiftKey()}+D`, checked: window.ferdi.stores.settings.app.darkMode, click: () => { window.ferdi.actions.settings.update({ @@ -477,13 +477,13 @@ const _titleBarTemplateFactory = (intl, locked) => [ }, { label: intl.formatMessage(menuItems.services), - accelerator: `${altKey}+S`, + accelerator: `${altKey()}+S`, visible: !locked, submenu: [], }, { label: intl.formatMessage(menuItems.workspaces), - accelerator: `${altKey}+W`, + accelerator: `${altKey()}+W`, submenu: [], visible: !locked && workspaceStore.isFeatureEnabled, }, @@ -508,7 +508,7 @@ const _titleBarTemplateFactory = (intl, locked) => [ }, { label: intl.formatMessage(menuItems.help), - accelerator: `${altKey}+H`, + accelerator: `${altKey()}+H`, role: 'help', submenu: [ { @@ -611,13 +611,13 @@ export default class FranzMenu { type: 'separator', }, { label: intl.formatMessage(menuItems.toggleDevTools), - accelerator: `${shortcutKey()}+${altKey}+I`, + accelerator: `${cmdOrCtrlShortcutKey()}+${altKey()}+I`, click: (menuItem, browserWindow) => { browserWindow.webContents.toggleDevTools(); }, }, { label: intl.formatMessage(menuItems.toggleServiceDevTools), - accelerator: `${shortcutKey()}+${shiftKey}+${altKey}+I`, + accelerator: `${cmdOrCtrlShortcutKey()}+${shiftKey()}+${altKey()}+I`, click: () => { this.actions.service.openDevToolsForActiveService(); }, @@ -627,7 +627,7 @@ export default class FranzMenu { if (this.stores.features.features.isTodosEnabled) { tpl[1].submenu.push({ label: intl.formatMessage(menuItems.toggleTodosDevTools), - accelerator: `${shortcutKey()}+${shiftKey}+${altKey}+O`, + accelerator: `${cmdOrCtrlShortcutKey()}+${shiftKey()}+${altKey()}+O`, click: () => { const webview = document.querySelector('#todos-panel webview'); if (webview) this.actions.todos.openDevTools(); @@ -638,7 +638,7 @@ export default class FranzMenu { tpl[1].submenu.unshift({ label: intl.formatMessage(menuItems.reloadService), id: 'reloadService', // TODO: needed? - accelerator: `${shortcutKey()}+R`, + accelerator: `${cmdOrCtrlShortcutKey()}+R`, click: () => { if (this.stores.user.isLoggedIn && this.stores.services.enabled.length > 0) { @@ -653,13 +653,13 @@ export default class FranzMenu { }, }, { label: intl.formatMessage(menuItems.reloadFerdi), - accelerator: `${shortcutKey()}+${shiftKey}+R`, + accelerator: `${cmdOrCtrlShortcutKey()}+${shiftKey()}+R`, click: () => { window.location.reload(); }, }, { label: intl.formatMessage(menuItems.reloadTodos), - accelerator: `${shortcutKey()}+${shiftKey}+${altKey}+R`, + accelerator: `${cmdOrCtrlShortcutKey()}+${shiftKey()}+${altKey()}+R`, click: () => { this.actions.todos.reload(); }, @@ -715,7 +715,7 @@ export default class FranzMenu { tpl.unshift({ label: isMac ? app.name : intl.formatMessage(menuItems.file), - accelerator: `${altKey}+F`, + accelerator: `${altKey()}+F`, submenu: [ { label: intl.formatMessage(menuItems.about), @@ -831,7 +831,7 @@ export default class FranzMenu { { label: intl.formatMessage(menuItems.quit), role: 'quit', - accelerator: `${shortcutKey()}+Q`, + accelerator: `${cmdOrCtrlShortcutKey()}+Q`, click() { app.quit(); }, @@ -882,22 +882,22 @@ export default class FranzMenu { type: 'separator', }, { label: intl.formatMessage(menuItems.activateNextService), - accelerator: `${shortcutKey()}+tab`, + accelerator: `${cmdOrCtrlShortcutKey()}+tab`, click: () => this.actions.service.setActiveNext(), visible: !cmdAltShortcutsVisibile, }, { label: intl.formatMessage(menuItems.activateNextService), - accelerator: `${shortcutKey()}+${altKey}+right`, + accelerator: `${cmdOrCtrlShortcutKey()}+${altKey()}+right`, click: () => this.actions.service.setActiveNext(), visible: cmdAltShortcutsVisibile, }, { label: intl.formatMessage(menuItems.activatePreviousService), - accelerator: `${shortcutKey()}+${shiftKey}+tab`, + accelerator: `${cmdOrCtrlShortcutKey()}+${shiftKey()}+tab`, click: () => this.actions.service.setActivePrev(), visible: !cmdAltShortcutsVisibile, }, { label: intl.formatMessage(menuItems.activatePreviousService), - accelerator: `${shortcutKey()}+${altKey}+left`, + accelerator: `${cmdOrCtrlShortcutKey()}+${altKey()}+left`, click: () => this.actions.service.setActivePrev(), visible: cmdAltShortcutsVisibile, }, { @@ -912,7 +912,7 @@ export default class FranzMenu { services.allDisplayed.forEach((service, i) => (menu.push({ label: this._getServiceName(service), - accelerator: i < 9 ? `${shortcutKey()}+${i + 1}` : null, + accelerator: i < 9 ? `${cmdOrCtrlShortcutKey()}+${i + 1}` : null, type: 'radio', checked: service.isActive, click: () => { @@ -929,7 +929,7 @@ export default class FranzMenu { type: 'separator', }, { label: intl.formatMessage(menuItems.serviceGoHome), - accelerator: `${shortcutKey()}+${shiftKey}+H`, + accelerator: `${cmdOrCtrlShortcutKey()}+${shiftKey()}+H`, click: () => this.actions.service.reloadActive(), }); } @@ -945,7 +945,7 @@ export default class FranzMenu { // Add new workspace item: menu.push({ label: intl.formatMessage(menuItems.addNewWorkspace), - accelerator: `${shortcutKey()}+${shiftKey}+N`, + accelerator: `${cmdOrCtrlShortcutKey()}+${shiftKey()}+N`, click: () => { workspaceActions.openWorkspaceSettings(); }, @@ -974,7 +974,7 @@ export default class FranzMenu { // Default workspace menu.push({ label: intl.formatMessage(menuItems.defaultWorkspace), - accelerator: `${shortcutKey()}+${altKey}+0`, + accelerator: `${cmdOrCtrlShortcutKey()}+${altKey()}+0`, type: 'radio', checked: !activeWorkspace, click: () => { @@ -985,7 +985,7 @@ export default class FranzMenu { // Workspace items workspaces.forEach((workspace, i) => menu.push({ label: workspace.name, - accelerator: i < 9 ? `${shortcutKey()}+${altKey}+${i + 1}` : null, + accelerator: i < 9 ? `${cmdOrCtrlShortcutKey()}+${altKey()}+${i + 1}` : null, type: 'radio', checked: activeWorkspace ? workspace.id === activeWorkspace.id : false, click: () => { diff --git a/src/webview/contextMenuBuilder.js b/src/webview/contextMenuBuilder.js index 126fa4086..8c39e6d04 100644 --- a/src/webview/contextMenuBuilder.js +++ b/src/webview/contextMenuBuilder.js @@ -8,7 +8,7 @@ */ import { clipboard, ipcRenderer, nativeImage } from 'electron'; import { Menu, MenuItem } from '@electron/remote'; -import { shortcutKey, isMac } from '../environment'; +import { cmdOrCtrlShortcutKey, isMac } from '../environment'; import { SEARCH_ENGINE_NAMES, SEARCH_ENGINE_URLS } from '../config'; import { openExternalUrl } from '../helpers/url-helpers'; @@ -375,7 +375,7 @@ module.exports = class ContextMenuBuilder { const webContents = this.getWebContents(); menu.append(new MenuItem({ label: this.stringTable.cut(), - accelerator: `${shortcutKey()}+X`, + accelerator: `${cmdOrCtrlShortcutKey()}+X`, enabled: menuInfo.editFlags.canCut, click: () => webContents.cut(), })); @@ -390,7 +390,7 @@ module.exports = class ContextMenuBuilder { const webContents = this.getWebContents(); menu.append(new MenuItem({ label: this.stringTable.copy(), - accelerator: `${shortcutKey()}+C`, + accelerator: `${cmdOrCtrlShortcutKey()}+C`, enabled: menuInfo.editFlags.canCopy, click: () => webContents.copy(), })); @@ -405,7 +405,7 @@ module.exports = class ContextMenuBuilder { const webContents = this.getWebContents(); menu.append(new MenuItem({ label: this.stringTable.paste(), - accelerator: `${shortcutKey()}+V`, + accelerator: `${cmdOrCtrlShortcutKey()}+V`, enabled: menuInfo.editFlags.canPaste, click: () => webContents.paste(), })); @@ -423,7 +423,7 @@ module.exports = class ContextMenuBuilder { menu.append( new MenuItem({ label: this.stringTable.pasteAndMatchStyle(), - accelerator: `${shortcutKey()}+Shift+V`, + accelerator: `${cmdOrCtrlShortcutKey()}+Shift+V`, click: () => webContents.pasteAndMatchStyle(), }), ); @@ -489,7 +489,7 @@ module.exports = class ContextMenuBuilder { const webContents = this.getWebContents(); menu.append(new MenuItem({ label: this.stringTable.goBack(), - accelerator: `${shortcutKey()}+left`, + accelerator: `${cmdOrCtrlShortcutKey()}+left`, enabled: webContents.canGoBack(), click: () => webContents.goBack(), })); @@ -504,7 +504,7 @@ module.exports = class ContextMenuBuilder { const webContents = this.getWebContents(); menu.append(new MenuItem({ label: this.stringTable.goForward(), - accelerator: `${shortcutKey()}+right`, + accelerator: `${cmdOrCtrlShortcutKey()}+right`, enabled: webContents.canGoForward(), click: () => webContents.goForward(), })); @@ -535,7 +535,7 @@ module.exports = class ContextMenuBuilder { const baseURL = new URL(menuInfo.pageURL); menu.append(new MenuItem({ label: this.stringTable.goToHomePage(), - accelerator: `${shortcutKey()}+Home`, + accelerator: `${cmdOrCtrlShortcutKey()}+Home`, enabled: true, click: () => { // webContents.loadURL(baseURL.origin); -- cgit v1.2.3-54-g00ecf From a014e37da75789ed8ecf80714e1dcd9252a4ff38 Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Sun, 15 Aug 2021 18:30:13 +0200 Subject: chore: dependency cleanup (#1794) - removed unnecessary smoothscroll-polyfill (electron is Chromium-only) - removed deprecated mobx-react-devtools (can be used through browser extension) - changed settings icon back to original (now called mdi-cog) - removed electron-rebuild (handled by electron-builder install-app-deps) --- package-lock.json | 629 +-------------------------------------- package.json | 5 - src/app.js | 5 - src/components/layout/Sidebar.js | 3 +- uidev/src/app.tsx | 2 - 5 files changed, 2 insertions(+), 642 deletions(-) (limited to 'src/components') diff --git a/package-lock.json b/package-lock.json index f8a9042bf..343110a57 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6468,18 +6468,6 @@ "@babel/types": "^7.3.0" } }, - "@types/cacheable-request": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", - "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", - "dev": true, - "requires": { - "@types/http-cache-semantics": "*", - "@types/keyv": "*", - "@types/node": "*", - "@types/responselike": "*" - } - }, "@types/color": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@types/color/-/color-3.0.2.tgz", @@ -6553,12 +6541,6 @@ "integrity": "sha512-h4lTMgMJctJybDp8CQrxTUiiYmedihHWkjnF/8Pxseu2S6Nlfcy8kwboQ8yejh456rP2yWoEVm1sS/FVsfM48w==", "dev": true }, - "@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", - "dev": true - }, "@types/istanbul-lib-coverage": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", @@ -6589,15 +6571,6 @@ "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", "dev": true }, - "@types/keyv": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.2.tgz", - "integrity": "sha512-/FvAK2p4jQOaJ6CGDHJTqZcUtbZe820qIeTg7o0Shg7drB4JHeL+V/dhSaly7NXx6u8eSee+r7coT+yuJEvDLg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "@types/lodash": { "version": "4.14.172", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.172.tgz", @@ -6692,15 +6665,6 @@ "@types/react": "^16" } }, - "@types/responselike": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", - "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "@types/route-parser": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@types/route-parser/-/route-parser-0.1.3.tgz", @@ -9269,6 +9233,7 @@ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, + "optional": true, "requires": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -9600,12 +9565,6 @@ } } }, - "cacheable-lookup": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", - "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", - "dev": true - }, "cacheable-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", @@ -9968,12 +9927,6 @@ "restore-cursor": "^3.1.0" } }, - "cli-spinners": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.0.tgz", - "integrity": "sha512-t+4/y50K/+4xcCRosKkA7W4gTr1MySvLV0q+PxmG7FJ5g+66ChKurYjxBCjHggHH3HA5Hh9cy+lcUGWDqVH+4Q==", - "dev": true - }, "cli-table": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.6.tgz", @@ -12788,407 +12741,6 @@ "react-virtualized": "^9.7.6" } }, - "electron-rebuild": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/electron-rebuild/-/electron-rebuild-2.3.5.tgz", - "integrity": "sha512-1sQ1DRtQGpglFhc3urD4olMJzt/wxlbnAAsf+WY2xHf5c50ZovivZvCXSpVgTOP9f4TzOMvelWyspyfhxQKHzQ==", - "dev": true, - "requires": { - "@malept/cross-spawn-promise": "^1.1.1", - "colors": "^1.3.3", - "debug": "^4.1.1", - "detect-libc": "^1.0.3", - "fs-extra": "^9.0.1", - "got": "^11.7.0", - "lzma-native": "^6.0.1", - "node-abi": "^2.19.2", - "node-gyp": "^7.1.0", - "ora": "^5.1.0", - "tar": "^6.0.5", - "yargs": "^16.0.0" - }, - "dependencies": { - "@sindresorhus/is": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz", - "integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g==", - "dev": true - }, - "@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", - "dev": true, - "requires": { - "defer-to-connect": "^2.0.0" - } - }, - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "cacheable-request": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", - "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", - "dev": true, - "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" - } - }, - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "dev": true - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "dev": true - }, - "decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "requires": { - "mimic-response": "^3.1.0" - } - }, - "defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "dev": true - }, - "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "requires": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, - "requires": { - "minipass": "^3.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "got": { - "version": "11.8.2", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.2.tgz", - "integrity": "sha512-D0QywKgIe30ODs+fm8wMZiAcZjypcCodPNuMz5H9Mny7RJ+IjJ10BdmGW7OM7fHXP+O7r6ZwapQ/YQmMSvB0UQ==", - "dev": true, - "requires": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.1", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, - "keyv": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.0.3.tgz", - "integrity": "sha512-zdGa2TOpSZPq5mU6iowDARnMBZgtCqJ11dJROFi6tg6kTn4nuUdU09lFyLFSaHrWqpIJ+EBq4E8/Dc0Vx5vLdA==", - "dev": true, - "requires": { - "json-buffer": "3.0.1" - } - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - }, - "mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true - }, - "minipass": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", - "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dev": true, - "requires": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - }, - "node-gyp": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-7.1.2.tgz", - "integrity": "sha512-CbpcIo7C3eMu3dL1c3d0xw449fHIGALIJsRP4DDPHpyiW8vcriNY7ubh9TE4zEKfSxscY7PjeFnshE7h75ynjQ==", - "dev": true, - "requires": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.3", - "nopt": "^5.0.0", - "npmlog": "^4.1.2", - "request": "^2.88.2", - "rimraf": "^3.0.2", - "semver": "^7.3.2", - "tar": "^6.0.2", - "which": "^2.0.2" - } - }, - "nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "p-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", - "dev": true - }, - "responselike": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", - "integrity": "sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==", - "dev": true, - "requires": { - "lowercase-keys": "^2.0.0" - } - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "tar": { - "version": "6.1.6", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.6.tgz", - "integrity": "sha512-oaWyu5dQbHaYcyZCTfyPpC+VmI62/OM2RTUYavTk1MDr1cwW5Boi3baeYQKiZbY2uSQJGr+iMOzb/JFxLrft+g==", - "dev": true, - "requires": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - } - }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - }, - "yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true - } - } - }, "electron-to-chromium": { "version": "1.3.799", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.799.tgz", @@ -17099,24 +16651,6 @@ "sshpk": "^1.7.0" } }, - "http2-wrapper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", - "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", - "dev": true, - "requires": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" - }, - "dependencies": { - "quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true - } - } - }, "https-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", @@ -17820,12 +17354,6 @@ } } }, - "is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "dev": true - }, "is-lambda": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", @@ -20978,50 +20506,6 @@ "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", "integrity": "sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0=" }, - "lzma-native": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/lzma-native/-/lzma-native-6.0.1.tgz", - "integrity": "sha512-O6oWF0xe1AFvOCjU8uOZBZ/lhjaMNwHfVNaqVMqmoQXlRwBcFWpCAToiZOdXcKVMdo/5s/D0a2QgA5laMErxHQ==", - "dev": true, - "requires": { - "node-addon-api": "^1.6.0", - "node-pre-gyp": "^0.11.0", - "readable-stream": "^2.3.5", - "rimraf": "^2.7.1" - }, - "dependencies": { - "node-addon-api": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz", - "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==", - "dev": true - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, "macos-notification-state": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/macos-notification-state/-/macos-notification-state-1.3.5.tgz", @@ -21897,12 +21381,6 @@ "react-lifecycles-compat": "^3.0.2" } }, - "mobx-react-devtools": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/mobx-react-devtools/-/mobx-react-devtools-6.1.1.tgz", - "integrity": "sha512-nc5IXLdEUFLn3wZal65KF3/JFEFd+mbH4KTz/IG5BOPyw7jo8z29w/8qm7+wiCyqVfUIgJ1gL4+HVKmcXIOgqA==", - "dev": true - }, "mobx-react-form": { "version": "1.35.1", "resolved": "https://registry.npmjs.org/mobx-react-form/-/mobx-react-form-1.35.1.tgz", @@ -23388,100 +22866,6 @@ "word-wrap": "^1.2.3" } }, - "ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "dev": true, - "requires": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "ordered-read-streams": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", @@ -26234,12 +25618,6 @@ "path-parse": "^1.0.6" } }, - "resolve-alpn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.0.tgz", - "integrity": "sha512-e4FNQs+9cINYMO5NMFc6kOUCdohjqFPSgMuwuZAOUWqrfWsen+Yjy5qZFkV5K7VO7tFSLKcUL97olkED7sCBHA==", - "dev": true - }, "resolve-cwd": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", @@ -27075,11 +26453,6 @@ "integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==", "dev": true }, - "smoothscroll-polyfill": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/smoothscroll-polyfill/-/smoothscroll-polyfill-0.4.4.tgz", - "integrity": "sha512-TK5ZA9U5RqCwMpfoMq/l1mrH0JAR7y7KRvOBx0n2869aLxch+gT9GhN3yUfjiw+d/DiF1mKo14+hd62JyMmoBg==" - }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", diff --git a/package.json b/package.json index 06f35647b..27dab9d6e 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ "engine-strict": true, "scripts": { "prepare": "husky install", - "prestart": "npm run rebuild", "start": "electron ./build", "start:local": "cross-env USE_LOCAL_API=1 npm start", "start:live": "cross-env USE_LIVE_API=1 npm start", @@ -29,7 +28,6 @@ "manage-translations": "node ./src/i18n/manage-translations.js", "prebuild": "preval-build-info-cli && gulp build", "build": "electron-builder", - "rebuild": "electron-rebuild --force-abi=98", "commit": "git-cz", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -u", "contributors": "all-contributors", @@ -124,7 +122,6 @@ "react-tooltip": "4.2.21", "route-parser": "0.0.5", "semver": "7.3.5", - "smoothscroll-polyfill": "0.4.4", "sqlite3": "5.0.0", "tar": "4.4.15", "tslib": "2.3.1", @@ -171,7 +168,6 @@ "electron": "13.1.9", "electron-builder": "22.12.0", "electron-notarize": "1.1.0", - "electron-rebuild": "2.3.5", "eslint": "7.32.0", "eslint-config-airbnb": "18.2.1", "eslint-config-airbnb-typescript": "12.3.1", @@ -200,7 +196,6 @@ "jest": "27.0.6", "kebab-case": "1.0.1", "lerna": "4.0.0", - "mobx-react-devtools": "6.1.1", "mocha": "9.0.3", "node-abi": "2.30.0", "prettier": "2.3.2", diff --git a/src/app.js b/src/app.js index 39b50cb33..e0d2dbc5a 100644 --- a/src/app.js +++ b/src/app.js @@ -6,8 +6,6 @@ import { Provider } from 'mobx-react'; import { syncHistoryWithStore, RouterStore } from 'mobx-react-router'; import { hashHistory } from 'react-router'; -import smoothScroll from 'smoothscroll-polyfill'; - import ServerApi from './api/server/ServerApi'; import LocalApi from './api/server/LocalApi'; import storeFactory from './stores'; @@ -19,9 +17,6 @@ import TouchBarFactory from './lib/TouchBar'; import I18N from './I18n'; import Routes from './routes'; -// Add Polyfills -smoothScroll.polyfill(); - // Basic electron Setup webFrame.setVisualZoomLevelLimits(1, 1); diff --git a/src/components/layout/Sidebar.js b/src/components/layout/Sidebar.js index daa5642c3..a9fb73f33 100644 --- a/src/components/layout/Sidebar.js +++ b/src/components/layout/Sidebar.js @@ -216,8 +216,7 @@ export default @inject('stores', 'actions') @observer class Sidebar extends Comp className="sidebar__button sidebar__button--settings" data-tip={`${intl.formatMessage(messages.settings)} (${settingsShortcutKey(false)})`} > - {/* TODO: Because of https://github.com/Templarian/MaterialDesign-Webfont/issues/81 bug in @mdi/font in 5.9.55, added `mdi-memory` as a fallback */} - + { (this.props.stores.app.updateStatus === this.props.stores.app.updateStatusTypes.AVAILABLE || this.props.stores.app.updateStatus === this.props.stores.app.updateStatusTypes.DOWNLOADED) && ( diff --git a/uidev/src/app.tsx b/uidev/src/app.tsx index ecc7020c1..970cb40e3 100644 --- a/uidev/src/app.tsx +++ b/uidev/src/app.tsx @@ -1,7 +1,6 @@ import { Property } from 'csstype'; import { Classes } from 'jss'; import { observer } from 'mobx-react'; -import DevTools from 'mobx-react-devtools'; import React from 'react'; import injectSheet from 'react-jss'; @@ -122,7 +121,6 @@ export const App = injectSheet(styles)( ))} - )), ); -- cgit v1.2.3-54-g00ecf From ee7d9b0af920cc2021028faa52efe78d6ce0880a Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sat, 21 Aug 2021 10:04:59 +0530 Subject: chore: remove 'shareFranz' feature since its always turned off for Ferdi --- package.json | 2 +- src/components/layout/AppLayout.js | 2 - src/features/nightlyBuilds/Component.js | 4 +- src/features/shareFranz/Component.js | 159 --------------------- src/features/shareFranz/index.js | 35 ----- src/features/shareFranz/store.js | 8 -- src/i18n/locales/defaultMessages.json | 96 ------------- src/i18n/locales/en-US.json | 7 - .../src/features/shareFranz/Component.json | 93 ------------ src/stores/FeaturesStore.js | 2 - 10 files changed, 3 insertions(+), 405 deletions(-) delete mode 100644 src/features/shareFranz/Component.js delete mode 100644 src/features/shareFranz/index.js delete mode 100644 src/features/shareFranz/store.js delete mode 100644 src/i18n/messages/src/features/shareFranz/Component.json (limited to 'src/components') diff --git a/package.json b/package.json index 87e18f1c7..47b0806cb 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "dev": "cross-env NODE_ENV=development gulp dev", "test": "jest", "test:watch": "jest --watch", - "lint": "eslint \"{src,packages,uidev}/**/*.{js,jsx,ts,tsx}\" --quiet --fix", + "lint": "eslint \"{src,scripts,packages,uidev}/**/*.{js,jsx,ts,tsx}\" --quiet --fix", "manage-translations": "node ./src/i18n/manage-translations.js", "prebuild": "preval-build-info-cli && gulp build", "build": "electron-builder", diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index d5e1deb39..00d7a759b 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js @@ -7,7 +7,6 @@ import injectSheet from 'react-jss'; 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'; @@ -204,7 +203,6 @@ class AppLayout extends Component { /> )} - diff --git a/src/features/nightlyBuilds/Component.js b/src/features/nightlyBuilds/Component.js index 5a809aaf2..6e5941948 100644 --- a/src/features/nightlyBuilds/Component.js +++ b/src/features/nightlyBuilds/Component.js @@ -55,7 +55,7 @@ const styles = () => ({ }, }); -export default @injectSheet(styles) @inject('stores', 'actions') @observer class nightlyBuildsModal extends Component { +export default @injectSheet(styles) @inject('stores', 'actions') @observer class NightlyBuildsModal extends Component { static contextTypes = { intl: intlShape, }; @@ -124,7 +124,7 @@ export default @injectSheet(styles) @inject('stores', 'actions') @observer class } } -nightlyBuildsModal.wrappedComponent.propTypes = { +NightlyBuildsModal.wrappedComponent.propTypes = { stores: PropTypes.shape({ settings: PropTypes.instanceOf(SettingsStore).isRequired, }).isRequired, diff --git a/src/features/shareFranz/Component.js b/src/features/shareFranz/Component.js deleted file mode 100644 index cc2e81b70..000000000 --- a/src/features/shareFranz/Component.js +++ /dev/null @@ -1,159 +0,0 @@ -import React, { Component } from 'react'; -import PropTypes from 'prop-types'; -import { observer, inject } from 'mobx-react'; -import injectSheet from 'react-jss'; -import { defineMessages, intlShape } from 'react-intl'; -import { Button } from '@meetfranz/forms'; -import { H1, Icon } from '@meetfranz/ui'; - -import { - mdiHeart, mdiEmail, mdiFacebookBox, mdiTwitter, -} from '@mdi/js'; -import Modal from '../../components/ui/Modal'; -import { state } from './store'; -import ServicesStore from '../../stores/ServicesStore'; - -const messages = defineMessages({ - headline: { - id: 'feature.shareFranz.headline', - defaultMessage: '!!!Ferdi is better together!', - }, - text: { - id: 'feature.shareFranz.text', - defaultMessage: '!!!Tell your friends and colleagues how awesome Ferdi is and help us to spread the word.', - }, - actionsEmail: { - id: 'feature.shareFranz.action.email', - defaultMessage: '!!!Share as email', - }, - actionsFacebook: { - id: 'feature.shareFranz.action.facebook', - defaultMessage: '!!!Share on Facebook', - }, - actionsTwitter: { - id: 'feature.shareFranz.action.twitter', - defaultMessage: '!!!Share on Twitter', - }, - shareTextEmail: { - id: 'feature.shareFranz.shareText.email', - defaultMessage: '!!! I\'ve added {count} services to Ferdi! Get the free app for WhatsApp, Messenger, Slack, Skype and co at www.meetfranz.com', - }, - shareTextTwitter: { - id: 'feature.shareFranz.shareText.twitter', - defaultMessage: '!!! I\'ve added {count} services to Ferdi! Get the free app for WhatsApp, Messenger, Slack, Skype and co at www.meetfranz.com /cc @FranzMessenger', - }, -}); - -const styles = (theme) => ({ - modal: { - width: '80%', - maxWidth: 600, - background: theme.styleTypes.primary.accent, - textAlign: 'center', - color: theme.styleTypes.primary.contrast, - }, - heartContainer: { - display: 'flex', - justifyContent: 'center', - borderRadius: '100%', - background: theme.brandDanger, - padding: 20, - width: 100, - height: 100, - margin: [-70, 'auto', 30], - }, - heart: { - fill: theme.styleTypes.primary.contrast, - }, - headline: { - textAlign: 'center', - fontSize: 40, - marginBottom: 20, - }, - actions: { - display: 'flex', - justifyContent: 'space-between', - marginTop: 30, - }, - cta: { - background: theme.styleTypes.primary.contrast, - color: `${theme.styleTypes.primary.accent} !important`, - - '& svg': { - fill: theme.styleTypes.primary.accent, - }, - }, -}); - -export default @injectSheet(styles) @inject('stores') @observer class ShareFranzModal extends Component { - static propTypes = { - classes: PropTypes.object.isRequired, - }; - - static contextTypes = { - intl: intlShape, - }; - - close() { - state.isModalVisible = false; - } - - render() { - const { isModalVisible } = state; - - const { - classes, - stores, - } = this.props; - - const serviceCount = stores.services.all.length; - - const { intl } = this.context; - - return ( - -
- -
-

- {intl.formatMessage(messages.headline)} -

-

{intl.formatMessage(messages.text)}

-
-
-
- ); - } -} - -ShareFranzModal.wrappedComponent.propTypes = { - stores: PropTypes.shape({ - services: PropTypes.instanceOf(ServicesStore).isRequired, - }).isRequired, -}; diff --git a/src/features/shareFranz/index.js b/src/features/shareFranz/index.js deleted file mode 100644 index 9add0f65e..000000000 --- a/src/features/shareFranz/index.js +++ /dev/null @@ -1,35 +0,0 @@ -import { reaction } from 'mobx'; -import ms from 'ms'; -import { state as ModalState } from './store'; - -export { default as Component } from './Component'; - -const debug = require('debug')('Ferdi:feature:shareFranz'); - -const state = ModalState; - -export default function initialize(stores) { - debug('Initialize shareFerdi feature'); - - window.ferdi.features.shareFerdi = { - state, - }; - - function showModal() { - debug('Would have showed share window'); - } - - reaction( - () => stores.user.isLoggedIn, - () => { - setTimeout(() => { - if (stores.settings.stats.appStarts % 50 === 0) { - showModal(); - } - }, ms('2s')); - }, - { - fireImmediately: true, - }, - ); -} diff --git a/src/features/shareFranz/store.js b/src/features/shareFranz/store.js deleted file mode 100644 index c637e9eff..000000000 --- a/src/features/shareFranz/store.js +++ /dev/null @@ -1,8 +0,0 @@ -import { observable } from 'mobx'; - -const defaultState = { - isModalVisible: false, - lastShown: null, -}; - -export const state = observable(defaultState); diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json index 5e4ffd113..bc3024c88 100644 --- a/src/i18n/locales/defaultMessages.json +++ b/src/i18n/locales/defaultMessages.json @@ -5262,102 +5262,6 @@ ], "path": "src/features/recipeConnectionLost/components/WebControls.json" }, - { - "descriptors": [ - { - "defaultMessage": "!!!Ferdi is better together!", - "end": { - "column": 3, - "line": 20 - }, - "file": "src/features/shareFranz/Component.js", - "id": "feature.shareFranz.headline", - "start": { - "column": 12, - "line": 17 - } - }, - { - "defaultMessage": "!!!Tell your friends and colleagues how awesome Ferdi is and help us to spread the word.", - "end": { - "column": 3, - "line": 24 - }, - "file": "src/features/shareFranz/Component.js", - "id": "feature.shareFranz.text", - "start": { - "column": 8, - "line": 21 - } - }, - { - "defaultMessage": "!!!Share as email", - "end": { - "column": 3, - "line": 28 - }, - "file": "src/features/shareFranz/Component.js", - "id": "feature.shareFranz.action.email", - "start": { - "column": 16, - "line": 25 - } - }, - { - "defaultMessage": "!!!Share on Facebook", - "end": { - "column": 3, - "line": 32 - }, - "file": "src/features/shareFranz/Component.js", - "id": "feature.shareFranz.action.facebook", - "start": { - "column": 19, - "line": 29 - } - }, - { - "defaultMessage": "!!!Share on Twitter", - "end": { - "column": 3, - "line": 36 - }, - "file": "src/features/shareFranz/Component.js", - "id": "feature.shareFranz.action.twitter", - "start": { - "column": 18, - "line": 33 - } - }, - { - "defaultMessage": "!!! I've added {count} services to Ferdi! Get the free app for WhatsApp, Messenger, Slack, Skype and co at www.meetfranz.com", - "end": { - "column": 3, - "line": 40 - }, - "file": "src/features/shareFranz/Component.js", - "id": "feature.shareFranz.shareText.email", - "start": { - "column": 18, - "line": 37 - } - }, - { - "defaultMessage": "!!! I've added {count} services to Ferdi! Get the free app for WhatsApp, Messenger, Slack, Skype and co at www.meetfranz.com /cc @FranzMessenger", - "end": { - "column": 3, - "line": 44 - }, - "file": "src/features/shareFranz/Component.js", - "id": "feature.shareFranz.shareText.twitter", - "start": { - "column": 20, - "line": 41 - } - } - ], - "path": "src/features/shareFranz/Component.json" - }, { "descriptors": [ { diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json index 1afa2c183..fe2eb6ec3 100644 --- a/src/i18n/locales/en-US.json +++ b/src/i18n/locales/en-US.json @@ -26,13 +26,6 @@ "feature.quickSwitch.info": "Select a service with TAB, ↑ and ↓. Open a service with ENTER.", "feature.quickSwitch.search": "Search...", "feature.quickSwitch.title": "QuickSwitch", - "feature.shareFranz.action.email": "Send as email", - "feature.shareFranz.action.facebook": "Share on Facebook", - "feature.shareFranz.action.twitter": "Share on Twitter", - "feature.shareFranz.headline": "Ferdi is better together!", - "feature.shareFranz.shareText.email": "I've added {count} services to Ferdi! Get the free app for WhatsApp, Messenger, Slack, Skype and co at www.getferdi.com", - "feature.shareFranz.shareText.twitter": "I've added {count} services to Ferdi! Get the free app for WhatsApp, Messenger, Slack, Skype and co at www.getferdi.com /cc @FerdiMessenger", - "feature.shareFranz.text": "Tell your friends and colleagues how awesome Ferdi is and help us to spread the word.", "global.api.unhealthy": "Can't connect to Ferdi online services", "global.notConnectedToTheInternet": "You are not connected to the internet.", "global.spellchecker.useDefault": "Use System Default ({default})", diff --git a/src/i18n/messages/src/features/shareFranz/Component.json b/src/i18n/messages/src/features/shareFranz/Component.json deleted file mode 100644 index 428bd5fbc..000000000 --- a/src/i18n/messages/src/features/shareFranz/Component.json +++ /dev/null @@ -1,93 +0,0 @@ -[ - { - "id": "feature.shareFranz.headline", - "defaultMessage": "!!!Ferdi is better together!", - "file": "src/features/shareFranz/Component.js", - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 20, - "column": 3 - } - }, - { - "id": "feature.shareFranz.text", - "defaultMessage": "!!!Tell your friends and colleagues how awesome Ferdi is and help us to spread the word.", - "file": "src/features/shareFranz/Component.js", - "start": { - "line": 21, - "column": 8 - }, - "end": { - "line": 24, - "column": 3 - } - }, - { - "id": "feature.shareFranz.action.email", - "defaultMessage": "!!!Share as email", - "file": "src/features/shareFranz/Component.js", - "start": { - "line": 25, - "column": 16 - }, - "end": { - "line": 28, - "column": 3 - } - }, - { - "id": "feature.shareFranz.action.facebook", - "defaultMessage": "!!!Share on Facebook", - "file": "src/features/shareFranz/Component.js", - "start": { - "line": 29, - "column": 19 - }, - "end": { - "line": 32, - "column": 3 - } - }, - { - "id": "feature.shareFranz.action.twitter", - "defaultMessage": "!!!Share on Twitter", - "file": "src/features/shareFranz/Component.js", - "start": { - "line": 33, - "column": 18 - }, - "end": { - "line": 36, - "column": 3 - } - }, - { - "id": "feature.shareFranz.shareText.email", - "defaultMessage": "!!! I've added {count} services to Ferdi! Get the free app for WhatsApp, Messenger, Slack, Skype and co at www.meetfranz.com", - "file": "src/features/shareFranz/Component.js", - "start": { - "line": 37, - "column": 18 - }, - "end": { - "line": 40, - "column": 3 - } - }, - { - "id": "feature.shareFranz.shareText.twitter", - "defaultMessage": "!!! I've added {count} services to Ferdi! Get the free app for WhatsApp, Messenger, Slack, Skype and co at www.meetfranz.com /cc @FranzMessenger", - "file": "src/features/shareFranz/Component.js", - "start": { - "line": 41, - "column": 20 - }, - "end": { - "line": 44, - "column": 3 - } - } -] \ No newline at end of file diff --git a/src/stores/FeaturesStore.js b/src/stores/FeaturesStore.js index ac623c258..0dff2fda2 100644 --- a/src/stores/FeaturesStore.js +++ b/src/stores/FeaturesStore.js @@ -13,7 +13,6 @@ 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'; import settingsWS from '../features/settingsWS'; import communityRecipes from '../features/communityRecipes'; @@ -73,7 +72,6 @@ export default class FeaturesStore extends Store { 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); settingsWS(this.stores, this.actions); communityRecipes(this.stores, this.actions); -- cgit v1.2.3-54-g00ecf From 31024050307a8944fa404aefdffdabd4aa122718 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sat, 21 Aug 2021 15:45:09 +0530 Subject: chore: added TODO and regenerated file [skip ci] --- src/components/ui/AppLoader/index.js | 1 + src/i18n/locales/defaultMessages.json | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src/components') diff --git a/src/components/ui/AppLoader/index.js b/src/components/ui/AppLoader/index.js index 31d7ca249..bbfd5de28 100644 --- a/src/components/ui/AppLoader/index.js +++ b/src/components/ui/AppLoader/index.js @@ -8,6 +8,7 @@ import { shuffleArray } from '../../../helpers/array-helpers'; import styles from './styles'; +// TODO: Need to externalize for i18n const textList = shuffleArray([ 'Adding free features', 'Making application usable', diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json index bc3024c88..418bf6bea 100644 --- a/src/i18n/locales/defaultMessages.json +++ b/src/i18n/locales/defaultMessages.json @@ -1035,52 +1035,52 @@ "defaultMessage": "!!!Your services have been updated.", "end": { "column": 3, - "line": 32 + "line": 31 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.servicesUpdated", "start": { "column": 19, - "line": 29 + "line": 28 } }, { "defaultMessage": "!!!Reload services", "end": { "column": 3, - "line": 36 + "line": 35 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.buttonReloadServices", "start": { "column": 24, - "line": 33 + "line": 32 } }, { "defaultMessage": "!!!Could not load services and user information", "end": { "column": 3, - "line": 40 + "line": 39 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.requiredRequestsFailed", "start": { "column": 26, - "line": 37 + "line": 36 } }, { "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": 45 + "line": 44 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.authRequestFailed", "start": { "column": 21, - "line": 41 + "line": 40 } } ], -- cgit v1.2.3-54-g00ecf From 4f584111d57e4d91ce189cf2f0b5c2e3e2b8dc4d Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sat, 21 Aug 2021 20:12:28 +0530 Subject: style: consistent syntax style [skip ci] --- docs/example-feature/index.js | 4 +- docs/example-feature/store.js | 8 ++- src/components/services/content/ServiceWebview.js | 4 +- src/features/announcements/index.js | 4 +- src/features/appearance/index.js | 4 +- src/features/quickSwitch/Component.js | 8 ++- src/features/settingsWS/index.js | 4 +- src/features/todos/index.js | 8 +-- src/features/workspaces/index.js | 8 +-- src/stores/ServicesStore.js | 61 ++++++++++++++++------- src/stores/SettingsStore.js | 12 +++-- src/stores/UIStore.js | 8 ++- 12 files changed, 83 insertions(+), 50 deletions(-) (limited to 'src/components') diff --git a/docs/example-feature/index.js b/docs/example-feature/index.js index 84ee84b5e..0ce068e26 100644 --- a/docs/example-feature/index.js +++ b/docs/example-feature/index.js @@ -29,8 +29,6 @@ export default function initAnnouncements(stores, actions) { resetState(); // Reset state to default } }, - { - fireImmediately: true, - }, + { fireImmediately: true }, ); } diff --git a/docs/example-feature/store.js b/docs/example-feature/store.js index de27eae86..9fc86de36 100644 --- a/docs/example-feature/store.js +++ b/docs/example-feature/store.js @@ -18,8 +18,12 @@ export class ExampleFeatureStore extends Store { // Update the name on the state when the request resolved reaction( - () => this.getNameRequest.result, - name => this._setName(name), + () => ( + this.getNameRequest.result + ), + (name) => { + this._setName(name); + }, ); } diff --git a/src/components/services/content/ServiceWebview.js b/src/components/services/content/ServiceWebview.js index 3b499a5db..c0f48793a 100644 --- a/src/components/services/content/ServiceWebview.js +++ b/src/components/services/content/ServiceWebview.js @@ -24,7 +24,9 @@ class ServiceWebview extends Component { super(props); reaction( - () => this.webview, + () => ( + this.webview + ), () => { if (this.webview && this.webview.view) { this.webview.view.addEventListener('console-message', (e) => { diff --git a/src/features/announcements/index.js b/src/features/announcements/index.js index 28f0b10ed..19930c5b1 100644 --- a/src/features/announcements/index.js +++ b/src/features/announcements/index.js @@ -24,8 +24,6 @@ export default function initAnnouncements(stores, actions) { announcementsStore.stop(); } }, - { - fireImmediately: true, - }, + { fireImmediately: true }, ); } diff --git a/src/features/appearance/index.js b/src/features/appearance/index.js index 87651a3f4..c3425ba9c 100644 --- a/src/features/appearance/index.js +++ b/src/features/appearance/index.js @@ -235,8 +235,6 @@ export default function initAppearance(stores) { () => { updateStyle(settings.all.app); }, - { - fireImmediately: true, - }, + { fireImmediately: true }, ); } diff --git a/src/features/quickSwitch/Component.js b/src/features/quickSwitch/Component.js index 812f2c04b..78d5d94a0 100644 --- a/src/features/quickSwitch/Component.js +++ b/src/features/quickSwitch/Component.js @@ -118,8 +118,12 @@ export default @injectSheet(styles) @inject('stores', 'actions') @observer class this.openService = this.openService.bind(this); reaction( - () => ModalState.isModalVisible, - this._handleVisibilityChange, + () => ( + ModalState.isModalVisible + ), + () => { + this._handleVisibilityChange(); + }, ); } diff --git a/src/features/settingsWS/index.js b/src/features/settingsWS/index.js index 6711296da..7771421d6 100755 --- a/src/features/settingsWS/index.js +++ b/src/features/settingsWS/index.js @@ -22,8 +22,6 @@ export default function initSettingsWebSocket(stores, actions) { settingsStore.stop(); } }, - { - fireImmediately: true, - }, + { fireImmediately: true }, ); } diff --git a/src/features/todos/index.js b/src/features/todos/index.js index 1c6c9179a..55956d1d7 100644 --- a/src/features/todos/index.js +++ b/src/features/todos/index.js @@ -13,7 +13,9 @@ export default function initTodos(stores, actions) { // Toggle todos feature reaction( - () => features.features.isTodosEnabled, + () => ( + features.features.isTodosEnabled + ), (isEnabled) => { if (isEnabled) { debug('Initializing `todos` feature'); @@ -23,8 +25,6 @@ export default function initTodos(stores, actions) { todosStore.stop(); } }, - { - fireImmediately: true, - }, + { fireImmediately: true }, ); } diff --git a/src/features/workspaces/index.js b/src/features/workspaces/index.js index 3db6de5b2..83e4d9049 100644 --- a/src/features/workspaces/index.js +++ b/src/features/workspaces/index.js @@ -12,7 +12,9 @@ export default function initWorkspaces(stores, actions) { // Toggle workspace feature reaction( - () => features.features.isWorkspaceEnabled, + () => ( + features.features.isWorkspaceEnabled + ), (isEnabled) => { if (isEnabled && !workspaceStore.isFeatureActive) { debug('Initializing `workspaces` feature'); @@ -23,8 +25,6 @@ export default function initWorkspaces(stores, actions) { resetApiRequests(); } }, - { - fireImmediately: true, - }, + { fireImmediately: true }, ); } diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 2ec6a0a68..06f33cc1e 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js @@ -10,10 +10,7 @@ import Request from './lib/Request'; import CachedRequest from './lib/CachedRequest'; import { matchRoute } from '../helpers/routing-helpers'; import { isInTimeframe } from '../helpers/schedule-helpers'; -import { - getRecipeDirectory, - getDevRecipeDirectory, -} from '../helpers/recipe-helpers'; +import { getRecipeDirectory, getDevRecipeDirectory } from '../helpers/recipe-helpers'; import { workspaceStore } from '../features/workspaces'; import { KEEP_WS_LOADED_USID } from '../config'; import { SPELLCHECKER_LOCALES } from '../i18n/languages'; @@ -128,38 +125,66 @@ export default class ServicesStore extends Store { setup() { // Single key reactions for the sake of your CPU reaction( - () => this.stores.settings.app.enableSpellchecking, - () => this._shareSettingsWithServiceProcess(), + () => ( + this.stores.settings.app.enableSpellchecking + ), + () => { + this._shareSettingsWithServiceProcess(); + }, ); reaction( - () => this.stores.settings.app.spellcheckerLanguage, - () => this._shareSettingsWithServiceProcess(), + () => ( + this.stores.settings.app.spellcheckerLanguage + ), + () => { + this._shareSettingsWithServiceProcess(); + }, ); reaction( - () => this.stores.settings.app.darkMode, - () => this._shareSettingsWithServiceProcess(), + () => ( + this.stores.settings.app.darkMode + ), + () => { + this._shareSettingsWithServiceProcess(); + }, ); reaction( - () => this.stores.settings.app.adaptableDarkMode, - () => this._shareSettingsWithServiceProcess(), + () => ( + this.stores.settings.app.adaptableDarkMode + ), + () => { + this._shareSettingsWithServiceProcess(); + }, ); reaction( - () => this.stores.settings.app.universalDarkMode, - () => this._shareSettingsWithServiceProcess(), + () => ( + this.stores.settings.app.universalDarkMode + ), + () => { + this._shareSettingsWithServiceProcess(); + }, ); reaction( - () => this.stores.settings.app.searchEngine, - () => this._shareSettingsWithServiceProcess(), + () => ( + this.stores.settings.app.searchEngine + ), + () => { + this._shareSettingsWithServiceProcess(); + }, ); reaction( - () => this.stores.settings.app.clipboardNotifications, - () => this._shareSettingsWithServiceProcess(), + () => ( + this.stores.settings.app.clipboardNotifications + ), + () => { + this._shareSettingsWithServiceProcess(); + }, ); } diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index cd627c2b8..f551e1e49 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js @@ -40,7 +40,9 @@ export default class SettingsStore extends Store { await this._migrate(); reaction( - () => this.all.app.autohideMenuBar, + () => ( + this.all.app.autohideMenuBar + ), () => { const currentWindow = getCurrentWindow(); currentWindow.setMenuBarVisibility(!this.all.app.autohideMenuBar); @@ -49,15 +51,15 @@ export default class SettingsStore extends Store { ); reaction( - () => this.all.app.server, + () => ( + this.all.app.server + ), (server) => { if (server === LOCAL_SERVER) { ipcRenderer.send('startLocalServer'); } }, - { - fireImmediately: true, - }, + { fireImmediately: true }, ); // Inactivity lock timer diff --git a/src/stores/UIStore.js b/src/stores/UIStore.js index adcd776c1..be675d5ed 100644 --- a/src/stores/UIStore.js +++ b/src/stores/UIStore.js @@ -43,8 +43,12 @@ export default class UIStore extends Store { setup() { reaction( - () => this.isDarkThemeActive, - () => this._setupThemeInDOM(), + () => ( + this.isDarkThemeActive + ), + () => { + this._setupThemeInDOM(); + }, { fireImmediately: true }, ); } -- cgit v1.2.3-54-g00ecf