feat(fe/root_frame): get bg config from users and site settings
This commit is contained in:
parent
2497968b82
commit
8c95f85eb1
1 changed files with 12 additions and 6 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue