-
+
@@ -217,4 +220,3 @@ export class Uploader extends React.Component {
}
-// DocServer.init(window.location.protocol, window.location.hostname, 4321, "image upload");
diff --git a/src/mobile/MobileInterface.tsx b/src/mobile/MobileInterface.tsx
index 5acdc1dea..644535179 100644
--- a/src/mobile/MobileInterface.tsx
+++ b/src/mobile/MobileInterface.tsx
@@ -1,7 +1,7 @@
import * as React from "react";
import { library } from '@fortawesome/fontawesome-svg-core';
import {
- faTasks, faMobile, faThLarge, faWindowClose, faEdit, faTrashAlt, faPalette, faAngleRight, faBell, faTrash, faCamera, faExpand, faCaretDown, faCaretLeft, faCaretRight, faCaretSquareDown, faCaretSquareRight, faArrowsAltH, faPlus, faMinus,
+ faTasks, faExternalLinkSquareAlt, faMobile, faThLarge, faWindowClose, faEdit, faTrashAlt, faPalette, faAngleRight, faBell, faTrash, faCamera, faExpand, faCaretDown, faCaretLeft, faCaretRight, faCaretSquareDown, faCaretSquareRight, faArrowsAltH, faPlus, faMinus,
faTerminal, faToggleOn, faFile as fileSolid, faExternalLinkAlt, faLocationArrow, faSearch, faFileDownload, faStop, faCalculator, faWindowMaximize, faAddressCard,
faQuestionCircle, faArrowLeft, faArrowRight, faArrowDown, faArrowUp, faBolt, faBullseye, faCaretUp, faCat, faCheck, faChevronRight, faClipboard, faClone, faCloudUploadAlt,
faCommentAlt, faCompressArrowsAlt, faCut, faEllipsisV, faEraser, faExclamation, faFileAlt, faFileAudio, faFilePdf, faFilm, faFilter, faFont, faGlobeAsia, faHighlighter,
@@ -17,7 +17,7 @@ import { FieldValue, Cast } from '../fields/Types';
import { CurrentUserUtils } from '../client/util/CurrentUserUtils';
import { emptyPath, emptyFunction, returnFalse, returnOne, returnTrue, returnZero, Utils } from '../Utils';
import { DocServer } from '../client/DocServer';
-import { Docs } from '../client/documents/Documents';
+import { Docs, DocumentOptions } from '../client/documents/Documents';
import { Scripting } from '../client/util/Scripting';
import { DocumentView } from '../client/views/nodes/DocumentView';
import { Transform } from '../client/util/Transform';
@@ -36,8 +36,11 @@ import GestureOverlay from "../client/views/GestureOverlay";
import { ScriptField } from "../fields/ScriptField";
import InkOptionsMenu from "../client/views/collections/collectionFreeForm/InkOptionsMenu";
import { RadialMenu } from "../client/views/nodes/RadialMenu";
+import { UndoManager } from "../client/util/UndoManager";
+import { MainView } from "../client/views/MainView";
+import { List } from "../fields/List";
-library.add(faTasks, faMobile, faThLarge, faWindowClose, faEdit, faTrashAlt, faPalette, faAngleRight, faBell, faTrash, faCamera, faExpand, faCaretDown, faCaretLeft, faCaretRight, faCaretSquareDown, faCaretSquareRight, faArrowsAltH, faPlus, faMinus,
+library.add(faTasks, faExternalLinkSquareAlt, faMobile, faThLarge, faWindowClose, faEdit, faTrashAlt, faPalette, faAngleRight, faBell, faTrash, faCamera, faExpand, faCaretDown, faCaretLeft, faCaretRight, faCaretSquareDown, faCaretSquareRight, faArrowsAltH, faPlus, faMinus,
faTerminal, faToggleOn, fileSolid, faExternalLinkAlt, faLocationArrow, faSearch, faFileDownload, faStop, faCalculator, faWindowMaximize, faAddressCard,
faQuestionCircle, faArrowLeft, faArrowRight, faArrowDown, faArrowUp, faBolt, faBullseye, faCaretUp, faCat, faCheck, faChevronRight, faClipboard, faClone, faCloudUploadAlt,
faCommentAlt, faCompressArrowsAlt, faCut, faEllipsisV, faEraser, faExclamation, faFileAlt, faFileAudio, faFilePdf, faFilm, faFilter, faFont, faGlobeAsia, faHighlighter,
@@ -149,7 +152,7 @@ export class MobileInterface extends React.Component {
* Return 'Home", which implies returning to 'Home' buttons
*/
returnHome = () => {
- if (this._homeMenu === false || this.sidebarActive === true) {
+ if (this._homeMenu || this.sidebarActive) {
this._homeMenu = true;
this._parents = [];
this._activeDoc = this._homeDoc;
@@ -220,7 +223,7 @@ export class MobileInterface extends React.Component {
*/
handleClick = async (doc: Doc) => {
const children = DocListCast(doc.data);
- if (doc.type !== "collection") {
+ if (doc.type !== "collection" && this.sidebarActive) {
this._parents.push(this._activeDoc);
this._activeDoc = doc;
this.switchCurrentView((userDoc: Doc) => doc);
@@ -333,7 +336,7 @@ export class MobileInterface extends React.Component {
// Renders the contents of the menu and sidebar
renderDefaultContent = () => {
- if (this._homeMenu === true) {
+ if (this._homeMenu) {
return (
@@ -351,7 +354,7 @@ export class MobileInterface extends React.Component {
ScriptField.MakeScript("createNewWorkspace()")}>Create New Workspace
+ onClick={() => MainView.Instance?.createNewWorkspace()}>Create New Workspace
@@ -403,7 +406,10 @@ export class MobileInterface extends React.Component {
{buttons}
ScriptField.MakeScript("createNewWorkspace()")}>Create New Workspace
+ style={{ opacity: 0.7 }}
+ onClick={() => this.createNewWorkspace()}>
+
+
Create New Workspace
>
}
@@ -413,6 +419,32 @@ export class MobileInterface extends React.Component {
);
}
+ /**
+ * Handles the Create New Workspace button in the menu
+ */
+ @action
+ createNewWorkspace = async (id?: string) => {
+ const workspaces = Cast(this.userDoc.myWorkspaces, Doc) as Doc;
+ const workspaceCount = DocListCast(workspaces.data).length + 1;
+ const freeformOptions: DocumentOptions = {
+ x: 0,
+ y: 400,
+ title: "Collection " + workspaceCount,
+ _LODdisable: true
+ };
+ const freeformDoc = CurrentUserUtils.GuestTarget || Docs.Create.FreeformDocument([], freeformOptions);
+ const workspaceDoc = Docs.Create.StandardCollectionDockingDocument([{ doc: freeformDoc, initialWidth: 600, path: [Doc.UserDoc().myCatalog as Doc] }], { title: `Workspace ${workspaceCount}` }, id, "row");
+
+ const toggleTheme = ScriptField.MakeScript(`self.darkScheme = !self.darkScheme`);
+ const toggleComic = ScriptField.MakeScript(`toggleComicMode()`);
+ const cloneWorkspace = ScriptField.MakeScript(`cloneWorkspace()`);
+ workspaceDoc.contextMenuScripts = new List
([toggleTheme!, toggleComic!, cloneWorkspace!]);
+ workspaceDoc.contextMenuLabels = new List(["Toggle Theme Colors", "Toggle Comic Mode", "New Workspace Layout"]);
+
+ Doc.AddDocToList(workspaces, "data", workspaceDoc);
+ // bcz: strangely, we need a timeout to prevent exceptions/issues initializing GoldenLayout (the rendering engine for Main Container)
+ }
+
stop = (e: React.MouseEvent) => {
e.stopPropagation();
}
@@ -431,7 +463,7 @@ export class MobileInterface extends React.Component {
}
}
- // Button for switching between pan and ink mode
+ // Button for switching between pen and ink mode
@action
onSwitchInking = () => {
const button = document.getElementById("inkButton") as HTMLElement;
@@ -465,6 +497,16 @@ export class MobileInterface extends React.Component {
if (this._activeDoc._viewType === "docking") {
return (
<>
+ {/* {
+ UndoManager.Undo();
+ e.stopPropagation();
+ }}>
+
+
*/}
+ {/*
{
+ UndoManager.Redo();
+ e.stopPropagation();
+ }}>
+
+
*/}
>);
}
}
@@ -645,6 +697,12 @@ export class MobileInterface extends React.Component {
);
}
+ displayRadialMenu = () => {
+ if (this._activeDoc.type === "collection" && this._activeDoc !== this._homeDoc) {
+ return
;
+ }
+ }
+
onDragOver = (e: React.DragEvent) => {
e.preventDefault();
e.stopPropagation();
@@ -669,12 +727,14 @@ export class MobileInterface extends React.Component {
{this.displayWorkspaces()}
{this.renderDefaultContent()}
-
+ {this.displayRadialMenu()}
);
}
}
+
+
Scripting.addGlobal(function switchMobileView(doc: (userDoc: Doc) => Doc, renderView?: () => JSX.Element, onSwitch?: () => void) { return MobileInterface.Instance.switchCurrentView(doc, renderView, onSwitch); });
Scripting.addGlobal(function openMobilePresentation() { return MobileInterface.Instance.setupDefaultPresentation(); });
Scripting.addGlobal(function toggleMobileSidebar() { return MobileInterface.Instance.toggleSidebar(); });
diff --git a/src/server/ApiManagers/PDFManager.ts b/src/server/ApiManagers/PDFManager.ts
index d2a9e9cce..b0b5a484a 100644
--- a/src/server/ApiManagers/PDFManager.ts
+++ b/src/server/ApiManagers/PDFManager.ts
@@ -55,7 +55,8 @@ async function CreateThumbnail(coreFilename: string, pageNum: number, res: expre
const documentProxy = await Pdfjs.getDocument(sourcePath).promise;
const factory = new NodeCanvasFactory();
const page = await documentProxy.getPage(pageNum);
- const viewport = page.getViewport(1 as any);
+ const scale = 1;
+ const viewport = page.getViewport(scale as any);
const { canvas, context } = factory.create(viewport.width, viewport.height);
const renderContext = {
canvasContext: context,
--
cgit v1.2.3-70-g09d2
From 48e841282b896a0961d595281211b276b7a9d345 Mon Sep 17 00:00:00 2001
From: geireann <60007097+geireann@users.noreply.github.com>
Date: Fri, 26 Jun 2020 22:06:33 +0800
Subject: audio dictation
---
src/client/util/CurrentUserUtils.ts | 2 +-
.../views/nodes/formattedText/FormattedTextBox.tsx | 4 +
src/mobile/AudioUpload.tsx | 10 +-
src/mobile/MobileInterface.tsx | 116 +++++++--------------
4 files changed, 48 insertions(+), 84 deletions(-)
(limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index 823a99436..e402718bf 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -474,7 +474,7 @@ export class CurrentUserUtils {
static setupMobileButtons(doc?: Doc, buttons?: string[]) {
const docProtoData: { title: string, icon: string, drag?: string, ignoreClick?: boolean, click?: string, ischecked?: string, activePen?: Doc, backgroundColor?: string, info: string, dragFactory?: Doc }[] = [
- { title: "WORKSPACES", icon: "bars", click: 'openMobileWorkspaces()', backgroundColor: "lightgrey", info: "Access your Workspaces from your mobile, and navigate through all of your documents. " },
+ { title: "WORKSPACES", icon: "bars", click: 'switchToMobileLibrary()', backgroundColor: "lightgrey", info: "Access your Workspaces from your mobile, and navigate through all of your documents. " },
{ title: "UPLOAD", icon: "upload", click: 'uploadImageMobile()', backgroundColor: "lightgrey", info: "Upload files from your mobile device so they can be accessed on Dash Web." },
{ title: "MOBILE UPLOAD", icon: "mobile", click: 'switchToMobileUploads()', backgroundColor: "lightgrey", info: "Access the collection of your mobile uploads." },
{ title: "RECORD", icon: "microphone", click: 'openMobileAudio()', backgroundColor: "lightgrey", info: "Use your phone to record, dictate and then upload audio onto Dash Web." },
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
index 3eecc98a4..b5591ca02 100644
--- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx
+++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
@@ -505,6 +505,8 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp
}
recordDictation = () => {
+ console.log("recording dictation");
+ console.log(this._editorView);
DictationManager.Controls.listen({
interimHandler: this.setCurrentBulletContent,
continuous: { indefinite: false },
@@ -523,6 +525,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp
}
recordBullet = async () => {
+ console.log("recording bullet");
const completedCue = "end session";
const results = await DictationManager.Controls.listen({
interimHandler: this.setCurrentBulletContent,
@@ -539,6 +542,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp
setCurrentBulletContent = (value: string) => {
if (this._editorView) {
+ console.log("this._editorView");
const state = this._editorView.state;
const now = Date.now();
let mark = schema.marks.user_mark.create({ userid: Doc.CurrentUserEmail, modified: Math.floor(now / 1000) });
diff --git a/src/mobile/AudioUpload.tsx b/src/mobile/AudioUpload.tsx
index f859b0ba3..83da41d90 100644
--- a/src/mobile/AudioUpload.tsx
+++ b/src/mobile/AudioUpload.tsx
@@ -19,6 +19,9 @@ import { nullAudio } from '../fields/URLField';
import { Transform } from '../client/util/Transform';
import { DocumentView } from '../client/views/nodes/DocumentView';
import { MobileInterface } from './MobileInterface';
+import { DictationOverlay } from '../client/views/DictationOverlay';
+import RichTextMenu from '../client/views/nodes/formattedText/RichTextMenu';
+import { ContextMenu } from '../client/views/ContextMenu';
export interface ImageUploadProps {
Document: Doc;
@@ -57,6 +60,9 @@ export class AudioUpload extends React.Component {
private get uploadInterface() {
return (
<>
+
+
+
this.closeUpload()}>
@@ -66,10 +72,10 @@ export class AudioUpload extends React.Component {
Document={this._audioCol}
DataDoc={undefined}
LibraryPath={emptyPath}
- addDocument={returnFalse}
+ addDocument={undefined}
addDocTab={returnFalse}
pinToPres={emptyFunction}
- rootSelected={returnFalse}
+ rootSelected={returnTrue}
removeDocument={undefined}
docFilters={returnEmptyFilter}
onClick={undefined}
diff --git a/src/mobile/MobileInterface.tsx b/src/mobile/MobileInterface.tsx
index ed5076402..90672e19f 100644
--- a/src/mobile/MobileInterface.tsx
+++ b/src/mobile/MobileInterface.tsx
@@ -45,6 +45,8 @@ import { Cast, FieldValue } from '../fields/Types';
import { CollectionView } from '../client/views/collections/CollectionView';
import { InkingStroke } from '../client/views/InkingStroke';
import RichTextMenu from "../client/views/nodes/formattedText/RichTextMenu";
+import { AudioBox } from "../client/views/nodes/AudioBox";
+import { FormattedTextBox } from "../client/views/nodes/formattedText/FormattedTextBox";
library.add(faTasks, faReply, faQuoteLeft, faHandPointLeft, faFolderOpen, faAngleDoubleLeft, faExternalLinkSquareAlt, faMobile, faThLarge, faWindowClose, faEdit, faTrashAlt, faPalette, faAngleRight, faBell, faTrash, faCamera, faExpand, faCaretDown, faCaretLeft, faCaretRight, faCaretSquareDown, faCaretSquareRight, faArrowsAltH, faPlus, faMinus,
faTerminal, faToggleOn, fileSolid, faExternalLinkAlt, faLocationArrow, faSearch, faFileDownload, faStop, faCalculator, faWindowMaximize, faAddressCard,
@@ -80,13 +82,22 @@ export class MobileInterface extends React.Component {
@action
componentDidMount = () => {
- Doc.UserDoc().activeMobile = this._homeDoc;
+ // Doc.UserDoc().activeMobile = this._homeDoc;
this._homeDoc._viewType === "stacking" ? this.menuListView = true : this.menuListView = false;
Doc.SetSelectedTool(InkTool.None);
- this.switchCurrentView((userDoc: Doc) => this._homeDoc);
+ Doc.UserDoc().activeMobile = this._homeDoc;
+ AudioBox.Enabled = true;
document.removeEventListener("dblclick", this.onReactDoubleClick);
document.addEventListener("dblclick", this.onReactDoubleClick);
+ document.addEventListener("dash", (e: any) => { // event used by chrome plugin to tell Dash which document to focus on
+ const id = FormattedTextBox.GetDocFromUrl(e.detail);
+ DocServer.GetRefField(id).then(doc => {
+ if (doc instanceof Doc) {
+ DocumentManager.Instance.jumpToDocument(doc, false, undefined);
+ }
+ });
+ });
}
@action
@@ -101,10 +112,14 @@ export class MobileInterface extends React.Component {
// Switch the mobile view to the given doc
@action
- switchCurrentView = (doc: (userDoc: Doc) => Doc, renderView?: () => JSX.Element, onSwitch?: () => void) => {
+ switchCurrentView = (doc: Doc, renderView?: () => JSX.Element, onSwitch?: () => void) => {
if (!this.userDoc) return;
-
- Doc.UserDoc().activeMobile = doc(this.userDoc);
+ if (this._activeDoc === this._homeDoc) {
+ this._parents.push(this._activeDoc);
+ this._homeMenu = false;
+ }
+ this._activeDoc = doc;
+ Doc.UserDoc().activeMobile = doc;
onSwitch && onSwitch();
this.renderView = renderView;
@@ -118,21 +133,10 @@ export class MobileInterface extends React.Component {
* Method called when 'Library' button is pressed on the home screen
*/
switchToLibrary = async () => {
- this._parents.push(this._activeDoc);
- this.switchCurrentView((userDoc: Doc) => this._library);
- this._activeDoc = this._library;
+ this.switchCurrentView(this._library);
this._homeMenu = false;
this.toggleSidebar();
//setTimeout(this.toggleSidebar, 300);
-
- }
-
- openWorkspaces = () => {
- this._parents.push(this._activeDoc);
- this.switchCurrentView((userDoc: Doc) => this._library);
- this._activeDoc = this._library;
- this._homeMenu = false;
- this.sidebarActive = true;
}
/**
@@ -144,24 +148,20 @@ export class MobileInterface extends React.Component {
if (doc === Cast(this._library, Doc) as Doc) {
this._child = null;
- this.userDoc.activeMobile = this._library;
+ this.switchCurrentView(this._library);
} else if (doc === Cast(this._homeDoc, Doc) as Doc) {
this._homeMenu = true;
this._parents = [];
- this._activeDoc = this._homeDoc;
this._child = null;
- this.switchCurrentView((userDoc: Doc) => this._homeDoc);
+ this.switchCurrentView(this._homeDoc);
} else {
if (doc) {
this._child = doc;
- this.switchCurrentView((userDoc: Doc) => doc);
+ this.switchCurrentView(doc);
this._homeMenu = false;
header.textContent = String(doc.title);
}
}
- if (doc) {
- this._activeDoc = doc;
- }
this._ink = false;
}
@@ -172,9 +172,8 @@ export class MobileInterface extends React.Component {
if (!this._homeMenu || this.sidebarActive) {
this._homeMenu = true;
this._parents = [];
- this._activeDoc = this._homeDoc;
this._child = null;
- this.switchCurrentView((userDoc: Doc) => this._homeDoc);
+ this.switchCurrentView(this._homeDoc);
}
if (this.sidebarActive) {
this.toggleSidebar();
@@ -186,8 +185,7 @@ export class MobileInterface extends React.Component {
*/
returnMain = () => {
this._parents = [this._homeDoc];
- this._activeDoc = this._library;
- this.switchCurrentView((userDoc: Doc) => this._library);
+ this.switchCurrentView(this._library);
this._homeMenu = false;
this._child = null;
}
@@ -244,21 +242,17 @@ export class MobileInterface extends React.Component {
* Navigates to the given doc and updates the sidebar.
* @param doc: doc for which the method is called
*/
- @undoBatch
handleClick = async (doc: Doc) => {
const children = DocListCast(doc.data);
if (doc.type !== "collection" && this.sidebarActive) {
this._parents.push(this._activeDoc);
- this._activeDoc = doc;
- this.switchCurrentView((userDoc: Doc) => doc);
+ this.switchCurrentView(doc);
this._homeMenu = false;
this.toggleSidebar();
}
- else if (doc.type === "collection" && children.length === 0) this.openFromSidebar(doc);
else {
this._parents.push(this._activeDoc);
- this._activeDoc = doc;
- this.switchCurrentView((userDoc: Doc) => doc);
+ this.switchCurrentView(doc);
this._homeMenu = false;
this._child = doc;
}
@@ -266,8 +260,7 @@ export class MobileInterface extends React.Component {
openFromSidebar = (doc: Doc) => {
this._parents.push(this._activeDoc);
- this._activeDoc = doc;
- this.switchCurrentView((userDoc: Doc) => doc);
+ this.switchCurrentView(doc);
this._homeMenu = false;
this._child = doc; //?
this.toggleSidebar();
@@ -354,16 +347,14 @@ export class MobileInterface extends React.Component {
// Handles when user clicks on a document in the pathbar
handlePathClick = (doc: Doc, index: number) => {
if (doc === this._library) {
- this._activeDoc = doc;
this._child = null;
- this.switchCurrentView((userDoc: Doc) => doc);
+ this.switchCurrentView(doc);
this._parents.length = index;
} else if (doc === this._homeDoc) {
this.returnHome();
} else {
- this._activeDoc = doc;
this._child = doc;
- this.switchCurrentView((userDoc: Doc) => doc);
+ this.switchCurrentView(doc);
this._parents.length = index;
}
}
@@ -610,31 +601,6 @@ export class MobileInterface extends React.Component {
}
}
- // Mobile audio doc
- recordAudio = async () => {
- // upload to server with known URL
- if (this._activeDoc.title !== "mobile audio") {
- this._parents.push(this._activeDoc);
- }
- const audioDoc = Cast(Docs.Create.AudioDocument(nullAudio, { _width: 200, _height: 100, title: "mobile audio" }), Doc) as Doc;
- if (audioDoc) {
- this._activeDoc = audioDoc;
- this.switchCurrentView((userDoc: Doc) => audioDoc);
- this._homeMenu = false;
- }
- }
-
- // // Pushing the audio doc onto Dash Web through the right side bar
- // uploadAudio = () => {
- // const audioRightSidebar = Cast(Doc.UserDoc().rightSidebarCollection, Doc) as Doc;
- // const audioDoc = this._activeDoc;
- // const data = Cast(audioRightSidebar.data, listSpec(Doc));
-
- // if (data) {
- // data.push(audioDoc);
- // }
- // }
-
// Button for pinning images to presentation
pinToPresentation = () => {
// Only making button available if it is an image
@@ -719,15 +685,11 @@ export class MobileInterface extends React.Component {
// For setting up the presentation document for the home menu
setupDefaultPresentation = () => {
- if (this._activeDoc.title !== "Presentation") {
- this._parents.push(this._activeDoc);
- }
const presentation = Cast(Doc.UserDoc().activePresentation, Doc) as Doc;
if (presentation) {
- this._activeDoc = presentation;
- this.switchCurrentView((userDoc: Doc) => presentation);
+ this.switchCurrentView(presentation);
this._homeMenu = false;
}
}
@@ -801,13 +763,8 @@ export class MobileInterface extends React.Component {
}
switchToMobileUploads = () => {
- if (this._activeDoc.title !== "Presentation") {
- this._parents.push(this._activeDoc);
- }
const mobileUpload = Cast(Doc.UserDoc().rightSidebarCollection, Doc) as Doc;
- console.log(mobileUpload.title);
- this._activeDoc = mobileUpload;
- this.switchCurrentView((userDoc: Doc) => mobileUpload);
+ this.switchCurrentView(mobileUpload);
this._homeMenu = false;
}
@@ -831,9 +788,7 @@ export class MobileInterface extends React.Component {
{this.undo()}
{this.drawInk()}
{this.redo()}
- {/* {this.upload()} */}
{this.uploadImageButton()}
- {/* {this.uploadAudioButton()} */}
{this.displayWorkspaces()}
{this.renderDefaultContent()}
@@ -846,14 +801,13 @@ export class MobileInterface extends React.Component {
-Scripting.addGlobal(function switchMobileView(doc: (userDoc: Doc) => Doc, renderView?: () => JSX.Element, onSwitch?: () => void) { return MobileInterface.Instance.switchCurrentView(doc, renderView, onSwitch); },
+Scripting.addGlobal(function switchMobileView(doc: Doc, renderView?: () => JSX.Element, onSwitch?: () => void) { return MobileInterface.Instance.switchCurrentView(doc, renderView, onSwitch); },
"changes the active document displayed on the mobile, (doc: any)");
Scripting.addGlobal(function openMobilePresentation() { return MobileInterface.Instance.setupDefaultPresentation(); },
"opens the presentation on mobile");
Scripting.addGlobal(function toggleMobileSidebar() { return MobileInterface.Instance.toggleSidebar(); });
Scripting.addGlobal(function openMobileAudio() { return MobileInterface.Instance.toggleAudio(); });
Scripting.addGlobal(function openMobileSettings() { return SettingsManager.Instance.open(); });
-Scripting.addGlobal(function openMobileWorkspaces() { return MobileInterface.Instance.openWorkspaces(); });
Scripting.addGlobal(function uploadImageMobile() { return MobileInterface.Instance.toggleUpload(); });
Scripting.addGlobal(function switchToMobileUploads() { return MobileInterface.Instance.switchToMobileUploads(); });
-Scripting.addGlobal(function switchToLibrary() { return MobileInterface.Instance.switchToLibrary(); });
\ No newline at end of file
+Scripting.addGlobal(function switchToMobileLibrary() { return MobileInterface.Instance.switchToLibrary(); });
\ No newline at end of file
--
cgit v1.2.3-70-g09d2
From 24ac6997048932c4f2717651e992f744e6a5276a Mon Sep 17 00:00:00 2001
From: anika-ahluwalia