aboutsummaryrefslogtreecommitdiff
path: root/src/mobile/MobileInterface.tsx
diff options
context:
space:
mode:
authorLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-06-10 22:43:35 -0700
committerLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-06-10 22:43:35 -0700
commitb13adb6e2620d80c019c7c8f6d344ba5ca2fcec2 (patch)
treefd6605f02d83e8c9fcaaf0bbb7dbce863a886eb9 /src/mobile/MobileInterface.tsx
parent69fc5cff21c212a6eca9d125836844eea018fad0 (diff)
finished up image upload and fixed bugs with pathbar and clicking workspaces twice
Diffstat (limited to 'src/mobile/MobileInterface.tsx')
-rw-r--r--src/mobile/MobileInterface.tsx28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/mobile/MobileInterface.tsx b/src/mobile/MobileInterface.tsx
index 820a6885d..0b5855e1f 100644
--- a/src/mobile/MobileInterface.tsx
+++ b/src/mobile/MobileInterface.tsx
@@ -1115,7 +1115,7 @@ export class MobileInterface extends React.Component {
*/
returnMain = () => {
console.log("home");
- this._parents = [];
+ this._parents = [this._homeDoc];
// this.toggleSidebar();
this._activeDoc = this._library;
this.switchCurrentView((userDoc: Doc) => this._library);
@@ -1201,7 +1201,7 @@ export class MobileInterface extends React.Component {
* Handles the click functionality in the library panel
* @param doc: doc for which the method is called
*/
- handleClick(doc: Doc) {
+ handleClick = async (doc: Doc) => {
let children = DocListCast(doc.data);
if (doc.type !== "collection") {
this._parents.push(this._activeDoc);
@@ -1244,12 +1244,24 @@ export class MobileInterface extends React.Component {
let items = docArray.map((doc: Doc, index: any) => {
if (index === 0) {
return (
- <div className="pathbarItem">
- <div className="pathbarText"
- key={index}
- onClick={() => this.handlePathClick(doc, index)}>{doc.title}
- </div>
- </div>);
+ <>
+ {this._homeMenu ?
+ <div className="pathbarItem">
+ <div className="pathbarText"
+ style={{ backgroundColor: "rgb(119, 37, 37)" }}
+ key={index}
+ onClick={() => this.handlePathClick(doc, index)}>{doc.title}
+ </div>
+ </div>
+ :
+ <div className="pathbarItem">
+ <div className="pathbarText"
+ key={index}
+ onClick={() => this.handlePathClick(doc, index)}>{doc.title}
+ </div>
+ </div>}
+ </>);
+
} else if (doc === this._activeDoc) {
return (
<div className="pathbarItem">