From 1a305a58fcb1f47b242e0867100a4996140d7bae Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Mon, 27 Jan 2020 15:41:18 +0000 Subject: [PATCH] fix: login on login License: MIT Signed-off-by: Henrique Dias --- public/locales/en/settings.json | 2 +- src/bundles/ipfs-desktop.js | 6 ++++-- src/settings/DesktopSettings.js | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/public/locales/en/settings.json b/public/locales/en/settings.json index ec29df931..d9b261666 100644 --- a/public/locales/en/settings.json +++ b/public/locales/en/settings.json @@ -30,7 +30,7 @@ "takeScreenshotDescription": "Use <0>{key1} + <2>{key2} + <3>{key3} to take screenshots and add them to your repository.", "downloadHash": "Download hash", "downloadHashDescription": "Use <0>{key1} + <2>{key2} + <3>{key3} to download the last copied hash or path to your system.", - "launchOnStartup": "Launch on startup", + "launchOnStartup": "Launch on login", "globalShortcuts": "Global Shortcuts", "globalShortcutsAre": "IPFS Desktop provides some features that can be globally accessed through keyboard shortcuts. You can enable or disable them here.", "AnalyticsToggle": { diff --git a/src/bundles/ipfs-desktop.js b/src/bundles/ipfs-desktop.js index 26f52d10f..21efbd940 100644 --- a/src/bundles/ipfs-desktop.js +++ b/src/bundles/ipfs-desktop.js @@ -34,6 +34,8 @@ if (window.ipfsDesktop) { selectDesktopSettings: state => state.ipfsDesktop, + selectDesktopPlatform: state => state.ipfsDesktop.platform, + selectDesktopVersion: () => window.ipfsDesktop.version, selectDesktopCountlyDeviceId: () => window.ipfsDesktop.countlyDeviceId, @@ -41,7 +43,7 @@ if (window.ipfsDesktop) { selectDesktopCountlyActions: () => window.ipfsDesktop.countlyActions, doDesktopStartListening: () => async ({ dispatch, store }) => { - window.ipfsDesktop.onConfigChanged(({ config, changed, success }) => { + window.ipfsDesktop.onConfigChanged(({ platform, config, changed, success }) => { const prevConfig = store.selectDesktopSettings() if (Object.keys(prevConfig).length === 0) { @@ -82,7 +84,7 @@ if (window.ipfsDesktop) { dispatch({ type: 'DESKTOP_SETTINGS_CHANGED', - payload: config + payload: config ? { ...config, platform } : undefined }) }) }, diff --git a/src/settings/DesktopSettings.js b/src/settings/DesktopSettings.js index 94a727498..86202152a 100644 --- a/src/settings/DesktopSettings.js +++ b/src/settings/DesktopSettings.js @@ -1,5 +1,4 @@ import React from 'react' -import os from 'os' import { connect } from 'redux-bundler-react' import { withTranslation, Trans } from 'react-i18next' import Box from '../components/box/Box' @@ -33,18 +32,18 @@ const CheckboxSetting = ({ children, title, ...props }) => ( const Key = ({ children }) => { children } -export function DesktopSettings ({ t, doDesktopSettingsToggle, desktopSettings }) { +export function DesktopSettings ({ t, doDesktopSettingsToggle, desktopSettings, desktopPlatform }) { return ( {t('ipfsDesktop')} doDesktopSettingsToggle('autoLaunch')} /> doDesktopSettingsToggle('ipfsOnPath')}>