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 { List } from "immutable";
|
||||||
|
|
||||||
import { updater } from "./state_updater";
|
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 { AdminProps } from "./pane_admin";
|
||||||
import { SettingsDialog } from "./dialog_settings";
|
import { SettingsDialog } from "./dialog_settings";
|
||||||
|
|
||||||
import { AuthPane, LoginProps } from "./pane_login";
|
import { AuthPane, LoginProps } from "./pane_login";
|
||||||
|
import { FilesProps } from "./panel_files";
|
||||||
import { Flexbox } from "./layout/flexbox";
|
import { Flexbox } from "./layout/flexbox";
|
||||||
import { Container } from "./layout/container";
|
import { Container } from "./layout/container";
|
||||||
|
|
||||||
export const settingsDialogCtrl = "settingsDialog";
|
export const settingsDialogCtrl = "settingsDialog";
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
|
filesInfo: FilesProps;
|
||||||
login: LoginProps;
|
login: LoginProps;
|
||||||
admin: AdminProps;
|
admin: AdminProps;
|
||||||
ui: UIProps;
|
ui: UIProps;
|
||||||
|
@ -32,7 +40,12 @@ export class Layers extends React.Component<Props, State, {}> {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
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 =
|
const showSettings =
|
||||||
this.props.ui.control.controls.get("settingsDialog") === "on"
|
this.props.ui.control.controls.get("settingsDialog") === "on"
|
||||||
? ""
|
? ""
|
||||||
|
|
|
@ -70,6 +70,7 @@ export class RootFrame extends React.Component<Props, State, {}> {
|
||||||
admin={this.props.admin}
|
admin={this.props.admin}
|
||||||
ui={this.props.ui}
|
ui={this.props.ui}
|
||||||
msg={this.props.msg}
|
msg={this.props.msg}
|
||||||
|
filesInfo={this.props.filesInfo}
|
||||||
update={this.props.update}
|
update={this.props.update}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue