1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Moving start-up switcher to Other tab

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-04-01 15:14:56 +03:00
parent 909032a535
commit f8db743bb6
2 changed files with 29 additions and 23 deletions

View File

@ -8,7 +8,6 @@ import { userStore } from "../../../common/user-store";
import { isWindows } from "../../../common/vars";
import { appPreferenceRegistry } from "../../../extensions/registries/app-preference-registry";
import { themeStore } from "../../theme.store";
import { Checkbox } from "../checkbox";
import { Input } from "../input";
import { PageLayout } from "../layout/page-layout";
import { SubTitle } from "../layout/sub-title";
@ -23,7 +22,8 @@ enum PreferencesTab {
Application = "application",
Proxy = "proxy",
Kubernetes = "kubernetes",
Extensions = "extensions"
Extensions = "extensions",
Other = "other"
}
@observer
@ -82,6 +82,11 @@ export class Preferences extends React.Component {
label="Extensions"
active={this.activeTab == PreferencesTab.Extensions}
/>
<Tab
value={PreferencesTab.Other}
label="Other"
active={this.activeTab == PreferencesTab.Other}
/>
</Tabs>
);
}
@ -107,8 +112,8 @@ export class Preferences extends React.Component {
>
{this.activeTab == PreferencesTab.Application && (
<section id="application">
<h2>Application</h2>
<section id="appearance">
<h2>Appearance</h2>
<SubTitle title="Theme"/>
<Select
options={this.themeOptions}
@ -117,11 +122,10 @@ export class Preferences extends React.Component {
/>
</section>
<hr/>
<hr className="small"/>
<section id="shell">
<h2>Terminal Shell</h2>
<SubTitle title="Shell Path"/>
<section id="shell" className="small">
<SubTitle title="Terminal Shell Path"/>
<Input
theme="round-black"
placeholder={defaultShell}
@ -133,21 +137,6 @@ export class Preferences extends React.Component {
The path of the shell that the terminal uses.
</div>
</section>
<hr/>
<section id="startup">
<FormSwitch
control={
<Switcher
checked={preferences.openAtLogin}
onChange={v => preferences.openAtLogin = v.target.checked}
name="startup"
/>
}
label="Automatically start Lens on login"
/>
</section>
</section>
)}
{this.activeTab == PreferencesTab.Proxy && (
@ -224,6 +213,23 @@ export class Preferences extends React.Component {
})}
</section>
)}
{this.activeTab == PreferencesTab.Other && (
<section id="other">
<h2>Other</h2>
<SubTitle title="Start-up"/>
<FormSwitch
control={
<Switcher
checked={preferences.openAtLogin}
onChange={v => preferences.openAtLogin = v.target.checked}
name="startup"
/>
}
label="Automatically start Lens on login"
/>
</section>
)}
</PageLayout>
);
}

View File

@ -166,7 +166,7 @@
display: flex;
flex-direction: column;
&:not(:first-child) {
&:not(:first-of-type) {
margin-top: 40px;
&.small {