fix(fe/login): hide login dialog in sharing mode
This commit is contained in:
parent
cc86c83066
commit
0fc878ea7b
2 changed files with 16 additions and 2 deletions
|
@ -2,17 +2,25 @@ import * as React from "react";
|
|||
import { List } from "immutable";
|
||||
|
||||
import { updater } from "./state_updater";
|
||||
import { ICoreState, MsgProps, UIProps } from "./core_state";
|
||||
import {
|
||||
ICoreState,
|
||||
MsgProps,
|
||||
UIProps,
|
||||
sharingCtrl,
|
||||
ctrlOn,
|
||||
} from "./core_state";
|
||||
import { AdminProps } from "./pane_admin";
|
||||
import { SettingsDialog } from "./dialog_settings";
|
||||
|
||||
import { AuthPane, LoginProps } from "./pane_login";
|
||||
import { FilesProps } from "./panel_files";
|
||||
import { Flexbox } from "./layout/flexbox";
|
||||
import { Container } from "./layout/container";
|
||||
|
||||
export const settingsDialogCtrl = "settingsDialog";
|
||||
|
||||
export interface Props {
|
||||
filesInfo: FilesProps;
|
||||
login: LoginProps;
|
||||
admin: AdminProps;
|
||||
ui: UIProps;
|
||||
|
@ -32,7 +40,12 @@ export class Layers extends React.Component<Props, State, {}> {
|
|||
};
|
||||
|
||||
render() {
|
||||
const showLogin = this.props.login.authed ? "hidden" : "";
|
||||
const showLogin =
|
||||
this.props.login.authed ||
|
||||
(this.props.ui.control.controls.get(sharingCtrl) === ctrlOn &&
|
||||
this.props.filesInfo.isSharing)
|
||||
? "hidden"
|
||||
: "";
|
||||
const showSettings =
|
||||
this.props.ui.control.controls.get("settingsDialog") === "on"
|
||||
? ""
|
||||
|
|
|
@ -70,6 +70,7 @@ export class RootFrame extends React.Component<Props, State, {}> {
|
|||
admin={this.props.admin}
|
||||
ui={this.props.ui}
|
||||
msg={this.props.msg}
|
||||
filesInfo={this.props.filesInfo}
|
||||
update={this.props.update}
|
||||
/>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue