aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/CurrentUserUtils.ts
diff options
context:
space:
mode:
authorgeireann <60007097+geireann@users.noreply.github.com>2020-06-16 01:34:12 +0800
committergeireann <60007097+geireann@users.noreply.github.com>2020-06-16 01:34:12 +0800
commit87aa11c70be1ae0270c69adc0c1e0219f79ce820 (patch)
tree4e64347d6f521d48f9a62e943cb10773fb4efecf /src/client/util/CurrentUserUtils.ts
parent9599e4e21c2b0809460c9f94005d55caea65410e (diff)
uploader + menu changes
image upload w/ video and other files menu updates
Diffstat (limited to 'src/client/util/CurrentUserUtils.ts')
-rw-r--r--src/client/util/CurrentUserUtils.ts23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index 1b0622f6d..e1605473c 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -329,7 +329,8 @@ export class CurrentUserUtils {
doc.emptyWebpage = Docs.Create.WebDocument("", { title: "New Webpage", _nativeWidth: 850, _nativeHeight: 962, _width: 600, UseCors: true });
}
if (doc.activeMobile === undefined) {
- doc.activeMobile = CurrentUserUtils.setupMobileMenu();
+ console.log("phone setup");
+ this.setupActiveMobile(doc);
}
return [
{ title: "Drag a comparison box", label: "Comp", icon: "columns", ignoreClick: true, drag: 'Docs.Create.ComparisonDocument()' },
@@ -398,16 +399,18 @@ export class CurrentUserUtils {
return doc.myItemCreators as Doc;
}
- // static setupActiveMobile(doc: Doc) {
- // if (doc.activeMobile === undefined) {
- // doc.activeMobile = CurrentUserUtils.setupMobileMenu();
- // }
- // }
+ static setupActiveMobile(doc: Doc) {
+ if (doc.activeMobile === undefined) {
+ console.log("undefined");
+ doc.activeMobile = this.setupMobileMenu();
+ }
+ return doc.activeMobile as Doc;
+ }
static setupMobileMenu() {
- const menu = Cast(Docs.Create.StackingDocument(CurrentUserUtils.setupMobileButtons(), {
- _width: 980, ignoreClick: true, lockedPosition: true, _chromeStatus: "disabled", title: "home", _yMargin: 100
- }), Doc) as Doc;
+ const menu = new PrefetchProxy(Docs.Create.StackingDocument(this.setupMobileButtons(), {
+ _width: 980, ignoreClick: true, lockedPosition: false, _chromeStatus: "disabled", title: "home", _yMargin: 100
+ }));
return menu;
}
@@ -740,7 +743,7 @@ export class CurrentUserUtils {
this.setupDefaultIconTemplates(doc); // creates a set of icon templates triggered by the document deoration icon
this.setupDocTemplates(doc); // sets up the template menu of templates
this.setupRightSidebar(doc); // sets up the right sidebar collection for mobile upload documents and sharing
- // this.setupActiveMobile(doc);
+ this.setupActiveMobile(doc);
this.setupOverlays(doc); // documents in overlay layer
this.setupDockedButtons(doc); // the bottom bar of font icons
this.setupDefaultPresentation(doc); // presentation that's initially triggered