fix(pane_admin): hide role management panes to avoid confusion

This commit is contained in:
hexxa 2022-04-13 22:16:24 +08:00 committed by Hexxa
parent 294e52216c
commit 83a642514a
2 changed files with 74 additions and 72 deletions

View file

@ -656,7 +656,7 @@ export class AdminPane extends React.Component<Props, State, {}> {
{userList} {userList}
</Container> </Container>
<Container> {/* <Container>
<div> <div>
<Flexbox <Flexbox
children={List([ children={List([
@ -684,9 +684,9 @@ export class AdminPane extends React.Component<Props, State, {}> {
childrenStyles={List([{}, { justifyContent: "flex-end" }])} childrenStyles={List([{}, { justifyContent: "flex-end" }])}
/> />
</div> </div>
</Container> </Container> */}
<Container> {/* <Container>
<Flexbox <Flexbox
children={List([ children={List([
<h5 className="title-m"> <h5 className="title-m">
@ -699,7 +699,7 @@ export class AdminPane extends React.Component<Props, State, {}> {
<div className="hr"></div> <div className="hr"></div>
{roleList} {roleList}
</Container> </Container> */}
</div> </div>
); );
} }

View file

@ -26,7 +26,7 @@ export interface Props {
update?: (updater: (prevState: ICoreState) => ICoreState) => void; update?: (updater: (prevState: ICoreState) => ICoreState) => void;
} }
export interface State { } export interface State {}
export class RootFrame extends React.Component<Props, State, {}> { export class RootFrame extends React.Component<Props, State, {}> {
constructor(p: Props) { constructor(p: Props) {
super(p); super(p);
@ -95,84 +95,86 @@ export class RootFrame extends React.Component<Props, State, {}> {
return ( return (
<div id="root-frame" className={`${theme} ${fontSizeClass}`}> <div id="root-frame" className={`${theme} ${fontSizeClass}`}>
<div id="bg" style={bgStyle}> <div id="bg" style={bgStyle}>
<Layers <div id="custom">
login={this.props.login} <Layers
admin={this.props.admin} login={this.props.login}
ui={this.props.ui} admin={this.props.admin}
msg={this.props.msg}
filesInfo={this.props.filesInfo}
update={this.props.update}
/>
<TopBar
login={this.props.login}
msg={this.props.msg}
ui={this.props.ui}
update={this.props.update}
/>
<div id="top-menu">
<Tabs
targetControl={controlName}
tabIcons={Map<string, IconProps>({
filesPanel: {
name: "RiFolder2Fill",
size: iconSize("s"),
color: "focus",
},
uploadingsPanel: {
name: "RiUploadCloudFill",
size: iconSize("s"),
color: "focus",
},
sharingsPanel: {
name: "RiShareBoxLine",
size: iconSize("s"),
color: "focus",
},
})}
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}
/> />
</div>
<div className="container-center"> <TopBar
<span className={filesPanelClass}> login={this.props.login}
<FilesPanel msg={this.props.msg}
filesInfo={this.props.filesInfo} ui={this.props.ui}
msg={this.props.msg} update={this.props.update}
login={this.props.login} />
<div id="top-menu">
<Tabs
targetControl={controlName}
tabIcons={Map<string, IconProps>({
filesPanel: {
name: "RiFolder2Fill",
size: iconSize("s"),
color: "focus",
},
uploadingsPanel: {
name: "RiUploadCloudFill",
size: iconSize("s"),
color: "focus",
},
sharingsPanel: {
name: "RiShareBoxLine",
size: iconSize("s"),
color: "focus",
},
})}
ui={this.props.ui} ui={this.props.ui}
enabled={displaying === "filesPanel"} msg={this.props.msg}
update={this.props.update} update={this.props.update}
/> />
</span> </div>
<span className={uploadingsPanelClass}> <div className="container-center">
<UploadingsPanel <span className={filesPanelClass}>
uploadingsInfo={this.props.uploadingsInfo} <FilesPanel
msg={this.props.msg} filesInfo={this.props.filesInfo}
login={this.props.login} msg={this.props.msg}
ui={this.props.ui} login={this.props.login}
update={this.props.update} ui={this.props.ui}
/> enabled={displaying === "filesPanel"}
</span> update={this.props.update}
/>
</span>
<span className={sharingsPanelClass}> <span className={uploadingsPanelClass}>
<SharingsPanel <UploadingsPanel
sharingsInfo={this.props.sharingsInfo} uploadingsInfo={this.props.uploadingsInfo}
msg={this.props.msg} msg={this.props.msg}
login={this.props.login} login={this.props.login}
ui={this.props.ui} ui={this.props.ui}
update={this.props.update} update={this.props.update}
/> />
</span> </span>
</div>
<div id="tail" className="container-center"> <span className={sharingsPanelClass}>
<a href="https://github.com/ihexxa/quickshare">Quickshare</a> - <SharingsPanel
Quick and simple file sharing. sharingsInfo={this.props.sharingsInfo}
msg={this.props.msg}
login={this.props.login}
ui={this.props.ui}
update={this.props.update}
/>
</span>
</div>
<div id="tail" className="container-center">
<a href="https://github.com/ihexxa/quickshare">Quickshare</a> -
Quick and simple file sharing.
</div>
</div> </div>
</div> </div>
</div> </div>