Add ability to configure lens release channel (#3971)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-10-12 08:32:06 -04:00
1 parent b9cee0cbc7
commit 9c94c19a4f
4 files changed
+62 -1

No files matched your search

@@ -29,11 +29,16 @@ import { Input } from "../input";
import { isWindows } from "../../../common/vars";
import { FormSwitch, Switcher } from "../switch";
import moment from "moment-timezone";
import { CONSTANTS } from "../../../common/user-store/preferences-helpers";
const timezoneOptions: SelectOption<string>[] = moment.tz.names().map(zone => ({
label: zone,
value: zone,
}));
const updateChannelOptions: SelectOption<string>[] = Array.from(
CONSTANTS.updateChannels.entries(),
([value, { label }]) => ({ value, label }),
);
export const Application = observer(() => {
const defaultShell = process.env.SHELL
@@ -104,6 +109,18 @@ export const Application = observer(() => {
<hr />
<section id="update-channel">
<SubTitle title="Update Channel"/>
<Select
options={updateChannelOptions}
value={UserStore.getInstance().updateChannel}
onChange={({ value }: SelectOption) => UserStore.getInstance().updateChannel = value}
themeName="lens"
/>
</section>
<hr />
<section id="locale">
<SubTitle title="Locale Timezone" />
<Select