diff --git a/src/client/web/src/components/browser.tsx b/src/client/web/src/components/browser.tsx index e9c7319..4bfab54 100644 --- a/src/client/web/src/components/browser.tsx +++ b/src/client/web/src/components/browser.tsx @@ -478,23 +478,26 @@ export class Browser extends React.Component { }); const sharingList = this.props.sharings.map((dirPath: string) => { -
- {dirPath} - - - -
; + return ( +
+ + + {dirPath} + + + + +
+ ); }); - console.log("browser", this.props.sharings, this.props.isSharing); - return (
@@ -535,7 +538,7 @@ export class Browser extends React.Component {
- Uploading Files + Sharing Folders
diff --git a/src/client/web/src/components/browser.updater.ts b/src/client/web/src/components/browser.updater.ts index ea9176e..e4092b2 100644 --- a/src/client/web/src/components/browser.updater.ts +++ b/src/client/web/src/components/browser.updater.ts @@ -179,7 +179,16 @@ export class Updater { ...prevState, panel: { ...prevState.panel, - browser: { ...this.props }, // TODO: use spread + browser: { + dirPath: this.props.dirPath, + isSharing: this.props.isSharing, + items: this.props.items, + uploadings: this.props.uploadings, + sharings: this.props.sharings, + uploadFiles: this.props.uploadFiles, + uploadValue: this.props.uploadValue, + isVertical: this.props.isVertical, + }, }, }; }; diff --git a/src/client/web/src/components/root_frame.tsx b/src/client/web/src/components/root_frame.tsx index a61368e..aa22428 100644 --- a/src/client/web/src/components/root_frame.tsx +++ b/src/client/web/src/components/root_frame.tsx @@ -43,7 +43,6 @@ export class RootFrame extends React.Component { render() { const update = this.props.update; - console.log("rootframe", this.props.browser.isSharing); return (
diff --git a/src/client/web/src/components/state_mgr.tsx b/src/client/web/src/components/state_mgr.tsx index 410c1c2..34d7a12 100644 --- a/src/client/web/src/components/state_mgr.tsx +++ b/src/client/web/src/components/state_mgr.tsx @@ -38,44 +38,38 @@ export class StateMgr extends React.Component { return BrowserUpdater().refreshUploadings(); }) .then((_: boolean) => { - BrowserUpdater().initUploads(); + return BrowserUpdater().initUploads(); }) .then(() => { - BrowserUpdater().setSharing(BrowserUpdater().props.dirPath.join("/")); + return BrowserUpdater().setSharing( + BrowserUpdater().props.dirPath.join("/") + ); }) .then(() => { - BrowserUpdater().listSharings(); + return BrowserUpdater().listSharings(); }) .then(() => { this.update(BrowserUpdater().setBrowser); - console.log("0", this.state, BrowserUpdater().props); }) .then(() => { - PanesUpdater.self(); - console.log("1", this.state); + return PanesUpdater.self(); }) .then(() => { - PanesUpdater.listRoles(); - console.log("2", this.state); + return PanesUpdater.listRoles(); }) .then(() => { - PanesUpdater.listUsers(); - console.log("3", this.state); + return PanesUpdater.listUsers(); }) .then(() => { this.update(PanesUpdater.updateState); - console.log("final", this.state); }); }; update = (apply: (prevState: ICoreState) => ICoreState): void => { this.setState(apply(this.state)); - console.log("core", this.state); }; render() { - console.log("state_mgr", this.state.panel.browser.isSharing); - return (