feat(fe/root_frame): get bg config from users and site settings

This commit is contained in:
hexxa 2021-10-17 20:23:56 +08:00 committed by Hexxa
parent 2497968b82
commit 8c95f85eb1

View file

@ -25,12 +25,18 @@ export class RootFrame extends React.Component<Props, State, {}> {
} }
render() { render() {
const bgStyle = let bgStyle = undefined;
this.props.ui.bg.url !== "" if (this.props.login.preferences.bg.url !== "") {
? { bgStyle = {
background: `url("${this.props.ui.bg.url}") ${this.props.ui.bg.repeat} ${this.props.ui.bg.position} ${this.props.ui.bg.align}`, background: `url("${this.props.login.preferences.bg.url}") ${this.props.login.preferences.bg.repeat} ${this.props.login.preferences.bg.position} ${this.props.login.preferences.bg.align}`,
} };
: {}; } else if (this.props.ui.bg.url !== "") {
bgStyle = {
background: `url("${this.props.ui.bg.url}") ${this.props.ui.bg.repeat} ${this.props.ui.bg.position} ${this.props.ui.bg.align}`,
};
} else {
bgStyle = {};
}
const showBrowser = const showBrowser =
this.props.login.userRole === roleVisitor && !this.props.browser.isSharing this.props.login.userRole === roleVisitor && !this.props.browser.isSharing