diff --git a/src/client/web/src/components/layers.tsx b/src/client/web/src/components/layers.tsx index 6ea332c..d347cfe 100644 --- a/src/client/web/src/components/layers.tsx +++ b/src/client/web/src/components/layers.tsx @@ -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 { }; 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" ? "" diff --git a/src/client/web/src/components/root_frame.tsx b/src/client/web/src/components/root_frame.tsx index 77acfdd..64d1fb6 100644 --- a/src/client/web/src/components/root_frame.tsx +++ b/src/client/web/src/components/root_frame.tsx @@ -70,6 +70,7 @@ export class RootFrame extends React.Component { admin={this.props.admin} ui={this.props.ui} msg={this.props.msg} + filesInfo={this.props.filesInfo} update={this.props.update} />