diff options
author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-07-03 11:24:34 +0530 |
---|---|---|
committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-07-03 11:24:34 +0530 |
commit | 08afc54f9341b7b5cca3e7846fdfa7bcd701a23c (patch) | |
tree | e204d7b11bc207247f911a5e611de42c363cbd8f /src/mobile/MobileMain.tsx | |
parent | d7f2f6994ce6f2a450dff67b3595a692be9cb977 (diff) | |
parent | da0b78bb21d29cb861e1b684023b991b9f95e62b (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into acls_uv
Diffstat (limited to 'src/mobile/MobileMain.tsx')
-rw-r--r-- | src/mobile/MobileMain.tsx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mobile/MobileMain.tsx b/src/mobile/MobileMain.tsx new file mode 100644 index 000000000..3d4680d58 --- /dev/null +++ b/src/mobile/MobileMain.tsx @@ -0,0 +1,25 @@ +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(); + +(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 |