Reset theme on close of settings modal
Этот коммит содержится в:
@@ -113,6 +113,7 @@ class UserSettingsModal extends React.Component {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.resetTheme();
|
||||||
this.deactivateTab();
|
this.deactivateTab();
|
||||||
this.props.onModalDismissed();
|
this.props.onModalDismissed();
|
||||||
}
|
}
|
||||||
@@ -215,15 +216,19 @@ class UserSettingsModal extends React.Component {
|
|||||||
this.showConfirmModal(() => this.updateSection(section, true));
|
this.showConfirmModal(() => this.updateSection(section, true));
|
||||||
} else {
|
} else {
|
||||||
if (this.state.active_section === 'theme' && section !== 'theme') {
|
if (this.state.active_section === 'theme' && section !== 'theme') {
|
||||||
const user = UserStore.getCurrentUser();
|
this.resetTheme();
|
||||||
if (user.theme_props != null) {
|
|
||||||
Utils.applyTheme(user.theme_props);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
this.setState({active_section: section});
|
this.setState({active_section: section});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resetTheme() {
|
||||||
|
const user = UserStore.getCurrentUser();
|
||||||
|
if (user.theme_props != null) {
|
||||||
|
Utils.applyTheme(user.theme_props);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {formatMessage} = this.props.intl;
|
const {formatMessage} = this.props.intl;
|
||||||
var tabs = [];
|
var tabs = [];
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user