From 2a223a295f839c04cab94167c40f52045cf1056a Mon Sep 17 00:00:00 2001 From: Lauri Nevala Date: Fri, 4 Sep 2020 07:48:57 +0300 Subject: [PATCH] Re-order preferences item Signed-off-by: Lauri Nevala --- .../+preferences/kubectl-binaries.tsx | 16 +++++++++ .../components/+preferences/preferences.tsx | 35 ++++++------------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/src/renderer/components/+preferences/kubectl-binaries.tsx b/src/renderer/components/+preferences/kubectl-binaries.tsx index 2917b32bbd..7f5590bed2 100644 --- a/src/renderer/components/+preferences/kubectl-binaries.tsx +++ b/src/renderer/components/+preferences/kubectl-binaries.tsx @@ -7,11 +7,18 @@ import { SubTitle } from '../layout/sub-title'; import { UserPreferences, userStore } from '../../../common/user-store'; import { observer } from 'mobx-react'; import { Kubectl } from '../../../main/kubectl'; +import { SelectOption, Select } from '../select'; export const KubectlBinaries = observer(({ preferences }: { preferences: UserPreferences }) => { const [downloadPath, setDownloadPath] = useState(preferences.downloadBinariesPath || ""); const [binariesPath, setBinariesPath] = useState(preferences.kubectlBinariesPath || ""); + const downloadMirrorOptions: SelectOption[] = [ + { value: "default", label: "Default (Google)" }, + { value: "china", label: "China (Azure)" }, + ] + + const save = () => { preferences.downloadBinariesPath = downloadPath; preferences.kubectlBinariesPath = binariesPath; @@ -51,6 +58,15 @@ export const KubectlBinaries = observer(({ preferences }: { preferences: UserPre preferences.downloadKubectlBinaries = !preferences.downloadKubectlBinaries } /> + + (); - @observable downloadMirrorOptions: SelectOption[] = [ - { value: "default", label: "Default (Google)" }, - { value: "china", label: "China (Azure)" }, - ] - @computed get themeOptions(): SelectOption[] { return themeStore.themes.map(theme => ({ label: theme.name, @@ -122,13 +117,18 @@ export class Preferences extends React.Component { onChange={({ value }: SelectOption) => preferences.colorTheme = value} /> -

Download Mirror

- preferences.httpsProxy = v} /> + + Proxy is used only for non-cluster communication. + + +

Helm

preferences.httpsProxy = v} - /> - - Proxy is used only for non-cluster communication. - - - -

Certificate Trust

Allow untrusted Certificate Authorities}