From c09570cf391c0589692d276e172b0e30497acccb Mon Sep 17 00:00:00 2001 From: zadam Date: Sat, 9 Feb 2019 19:17:16 +0100 Subject: [PATCH] global menu --- src/public/javascripts/desktop.js | 7 +++++++ src/views/desktop.ejs | 35 +++++++++++++++++++------------ 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/src/public/javascripts/desktop.js b/src/public/javascripts/desktop.js index 50697abb9..ab8b709cd 100644 --- a/src/public/javascripts/desktop.js +++ b/src/public/javascripts/desktop.js @@ -94,6 +94,13 @@ $(document).on("click", "button[data-help-page]", e => { $("#logout-button").toggle(!utils.isElectron()); +$("#logout-button").click(() => { + const $logoutForm = $('
'); + + $("body").append($logoutForm); + $logoutForm.submit(); +}); + $("#tree").on("click", ".unhoist-button", hoistedNoteService.unhoist); if (utils.isElectron()) { diff --git a/src/views/desktop.ejs b/src/views/desktop.ejs index edd7506ad..3664f3976 100644 --- a/src/views/desktop.ejs +++ b/src/views/desktop.ejs @@ -44,20 +44,29 @@
- - - - - - - + +