From 1a6feb447f9c4fd461ba02dc45a93e569a283be0 Mon Sep 17 00:00:00 2001
From: Sam Wilkins <samwilkins333@gmail.com>
Date: Sat, 6 Jun 2020 00:04:54 -0700
Subject: initial commit

---
 src/mobile/MobileMain.tsx | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 src/mobile/MobileMain.tsx

(limited to 'src/mobile/MobileMain.tsx')

diff --git a/src/mobile/MobileMain.tsx b/src/mobile/MobileMain.tsx
new file mode 100644
index 000000000..34f06438f
--- /dev/null
+++ b/src/mobile/MobileMain.tsx
@@ -0,0 +1,25 @@
+import { DocServer } from '../client/DocServer';
+import { Docs } from '../client/documents/Documents';
+import * as ReactDOM from "react-dom";
+import { MobileInterface } from './MobileInterface';
+import * as React from "react";
+import { AssignAllExtensions } from '../extensions/General/Extensions';
+import { CurrentUserUtils } from '../client/util/CurrentUserUtils';
+
+AssignAllExtensions();
+
+(async () => {
+    const info = await CurrentUserUtils.loadCurrentUser();
+    DocServer.init(window.location.protocol, window.location.hostname, 4321, info.email + " (mobile)");
+    await Docs.Prototypes.initialize();
+    if (info.id !== "__guest__") {
+        // a guest will not have an id registered
+        await CurrentUserUtils.loadUserDocument(info);
+    }
+    document.getElementById('root')!.addEventListener('wheel', event => {
+        if (event.ctrlKey) {
+            event.preventDefault();
+        }
+    }, true);
+    ReactDOM.render(<MobileInterface />, document.getElementById('root'));
+})();
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2


From 1f437abfeabf897887fb9e3097df06a1934ae884 Mon Sep 17 00:00:00 2001
From: Sam Wilkins <samwilkins333@gmail.com>
Date: Sat, 6 Jun 2020 01:14:09 -0700
Subject: fixed import ordering

---
 src/client/views/webcam/WebCamLogic.js |  5 +----
 src/mobile/MobileInterface.tsx         | 33 ++++++++++++++++++++++-----------
 src/mobile/MobileMain.tsx              | 14 +++++++-------
 3 files changed, 30 insertions(+), 22 deletions(-)

(limited to 'src/mobile/MobileMain.tsx')

diff --git a/src/client/views/webcam/WebCamLogic.js b/src/client/views/webcam/WebCamLogic.js
index a8a2f5fa4..5f6202bc8 100644
--- a/src/client/views/webcam/WebCamLogic.js
+++ b/src/client/views/webcam/WebCamLogic.js
@@ -1,8 +1,5 @@
 'use strict';
 import io from "socket.io-client";
-import {
-    resolvedPorts
-} from "../Main";
 
 var socket;
 var isChannelReady = false;
@@ -32,7 +29,7 @@ export function initialize(roomName, handlerUI) {
 
     room = roomName;
 
-    socket = io.connect(`${window.location.protocol}//${window.location.hostname}:${resolvedPorts.socket}`);
+    socket = io.connect(`${window.location.protocol}//${window.location.hostname}:4321`);
 
     if (room !== '') {
         socket.emit('create or join', room);
diff --git a/src/mobile/MobileInterface.tsx b/src/mobile/MobileInterface.tsx
index 1f7244653..052c8975a 100644
--- a/src/mobile/MobileInterface.tsx
+++ b/src/mobile/MobileInterface.tsx
@@ -1,33 +1,44 @@
-import React = require('react');
+import * as React from "react";
 import { library } from '@fortawesome/fontawesome-svg-core';
-import { faEraser, faHighlighter, faLongArrowAltLeft, faMousePointer, faPenNib, faThumbtack, faHome } from '@fortawesome/free-solid-svg-icons';
+import {
+    faTasks, 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,
+    faLongArrowAltRight, faMicrophone, faMousePointer, faMusic, faObjectGroup, faPause, faPen, faPenNib, faPhone, faPlay, faPortrait, faRedoAlt, faStamp, faStickyNote,
+    faThumbtack, faTree, faTv, faUndoAlt, faVideo, faAsterisk, faBrain, faImage, faPaintBrush, faTimes, faEye, faHome, faLongArrowAltLeft
+} from '@fortawesome/free-solid-svg-icons';
 import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
 import { action, computed, observable } from 'mobx';
 import { observer } from 'mobx-react';
 import * as rp from 'request-promise';
+import { Doc, DocListCast, FieldResult } from '../fields/Doc';
+import { Id } from '../fields/FieldSymbols';
+import { FieldValue, Cast, StrCast } 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 { Scripting } from '../client/util/Scripting';
 import { DocumentView } from '../client/views/nodes/DocumentView';
-import { emptyPath, emptyFunction, returnFalse, returnOne, returnTrue, returnZero, Utils } from '../Utils';
 import { Transform } from '../client/util/Transform';
-import { Scripting } from '../client/util/Scripting';
 import { InkingControl } from '../client/views/InkingControl';
 import "./MobileInterface.scss";
 import "./MobileMenu.scss";
-import { DocServer } from '../client/DocServer';
 import { DocumentManager } from '../client/util/DocumentManager';
 import SettingsManager from '../client/util/SettingsManager';
 import { Uploader } from "./ImageUpload";
 import { DockedFrameRenderer } from '../client/views/collections/CollectionDockingView';
-import { Doc, DocListCast, FieldResult } from '../fields/Doc';
-import { FieldValue, Cast, StrCast } from '../fields/Types';
 import { InkTool } from '../fields/InkField';
 import { listSpec } from '../fields/Schema';
 import { nullAudio, WebField } from '../fields/URLField';
-import { Id } from '../fields/FieldSymbols';
-import { CurrentUserUtils } from '../client/util/CurrentUserUtils';
 
-library.add(faLongArrowAltLeft);
-library.add(faHome);
+library.add(faTasks, 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,
+    faLongArrowAltRight, faMicrophone, faMousePointer, faMusic, faObjectGroup, faPause, faPen, faPenNib, faPhone, faPlay, faPortrait, faRedoAlt, faStamp, faStickyNote,
+    faThumbtack, faTree, faTv, faUndoAlt, faVideo, faAsterisk, faBrain, faImage, faPaintBrush, faTimes, faEye, faHome, faLongArrowAltLeft);
 
 @observer
 export class MobileInterface extends React.Component {
diff --git a/src/mobile/MobileMain.tsx b/src/mobile/MobileMain.tsx
index 34f06438f..3d4680d58 100644
--- a/src/mobile/MobileMain.tsx
+++ b/src/mobile/MobileMain.tsx
@@ -1,10 +1,10 @@
-import { DocServer } from '../client/DocServer';
-import { Docs } from '../client/documents/Documents';
-import * as ReactDOM from "react-dom";
-import { MobileInterface } from './MobileInterface';
-import * as React from "react";
-import { AssignAllExtensions } from '../extensions/General/Extensions';
-import { CurrentUserUtils } from '../client/util/CurrentUserUtils';
+import { MobileInterface } from "./MobileInterface";
+import { Docs } from "../client/documents/Documents";
+import { CurrentUserUtils } from "../client/util/CurrentUserUtils";
+import * as ReactDOM from 'react-dom';
+import * as React from 'react';
+import { DocServer } from "../client/DocServer";
+import { AssignAllExtensions } from "../extensions/General/Extensions";
 
 AssignAllExtensions();
 
-- 
cgit v1.2.3-70-g09d2

