diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2019-02-27 10:29:53 -0500 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-02-27 10:29:53 -0500 |
| commit | 8bdef5c07d3ba7e6c6a8940bb6786805893812c7 (patch) | |
| tree | 66f02deb1f4b9dd758db927677ee91b31ed65e97 /src/client/views/Main.tsx | |
| parent | 042eb977ad7733919daf468001b17dbee4e1fa9f (diff) | |
workspaces menu initialized
Diffstat (limited to 'src/client/views/Main.tsx')
| -rw-r--r-- | src/client/views/Main.tsx | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx index e66816b6b..e55bc693e 100644 --- a/src/client/views/Main.tsx +++ b/src/client/views/Main.tsx @@ -1,4 +1,4 @@ -import { action, configure, reaction, computed } from 'mobx'; +import { action, configure, reaction, computed, observable } from 'mobx'; import "normalize.css"; import * as React from 'react'; import * as ReactDOM from 'react-dom'; @@ -19,6 +19,7 @@ import { Transform } from '../util/Transform'; import { CollectionDockingView } from './collections/CollectionDockingView'; import { FieldWaiting } from '../../fields/Field'; import { UndoManager } from '../util/UndoManager'; +import { WorkspacesMenu } from '../../server/authentication/controllers/WorkspacesMenu'; configure({ @@ -49,13 +50,13 @@ request.get(window.location.origin + "/getActiveWorkspaceId", (error, response, }, json: true }) + request.post(here + "/setActiveWorkspaceId", { + body: { + target: mainDocId + }, + json: true + }) } - request.post(here + "/setActiveWorkspaceId", { - body: { - target: mainDocId - }, - json: true - }) init(); }) @@ -184,6 +185,13 @@ function init() { right: '0px', width: '150px' }} onClick={() => window.location.pathname = "/logout"}>Logout</button> + <button style={{ + position: 'absolute', + top: '50px', + right: '0px', + width: '150px' + }} onClick={() => WorkspacesMenu.Instance.toggle()}>Workspaces</button> + <WorkspacesMenu /> </div>), document.getElementById('root')); }) |
