From c55179998be901372b4fcc09640f0bb1871e863f Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Sat, 7 Aug 2021 21:12:07 +0800 Subject: [PATCH] [System] grab "Experimental settings" --- ui/component/settingSystem/view.jsx | 44 ++++++++++++++++++++++ ui/page/settingsAdvanced/view.jsx | 57 ----------------------------- 2 files changed, 44 insertions(+), 57 deletions(-) diff --git a/ui/component/settingSystem/view.jsx b/ui/component/settingSystem/view.jsx index 48b922d0d..770a31c80 100644 --- a/ui/component/settingSystem/view.jsx +++ b/ui/component/settingSystem/view.jsx @@ -6,7 +6,9 @@ import Card from 'component/common/card'; import { FormField } from 'component/common/form'; import SettingAutoLaunch from 'component/settingAutoLaunch'; import SettingClosingBehavior from 'component/settingClosingBehavior'; +import SettingCommentsServer from 'component/settingCommentsServer'; import SettingsRow from 'component/settingsRow'; +import SettingWalletServer from 'component/settingWalletServer'; // @if TARGET='app' const IS_MAC = process.platform === 'darwin'; @@ -98,6 +100,48 @@ export default function SettingSystem(props: Props) { {/* @endif */} + {/* @if TARGET='app' */} + + {/* Disabling below until we get downloads to work with shared subscriptions code */} + {/* + setClientSetting(SETTINGS.AUTO_DOWNLOAD, !autoDownload)} + checked={autoDownload} + label={__('Automatically download new content from my subscriptions')} + helper={__( + "The latest file from each of your subscriptions will be downloaded for quick access as soon as it's published." + )} + /> + */} + + + setDaemonSetting('max_connections_per_download', e.target.value)} + value={daemonSettings.max_connections_per_download} + > + {[1, 2, 4, 6, 10, 20].map((connectionOption) => ( + + ))} + + + + + + + {/* @endif */} + { storedPassword: false, }; - (this: any).onMaxConnectionsChange = this.onMaxConnectionsChange.bind(this); (this: any).onThemeChange = this.onThemeChange.bind(this); (this: any).onAutomaticDarkModeChange = this.onAutomaticDarkModeChange.bind(this); (this: any).onConfirmForgetPassword = this.onConfirmForgetPassword.bind(this); @@ -104,11 +101,6 @@ class SettingsAdvancedPage extends React.PureComponent { this.findFFmpeg(); } - onMaxConnectionsChange(event: SyntheticInputEvent<*>) { - const { value } = event.target; - this.setDaemonSetting('max_connections_per_download', value); - } - onThemeChange(event: SyntheticInputEvent<*>) { const { value } = event.target; @@ -166,7 +158,6 @@ class SettingsAdvancedPage extends React.PureComponent { const { storedPassword } = this.state; const noDaemonSettings = !daemonSettings || Object.keys(daemonSettings).length === 0; - const connectionOptions = [1, 2, 4, 6, 10, 20]; // @if TARGET='app' const { available: ffmpegAvailable, which: ffmpegPath } = ffmpegStatus; // @endif @@ -311,54 +302,6 @@ class SettingsAdvancedPage extends React.PureComponent { } /> {/* @endif */} - {!IS_WEB && ( - - {/* @if TARGET='app' */} - {/* - Disabling below until we get downloads to work with shared subscriptions code - setClientSetting(SETTINGS.AUTO_DOWNLOAD, !autoDownload)} - checked={autoDownload} - label={__('Automatically download new content from my subscriptions')} - helper={__( - "The latest file from each of your subscriptions will be downloaded for quick access as soon as it's published." - )} - /> */} - - - {connectionOptions.map((connectionOption) => ( - - ))} - - - - {/* @endif */} - - } - /> - )} - - {/* @if TARGET='app' */} - } /> - {/* @endif */} )}