feat(fe): enable allow background customization and auto theme switching in fe
This commit is contained in:
parent
f55581efb8
commit
939eb8e8b7
7 changed files with 176 additions and 115 deletions
|
@ -371,7 +371,7 @@
|
||||||
color: #16a085;
|
color: #16a085;
|
||||||
}
|
}
|
||||||
.theme-default a:hover {
|
.theme-default a:hover {
|
||||||
color: cc#2ecc71;
|
color: #2ecc71;
|
||||||
}
|
}
|
||||||
.theme-default input:focus {
|
.theme-default input:focus {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
|
|
|
@ -34,6 +34,7 @@ describe("PaneSettings", () => {
|
||||||
const paneSettings = new PaneSettings({
|
const paneSettings = new PaneSettings({
|
||||||
msg: coreState.msg,
|
msg: coreState.msg,
|
||||||
login: coreState.login,
|
login: coreState.login,
|
||||||
|
ui: coreState.ui,
|
||||||
update: (updater: (prevState: ICoreState) => ICoreState) => {},
|
update: (updater: (prevState: ICoreState) => ICoreState) => {},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,7 @@ export class SettingsDialog extends React.Component<Props, State, {}> {
|
||||||
<PaneSettings
|
<PaneSettings
|
||||||
login={this.props.login}
|
login={this.props.login}
|
||||||
msg={this.props.msg}
|
msg={this.props.msg}
|
||||||
|
ui={this.props.ui}
|
||||||
update={this.props.update}
|
update={this.props.update}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -576,20 +576,7 @@ export class AdminPane extends React.Component<Props, State, {}> {
|
||||||
return (
|
return (
|
||||||
<div className="font-m">
|
<div className="font-m">
|
||||||
<Container>
|
<Container>
|
||||||
<Flexbox
|
<SiteCfg
|
||||||
children={List([
|
|
||||||
<h5 className="title-m">{this.props.msg.pkg.get("siteSettings")}</h5>,
|
|
||||||
<button onClick={this.addUser} className="button-default">
|
|
||||||
{this.props.msg.pkg.get("update")}
|
|
||||||
</button>,
|
|
||||||
])}
|
|
||||||
childrenStyles={List([{}, { justifyContent: "flex-end" }])}
|
|
||||||
/>
|
|
||||||
</Container>
|
|
||||||
|
|
||||||
|
|
||||||
<Container>
|
|
||||||
<BgCfg
|
|
||||||
ui={this.props.ui}
|
ui={this.props.ui}
|
||||||
msg={this.props.msg}
|
msg={this.props.msg}
|
||||||
update={this.props.update}
|
update={this.props.update}
|
||||||
|
@ -718,20 +705,26 @@ export class AdminPane extends React.Component<Props, State, {}> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
interface BgProps {
|
interface SiteCfgProps {
|
||||||
msg: MsgProps;
|
msg: MsgProps;
|
||||||
ui: UIProps;
|
ui: UIProps;
|
||||||
update?: (updater: (prevState: ICoreState) => ICoreState) => void;
|
update?: (updater: (prevState: ICoreState) => ICoreState) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface BgState { }
|
interface SiteCfgState {}
|
||||||
export class BgCfg extends React.Component<BgProps, BgState, {}> {
|
export class SiteCfg extends React.Component<SiteCfgProps, SiteCfgState, {}> {
|
||||||
onChangeSiteName = (ev: React.ChangeEvent<HTMLInputElement>) => {
|
onChangeSiteName = (ev: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
updater().setClientCfg({ ...this.props.ui.clientCfg, siteName: ev.target.value });
|
updater().setClientCfg({
|
||||||
|
...this.props.ui.clientCfg,
|
||||||
|
siteName: ev.target.value,
|
||||||
|
});
|
||||||
this.props.update(updater().updateUI);
|
this.props.update(updater().updateUI);
|
||||||
};
|
};
|
||||||
onChangeSiteDesc = (ev: React.ChangeEvent<HTMLInputElement>) => {
|
onChangeSiteDesc = (ev: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
updater().setClientCfg({ ...this.props.ui.clientCfg, siteDesc: ev.target.value });
|
updater().setClientCfg({
|
||||||
|
...this.props.ui.clientCfg,
|
||||||
|
siteDesc: ev.target.value,
|
||||||
|
});
|
||||||
this.props.update(updater().updateUI);
|
this.props.update(updater().updateUI);
|
||||||
};
|
};
|
||||||
onChangeAllowSetBg = (enabled: boolean) => {
|
onChangeAllowSetBg = (enabled: boolean) => {
|
||||||
|
@ -782,7 +775,7 @@ export class BgCfg extends React.Component<BgProps, BgState, {}> {
|
||||||
this.props.update(updater().updateUI);
|
this.props.update(updater().updateUI);
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(p: BgProps) {
|
constructor(p: SiteCfgProps) {
|
||||||
super(p);
|
super(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -870,7 +863,9 @@ export class BgCfg extends React.Component<BgProps, BgState, {}> {
|
||||||
<div>
|
<div>
|
||||||
<Flexbox
|
<Flexbox
|
||||||
children={List([
|
children={List([
|
||||||
<h5 className="title-m">{this.props.msg.pkg.get("cfg.bg")}</h5>,
|
<h5 className="title-m">
|
||||||
|
{this.props.msg.pkg.get("siteSettings")}
|
||||||
|
</h5>,
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
<button
|
<button
|
||||||
|
@ -912,13 +907,19 @@ export class BgCfg extends React.Component<BgProps, BgState, {}> {
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
<div className="hr"></div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div className="label">{this.props.msg.pkg.get("allowSetBg")}</div>
|
<div className="label">{this.props.msg.pkg.get("allowSetBg")}</div>
|
||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
this.onChangeAllowSetBg(true);
|
this.onChangeAllowSetBg(true);
|
||||||
}}
|
}}
|
||||||
className="button-default inline-block margin-r-m"
|
className={`${
|
||||||
|
this.props.ui.clientCfg.allowSetBg
|
||||||
|
? "white-font focus-bg"
|
||||||
|
: "button-default"
|
||||||
|
} inline-block margin-r-m`}
|
||||||
>
|
>
|
||||||
{this.props.msg.pkg.get("term.enabled")}
|
{this.props.msg.pkg.get("term.enabled")}
|
||||||
</button>
|
</button>
|
||||||
|
@ -926,19 +927,29 @@ export class BgCfg extends React.Component<BgProps, BgState, {}> {
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
this.onChangeAllowSetBg(false);
|
this.onChangeAllowSetBg(false);
|
||||||
}}
|
}}
|
||||||
className="button-default inline-block margin-r-m"
|
className={`${
|
||||||
|
this.props.ui.clientCfg.allowSetBg
|
||||||
|
? "button-default"
|
||||||
|
: "white-font focus-bg"
|
||||||
|
} inline-block margin-r-m`}
|
||||||
>
|
>
|
||||||
{this.props.msg.pkg.get("term.disabled")}
|
{this.props.msg.pkg.get("term.disabled")}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="hr"></div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div className="label">{this.props.msg.pkg.get("autoTheme")}</div>
|
<div className="label">{this.props.msg.pkg.get("autoTheme")}</div>
|
||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
this.onChangeAutoTheme(true);
|
this.onChangeAutoTheme(true);
|
||||||
}}
|
}}
|
||||||
className="button-default inline-block margin-r-m"
|
className={`${
|
||||||
|
this.props.ui.clientCfg.autoTheme
|
||||||
|
? "white-font focus-bg"
|
||||||
|
: "button-default"
|
||||||
|
} inline-block margin-r-m`}
|
||||||
>
|
>
|
||||||
{this.props.msg.pkg.get("term.enabled")}
|
{this.props.msg.pkg.get("term.enabled")}
|
||||||
</button>
|
</button>
|
||||||
|
@ -946,7 +957,11 @@ export class BgCfg extends React.Component<BgProps, BgState, {}> {
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
this.onChangeAutoTheme(false);
|
this.onChangeAutoTheme(false);
|
||||||
}}
|
}}
|
||||||
className="button-default inline-block margin-r-m"
|
className={`${
|
||||||
|
this.props.ui.clientCfg.autoTheme
|
||||||
|
? "button-default"
|
||||||
|
: "white-font focus-bg"
|
||||||
|
} inline-block margin-r-m`}
|
||||||
>
|
>
|
||||||
{this.props.msg.pkg.get("term.disabled")}
|
{this.props.msg.pkg.get("term.disabled")}
|
||||||
</button>
|
</button>
|
||||||
|
@ -1017,7 +1032,7 @@ export class BgCfg extends React.Component<BgProps, BgState, {}> {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div >
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ import { loadingCtrl, ctrlOn, ctrlOff } from "../common/controls";
|
||||||
export interface Props {
|
export interface Props {
|
||||||
login: LoginProps;
|
login: LoginProps;
|
||||||
msg: MsgProps;
|
msg: MsgProps;
|
||||||
|
ui: UIProps;
|
||||||
update?: (updater: (prevState: ICoreState) => ICoreState) => void;
|
update?: (updater: (prevState: ICoreState) => ICoreState) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,6 +212,86 @@ export class PaneSettings extends React.Component<Props, State, {}> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const errRows = this.prepareErrorRows();
|
const errRows = this.prepareErrorRows();
|
||||||
|
const bgConfigPane = this.props.ui.clientCfg.allowSetBg ? (
|
||||||
|
<Container>
|
||||||
|
<Flexbox
|
||||||
|
children={List([
|
||||||
|
<h5 className="title-m">{this.props.msg.pkg.get("cfg.bg")}</h5>,
|
||||||
|
|
||||||
|
<button className="button-default" onClick={this.syncPreferences}>
|
||||||
|
{this.props.msg.pkg.get("update")}
|
||||||
|
</button>,
|
||||||
|
])}
|
||||||
|
childrenStyles={List([{}, { justifyContent: "flex-end" }])}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div className="hr"></div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div className="inline-block margin-r-m">
|
||||||
|
<div className="label">{this.props.msg.pkg.get("cfg.bg.url")}</div>
|
||||||
|
<input
|
||||||
|
name="bg_url"
|
||||||
|
type="text"
|
||||||
|
onChange={this.changeBgUrl}
|
||||||
|
value={this.props.login.preferences.bg.url}
|
||||||
|
placeholder={this.props.msg.pkg.get("cfg.bg.url")}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="inline-block margin-r-m">
|
||||||
|
<div className="label">
|
||||||
|
{this.props.msg.pkg.get("cfg.bg.repeat")}
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
name="bg_repeat"
|
||||||
|
type="text"
|
||||||
|
onChange={this.changeBgRepeat}
|
||||||
|
value={this.props.login.preferences.bg.repeat}
|
||||||
|
placeholder={this.props.msg.pkg.get("cfg.bg.repeat")}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="inline-block margin-r-m">
|
||||||
|
<div className="label">{this.props.msg.pkg.get("cfg.bg.pos")}</div>
|
||||||
|
<input
|
||||||
|
name="bg_pos"
|
||||||
|
type="text"
|
||||||
|
onChange={this.changeBgPos}
|
||||||
|
value={this.props.login.preferences.bg.position}
|
||||||
|
placeholder={this.props.msg.pkg.get("cfg.bg.pos")}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="inline-block margin-r-m">
|
||||||
|
<div className="label">
|
||||||
|
{this.props.msg.pkg.get("cfg.bg.align")}
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
name="bg_align"
|
||||||
|
type="text"
|
||||||
|
onChange={this.changeBgAlign}
|
||||||
|
value={this.props.login.preferences.bg.align}
|
||||||
|
placeholder={this.props.msg.pkg.get("cfg.bg.align")}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="inline-block margin-r-m">
|
||||||
|
<div className="label">
|
||||||
|
{this.props.msg.pkg.get("cfg.bg.bgColor")}
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
name="bg_bgColor"
|
||||||
|
type="text"
|
||||||
|
onChange={this.changeBgBgColor}
|
||||||
|
value={this.props.login.preferences.bg.bgColor}
|
||||||
|
placeholder={this.props.msg.pkg.get("cfg.bg.bgColor")}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Container>
|
||||||
|
) : null;
|
||||||
|
|
||||||
const errorReportPane =
|
const errorReportPane =
|
||||||
errRows.size > 0 ? (
|
errRows.size > 0 ? (
|
||||||
<Container>
|
<Container>
|
||||||
|
@ -361,7 +442,11 @@ export class PaneSettings extends React.Component<Props, State, {}> {
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
this.setLan("en_US");
|
this.setLan("en_US");
|
||||||
}}
|
}}
|
||||||
className="button-default inline-block margin-r-m"
|
className={`${
|
||||||
|
this.props.login.preferences.lan === "en_US"
|
||||||
|
? "focus-bg white-font"
|
||||||
|
: "button-default"
|
||||||
|
} inline-block margin-r-m`}
|
||||||
>
|
>
|
||||||
{this.props.msg.pkg.get("enUS")}
|
{this.props.msg.pkg.get("enUS")}
|
||||||
</button>
|
</button>
|
||||||
|
@ -369,7 +454,11 @@ export class PaneSettings extends React.Component<Props, State, {}> {
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
this.setLan("zh_CN");
|
this.setLan("zh_CN");
|
||||||
}}
|
}}
|
||||||
className="button-default inline-block margin-r-m"
|
className={`${
|
||||||
|
this.props.login.preferences.lan === "zh_CN"
|
||||||
|
? "focus-bg white-font"
|
||||||
|
: "button-default"
|
||||||
|
} inline-block margin-r-m`}
|
||||||
>
|
>
|
||||||
{this.props.msg.pkg.get("zhCN")}
|
{this.props.msg.pkg.get("zhCN")}
|
||||||
</button>
|
</button>
|
||||||
|
@ -391,7 +480,11 @@ export class PaneSettings extends React.Component<Props, State, {}> {
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
this.setTheme("light");
|
this.setTheme("light");
|
||||||
}}
|
}}
|
||||||
className="button-default inline-block margin-r-m"
|
className={`${
|
||||||
|
this.props.login.preferences.theme === "light"
|
||||||
|
? "focus-bg white-font"
|
||||||
|
: "button-default"
|
||||||
|
} inline-block margin-r-m`}
|
||||||
>
|
>
|
||||||
{this.props.msg.pkg.get("theme.light")}
|
{this.props.msg.pkg.get("theme.light")}
|
||||||
</button>
|
</button>
|
||||||
|
@ -399,7 +492,11 @@ export class PaneSettings extends React.Component<Props, State, {}> {
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
this.setTheme("dark");
|
this.setTheme("dark");
|
||||||
}}
|
}}
|
||||||
className="button-default inline-block margin-r-m"
|
className={`${
|
||||||
|
this.props.login.preferences.theme === "dark"
|
||||||
|
? "focus-bg white-font"
|
||||||
|
: "button-default"
|
||||||
|
} inline-block margin-r-m`}
|
||||||
>
|
>
|
||||||
{this.props.msg.pkg.get("theme.dark")}
|
{this.props.msg.pkg.get("theme.dark")}
|
||||||
</button>
|
</button>
|
||||||
|
@ -443,88 +540,7 @@ export class PaneSettings extends React.Component<Props, State, {}> {
|
||||||
</div>
|
</div>
|
||||||
</Container> */}
|
</Container> */}
|
||||||
|
|
||||||
<Container>
|
{bgConfigPane}
|
||||||
<Flexbox
|
|
||||||
children={List([
|
|
||||||
<h5 className="title-m">{this.props.msg.pkg.get("cfg.bg")}</h5>,
|
|
||||||
|
|
||||||
<button className="button-default" onClick={this.syncPreferences}>
|
|
||||||
{this.props.msg.pkg.get("update")}
|
|
||||||
</button>,
|
|
||||||
])}
|
|
||||||
childrenStyles={List([{}, { justifyContent: "flex-end" }])}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div className="hr"></div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<div className="inline-block margin-r-m">
|
|
||||||
<div className="label">
|
|
||||||
{this.props.msg.pkg.get("cfg.bg.url")}
|
|
||||||
</div>
|
|
||||||
<input
|
|
||||||
name="bg_url"
|
|
||||||
type="text"
|
|
||||||
onChange={this.changeBgUrl}
|
|
||||||
value={this.props.login.preferences.bg.url}
|
|
||||||
placeholder={this.props.msg.pkg.get("cfg.bg.url")}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="inline-block margin-r-m">
|
|
||||||
<div className="label">
|
|
||||||
{this.props.msg.pkg.get("cfg.bg.repeat")}
|
|
||||||
</div>
|
|
||||||
<input
|
|
||||||
name="bg_repeat"
|
|
||||||
type="text"
|
|
||||||
onChange={this.changeBgRepeat}
|
|
||||||
value={this.props.login.preferences.bg.repeat}
|
|
||||||
placeholder={this.props.msg.pkg.get("cfg.bg.repeat")}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="inline-block margin-r-m">
|
|
||||||
<div className="label">
|
|
||||||
{this.props.msg.pkg.get("cfg.bg.pos")}
|
|
||||||
</div>
|
|
||||||
<input
|
|
||||||
name="bg_pos"
|
|
||||||
type="text"
|
|
||||||
onChange={this.changeBgPos}
|
|
||||||
value={this.props.login.preferences.bg.position}
|
|
||||||
placeholder={this.props.msg.pkg.get("cfg.bg.pos")}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="inline-block margin-r-m">
|
|
||||||
<div className="label">
|
|
||||||
{this.props.msg.pkg.get("cfg.bg.align")}
|
|
||||||
</div>
|
|
||||||
<input
|
|
||||||
name="bg_align"
|
|
||||||
type="text"
|
|
||||||
onChange={this.changeBgAlign}
|
|
||||||
value={this.props.login.preferences.bg.align}
|
|
||||||
placeholder={this.props.msg.pkg.get("cfg.bg.align")}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="inline-block margin-r-m">
|
|
||||||
<div className="label">
|
|
||||||
{this.props.msg.pkg.get("cfg.bg.bgColor")}
|
|
||||||
</div>
|
|
||||||
<input
|
|
||||||
name="bg_bgColor"
|
|
||||||
type="text"
|
|
||||||
onChange={this.changeBgBgColor}
|
|
||||||
value={this.props.login.preferences.bg.bgColor}
|
|
||||||
placeholder={this.props.msg.pkg.get("cfg.bg.bgColor")}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Container>
|
|
||||||
|
|
||||||
{errorReportPane}
|
{errorReportPane}
|
||||||
|
|
||||||
{/* <div className="hr"></div>
|
{/* <div className="hr"></div>
|
||||||
|
|
|
@ -11,6 +11,8 @@ import { LoginProps } from "./pane_login";
|
||||||
import { Layers } from "./layers";
|
import { Layers } from "./layers";
|
||||||
import { AdminProps } from "./pane_admin";
|
import { AdminProps } from "./pane_admin";
|
||||||
import { TopBar } from "./topbar";
|
import { TopBar } from "./topbar";
|
||||||
|
import { CronTable } from "../common/cron";
|
||||||
|
import { updater } from "./state_updater";
|
||||||
|
|
||||||
export const controlName = "panelTabs";
|
export const controlName = "panelTabs";
|
||||||
export interface Props {
|
export interface Props {
|
||||||
|
@ -30,6 +32,18 @@ export class RootFrame extends React.Component<Props, State, {}> {
|
||||||
super(p);
|
super(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidMount(): void {
|
||||||
|
CronTable().setInterval("autoSwitchTheme", {
|
||||||
|
func: updater().autoSwitchTheme,
|
||||||
|
args: [],
|
||||||
|
delay: 60 * 1000,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
CronTable().clearInterval("autoSwitchTheme");
|
||||||
|
}
|
||||||
|
|
||||||
makeBgStyle = (): Object => {
|
makeBgStyle = (): Object => {
|
||||||
if (
|
if (
|
||||||
this.props.login.preferences != null &&
|
this.props.login.preferences != null &&
|
||||||
|
|
|
@ -562,8 +562,6 @@ export class Updater {
|
||||||
return initClientCfgStatus;
|
return initClientCfgStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(this.props.ui.control.controls.toJSON());
|
|
||||||
|
|
||||||
this.initControls(paramMap);
|
this.initControls(paramMap);
|
||||||
this.initUITree();
|
this.initUITree();
|
||||||
|
|
||||||
|
@ -791,6 +789,22 @@ export class Updater {
|
||||||
this.props.login.preferences.theme = theme;
|
this.props.login.preferences.theme = theme;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
autoSwitchTheme = () => {
|
||||||
|
if (!this.props.ui.clientCfg.autoTheme) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const date = new Date();
|
||||||
|
if (
|
||||||
|
(date.getHours() >= 18 && date.getHours() <= 23) ||
|
||||||
|
(date.getHours() >= 0 && date.getHours() <= 6)
|
||||||
|
) {
|
||||||
|
this.setTheme("dark");
|
||||||
|
} else {
|
||||||
|
this.setTheme("light");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
setControlOption = (controlName: string, option: string): boolean => {
|
setControlOption = (controlName: string, option: string): boolean => {
|
||||||
const controlExists = this.props.ui.control.controls.has(controlName);
|
const controlExists = this.props.ui.control.controls.has(controlName);
|
||||||
const optionsExists = this.props.ui.control.options.has(controlName);
|
const optionsExists = this.props.ui.control.options.has(controlName);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue