diff options
author | vellichora <fangrui_tong@brown.edu> | 2020-02-09 17:43:54 -0500 |
---|---|---|
committer | vellichora <fangrui_tong@brown.edu> | 2020-02-09 17:43:54 -0500 |
commit | bede55e2f8504a4b45c3adb96d6ba2d13c17b96f (patch) | |
tree | 50c164fd92ebd73d4f66d2024a0e7695a32bf588 /src/mobile/MobileInterface.tsx | |
parent | e8fcbbf57b2a2f443d9c280ce10558cf9d51c632 (diff) |
option to upload as collection for mobile
Diffstat (limited to 'src/mobile/MobileInterface.tsx')
-rw-r--r-- | src/mobile/MobileInterface.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mobile/MobileInterface.tsx b/src/mobile/MobileInterface.tsx index a1ef0a5d1..e21258c62 100644 --- a/src/mobile/MobileInterface.tsx +++ b/src/mobile/MobileInterface.tsx @@ -203,7 +203,7 @@ export default class MobileInterface extends React.Component { } } - upload = async (e: React.MouseEvent) => { + upload = async (e: React.MouseEvent, asCollection: boolean) => { if (this.mainContainer) { const data = Cast(this.mainContainer.data, listSpec(Doc)); if (data) { @@ -212,7 +212,8 @@ export default class MobileInterface extends React.Component { console.log("UPLOADING DOCUMENT FROM MOBILE", uploadDoc[Id], StrCast(uploadDoc.proto!.title)); if (uploadDoc) { DocServer.Mobile.dispatchMobileDocumentUpload({ - docId: uploadDoc[Id] + docId: uploadDoc[Id], + asCollection: asCollection }); } } @@ -230,7 +231,8 @@ export default class MobileInterface extends React.Component { <button className="mobileInterface-button cancel" onClick={this.onBack} title="Back">BACK</button> </div> <div className="uploadSettings"> - <button className="mobileInterface-button" onClick={this.upload} title="Shift left">UPLOAD</button> + <button className="mobileInterface-button" onClick={e => this.upload(e, false)} title="Upload">UPLOAD</button> + <button className="mobileInterface-button" onClick={e => this.upload(e, true)} title="Upload">UPLOAD AS COLLECTION</button> </div> </div> <DocumentView |