diff --git a/static/app-strings.json b/static/app-strings.json index 7b2e6774a..0558bba20 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -156,8 +156,9 @@ "Experimental settings": "Experimental settings", "Autoplay media files": "Autoplay media files", "Autoplay video and audio files when navigating to a file, as well as the next related item when a file finishes playing.": "Autoplay video and audio files when navigating to a file, as well as the next related item when a file finishes playing.", - "Application cache": "Application cache", + "Clear application cache": "Clear application cache", "Clear Cache": "Clear Cache", + "This might fix issues that you are having. Your wallet will not be affected.": "This might fix issues that you are having. Your wallet will not be affected.", "Currency": "Currency", "US Dollars": "US Dollars", "There's nothing available at this location.": "There's nothing available at this location.", @@ -656,7 +657,6 @@ "Invalid claim ID %claimId%.": "Invalid claim ID %claimId%.", "Suggested": "Suggested", "Startup preferences": "Startup preferences", - "This will clear the application cache, and might fix issues you are having. Your wallet will not be affected. ": "This will clear the application cache, and might fix issues you are having. Your wallet will not be affected. ", "Start minimized": "Start minimized", "Improve view speed and help the LBRY network by allowing the app to cuddle up in your system tray.": "Improve view speed and help the LBRY network by allowing the app to cuddle up in your system tray.", "Content Type": "Content Type", @@ -2047,6 +2047,7 @@ "Commenting server is not set.": "Commenting server is not set.", "Comments are not currently enabled.": "Comments are not currently enabled.", "See All": "See All", + "System": "System", "Supporting content requires %lbc%": "Supporting content requires %lbc%", "With %lbc%, you can send tips to your favorite creators, or help boost their content for more people to see.": "With %lbc%, you can send tips to your favorite creators, or help boost their content for more people to see.", "Show this channel your appreciation by sending a donation in USD.": "Show this channel your appreciation by sending a donation in USD.", diff --git a/ui/component/settingAutoLaunch/view.jsx b/ui/component/settingAutoLaunch/view.jsx index 4effdabf7..f5c9cc169 100644 --- a/ui/component/settingAutoLaunch/view.jsx +++ b/ui/component/settingAutoLaunch/view.jsx @@ -6,25 +6,28 @@ import { FormField } from 'component/common/form'; type Props = { autoLaunch: string, showToast: ({}) => void, - setAutoLaunch: boolean => void, + setAutoLaunch: (boolean) => void, + noLabels?: boolean, }; function SettingAutoLaunch(props: Props) { - const { autoLaunch, setAutoLaunch } = props; + const { autoLaunch, setAutoLaunch, noLabels } = props; return ( { + onChange={(e) => { setAutoLaunch(e.target.checked); }} checked={autoLaunch} - label={__('Start minimized')} - helper={__( - 'Improve view speed and help the LBRY network by allowing the app to cuddle up in your system tray.' - )} + label={noLabels ? '' : __('Start minimized')} + helper={ + noLabels + ? '' + : __('Improve view speed and help the LBRY network by allowing the app to cuddle up in your system tray.') + } /> ); diff --git a/ui/component/settingClosingBehavior/view.jsx b/ui/component/settingClosingBehavior/view.jsx index a8560aa57..4ad423248 100644 --- a/ui/component/settingClosingBehavior/view.jsx +++ b/ui/component/settingClosingBehavior/view.jsx @@ -5,22 +5,23 @@ import { FormField } from 'component/common/form'; type Props = { toTrayWhenClosed: boolean, - setToTrayWhenClosed: boolean => void, + setToTrayWhenClosed: (boolean) => void, + noLabels?: boolean, }; function SettingClosingBehavior(props: Props) { - const { toTrayWhenClosed, setToTrayWhenClosed } = props; + const { toTrayWhenClosed, setToTrayWhenClosed, noLabels } = props; return ( { + onChange={(e) => { setToTrayWhenClosed(e.target.checked); }} checked={toTrayWhenClosed} - label={__('Leave app running in notification area when the window is closed')} + label={noLabels ? '' : __('Leave app running in notification area when the window is closed')} /> ); diff --git a/ui/component/settingSystem/index.js b/ui/component/settingSystem/index.js new file mode 100644 index 000000000..ccd1fbaab --- /dev/null +++ b/ui/component/settingSystem/index.js @@ -0,0 +1,11 @@ +import { connect } from 'react-redux'; +import { doClearCache } from 'redux/actions/app'; +import SettingSystem from './view'; + +const select = (state) => ({}); + +const perform = (dispatch) => ({ + clearCache: () => dispatch(doClearCache()), +}); + +export default connect(select, perform)(SettingSystem); diff --git a/ui/component/settingSystem/view.jsx b/ui/component/settingSystem/view.jsx new file mode 100644 index 000000000..a91803aec --- /dev/null +++ b/ui/component/settingSystem/view.jsx @@ -0,0 +1,64 @@ +// @flow +import { ALERT } from 'constants/icons'; +import React from 'react'; +import Button from 'component/button'; +import Card from 'component/common/card'; +import SettingAutoLaunch from 'component/settingAutoLaunch'; +import SettingClosingBehavior from 'component/settingClosingBehavior'; +import SettingsRow from 'component/settingsRow'; + +// @if TARGET='app' +const IS_MAC = process.platform === 'darwin'; +// @endif + +type Props = { + clearCache: () => Promise, +}; + +export default function SettingSystem(props: Props) { + const { clearCache } = props; + const [clearingCache, setClearingCache] = React.useState(false); + + return ( + + {/* @if TARGET='app' */} + {/* Auto launch in a hidden state doesn't work on mac https://github.com/Teamwork/node-auto-launch/issues/81 */} + {!IS_MAC && ( + + + + )} + {/* @endif */} + + {/* @if TARGET='app' */} + + + + {/* @endif */} + + +