aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-06-10 10:29:41 -0400
committerbobzel <zzzman@gmail.com>2022-06-10 10:29:41 -0400
commit286740eab0a5111a155bd688a6ce0ab69909303e (patch)
treea35c4f0a6a9b08943d5e413c59e5397df5d625c6 /src
parent4909910355c321c3776a6405fd131bfb2954c4b9 (diff)
added logout to user label
Diffstat (limited to 'src')
-rw-r--r--src/client/views/topbar/TopBar.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/topbar/TopBar.tsx b/src/client/views/topbar/TopBar.tsx
index 0efde8197..0db3950a2 100644
--- a/src/client/views/topbar/TopBar.tsx
+++ b/src/client/views/topbar/TopBar.tsx
@@ -38,7 +38,10 @@ export class TopBar extends React.Component {
<div style={{ pointerEvents: "all", background: Colors.DARK_GRAY, borderBottom: Borders.STANDARD }} className="topbar-container">
<div className="topbar-inner-container">
<div className="topbar-left">
- {activeDashboard ? <div className="topbar-button-text">{Doc.CurrentUserEmail} (Placeholder)</div> : (null)}
+ {activeDashboard ? <div className="topbar-button-text" onClick={e => {
+ ContextMenu.Instance.addItem({ description: "Logout", event: () => window.location.assign(Utils.prepend("/logout")), icon: "edit" });
+ ContextMenu.Instance.displayMenu(e.clientX +5, e.clientY + 10);
+ }}>{Doc.CurrentUserEmail}</div> : (null)}
</div>
<div className="topbar-center" >
<div className="topbar-title" onClick={() => SelectionManager.SelectView(DocumentManager.Instance.getDocumentView(activeDashboard)!, false)}>