From 8e8debd8a448d64bdd10a6ab3550a627445945bf Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Mon, 31 Aug 2020 15:29:35 +0100 Subject: [PATCH] add about page to web ui --- data/static/admin.js | 6 + data/static/banner.svg | 283 +++++++++++++++++++++++++++++++++ data/templates/admin.html | 22 +++ images/jfa-go-banner-wide.svg | 284 +--------------------------------- views.go | 2 + 5 files changed, 314 insertions(+), 283 deletions(-) create mode 100644 data/static/banner.svg mode change 100644 => 120000 images/jfa-go-banner-wide.svg diff --git a/data/static/admin.js b/data/static/admin.js index 48bbe80..1b2926c 100644 --- a/data/static/admin.js +++ b/data/static/admin.js @@ -100,6 +100,7 @@ var userDefaultsModal = createModal('userDefaults'); var usersModal = createModal('users'); var restartModal = createModal('restartModal'); var refreshModal = createModal('refreshModal'); +var aboutModal = createModal('aboutModal'); // Parsed invite: [, , <1: Empty invite (no delete/link), 0: Actual invite>, , , [], , , ] function parseInvite(invite, empty = false) { @@ -606,6 +607,11 @@ document.getElementById('loginForm').onsubmit = function() { return false; }; +document.getElementById('openAbout').onclick = function() { + settingsModal.hide(); + aboutModal.show(); +}; + document.getElementById('openDefaultsWizard').onclick = function() { this.disabled = true this.innerHTML = diff --git a/data/static/banner.svg b/data/static/banner.svg new file mode 100644 index 0000000..627a830 --- /dev/null +++ b/data/static/banner.svg @@ -0,0 +1,283 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/templates/admin.html b/data/templates/admin.html index 82fb5ca..7c0004f 100644 --- a/data/templates/admin.html +++ b/data/templates/admin.html @@ -168,6 +168,9 @@ +

Accounts admin diff --git a/images/jfa-go-banner-wide.svg b/images/jfa-go-banner-wide.svg deleted file mode 100644 index 627a830..0000000 --- a/images/jfa-go-banner-wide.svg +++ /dev/null @@ -1,283 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/jfa-go-banner-wide.svg b/images/jfa-go-banner-wide.svg new file mode 120000 index 0000000..7b6d367 --- /dev/null +++ b/images/jfa-go-banner-wide.svg @@ -0,0 +1 @@ +../data/static/banner.svg \ No newline at end of file diff --git a/views.go b/views.go index 41611a2..22a10ad 100644 --- a/views.go +++ b/views.go @@ -16,6 +16,8 @@ func (app *appContext) AdminPage(gc *gin.Context) { "contactMessage": "", "email_enabled": emailEnabled, "notifications": notificationsEnabled, + "version": VERSION, + "commit": COMMIT, }) }