Address design issues and set theme at device level
This commit is contained in:
parent
0f685eb0e9
commit
cf392af52f
5 changed files with 39 additions and 11 deletions
|
@ -29,9 +29,16 @@ export default class StyledRadioButton extends React.PureComponent<IProps, IStat
|
|||
}
|
||||
|
||||
public render() {
|
||||
const { children, className, ...otherProps } = this.props;
|
||||
return <label className={classnames('mx_RadioButton', className)}>
|
||||
<input type='radio' {...otherProps} />
|
||||
const { children, className, disabled, ...otherProps } = this.props;
|
||||
const _className = classnames(
|
||||
'mx_RadioButton',
|
||||
className,
|
||||
{
|
||||
"mx_RadioButton_disabled": disabled,
|
||||
"mx_RadioButton_enabled": !disabled,
|
||||
});
|
||||
return <label className={_className}>
|
||||
<input type='radio' disabled={disabled} {...otherProps} />
|
||||
{/* Used to render the radio button circle */}
|
||||
<div><div></div></div>
|
||||
<span>{children}</span>
|
||||
|
|
|
@ -110,7 +110,7 @@ export default class AppearanceUserSettingsTab extends React.Component<IProps, I
|
|||
// doing getValue in the .catch will still return the value we failed to set,
|
||||
// so remember what the value was before we tried to set it so we can revert
|
||||
const oldTheme: string = SettingsStore.getValue('theme');
|
||||
SettingsStore.setValue("theme", null, SettingLevel.ACCOUNT, newTheme).catch(() => {
|
||||
SettingsStore.setValue("theme", null, SettingLevel.DEVICE, newTheme).catch(() => {
|
||||
dis.dispatch<RecheckThemePayload>({action: Action.RecheckTheme});
|
||||
this.setState({theme: oldTheme});
|
||||
});
|
||||
|
@ -316,7 +316,7 @@ export default class AppearanceUserSettingsTab extends React.Component<IProps, I
|
|||
|
||||
render() {
|
||||
return (
|
||||
<div className="mx_SettingsTab">
|
||||
<div className="mx_SettingsTab mx_AppearanceUserSettingsTab">
|
||||
<div className="mx_SettingsTab_heading">{_t("Customise your appearance")}</div>
|
||||
<div className="mx_SettingsTab_SubHeading">
|
||||
{_t("Appearance Settings only affect this Riot session.")}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue