From 6735117aee9070764b5319df7939ecd05f6d448b Mon Sep 17 00:00:00 2001 From: Jamie Holdstock Date: Fri, 12 Mar 2021 13:22:16 +0000 Subject: [PATCH] Disable account lookup on solo pools. (#310) Disable account lookup form element and display a message to notify the feature is not available. --- gui/account.go | 1 + gui/admin.go | 1 + gui/assets/public/css/dcrpool.css | 2 +- gui/assets/templates/header.html | 6 +++--- gui/gui.go | 1 + gui/index.go | 1 + 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gui/account.go b/gui/account.go index 337ca5a2..6cb466a9 100644 --- a/gui/account.go +++ b/gui/account.go @@ -68,6 +68,7 @@ func (ui *GUI) account(w http.ResponseWriter, r *http.Request) { CSRF: csrf.TemplateField(r), Designation: ui.cfg.Designation, ShowMenu: true, + SoloPool: ui.cfg.SoloPool, }, MinedWork: recentWork, PendingPaymentsTotal: totalPending, diff --git a/gui/admin.go b/gui/admin.go index 0c9b8efc..c8a5b980 100644 --- a/gui/admin.go +++ b/gui/admin.go @@ -59,6 +59,7 @@ func (ui *GUI) adminPage(w http.ResponseWriter, r *http.Request) { CSRF: csrf.TemplateField(r), Designation: ui.cfg.Designation, ShowMenu: false, + SoloPool: ui.cfg.SoloPool, }, PoolStatsData: poolStatsData{ LastWorkHeight: ui.cfg.FetchLastWorkHeight(), diff --git a/gui/assets/public/css/dcrpool.css b/gui/assets/public/css/dcrpool.css index 66bcf4e0..ffc5a923 100644 --- a/gui/assets/public/css/dcrpool.css +++ b/gui/assets/public/css/dcrpool.css @@ -8656,7 +8656,7 @@ https://flickity.metafizzy.co font-size: 14px; height: 20px; margin-top: 2px; - opacity: 0; + opacity: 1; transition: all 0.25s; } diff --git a/gui/assets/templates/header.html b/gui/assets/templates/header.html index 564479bb..b7b778d1 100644 --- a/gui/assets/templates/header.html +++ b/gui/assets/templates/header.html @@ -86,14 +86,14 @@

Account Information

To know your mining account details, enter your mining address.

I'm an Admin - +
diff --git a/gui/gui.go b/gui/gui.go index 73db663f..0a583ee3 100644 --- a/gui/gui.go +++ b/gui/gui.go @@ -117,6 +117,7 @@ type headerData struct { CSRF template.HTML Designation string ShowMenu bool + SoloPool bool } // route configures the http router of the user interface. diff --git a/gui/index.go b/gui/index.go index 1ce44c9c..18b1e9d8 100644 --- a/gui/index.go +++ b/gui/index.go @@ -55,6 +55,7 @@ func (ui *GUI) renderIndex(w http.ResponseWriter, r *http.Request, modalError st CSRF: csrf.TemplateField(r), Designation: ui.cfg.Designation, ShowMenu: true, + SoloPool: ui.cfg.SoloPool, }, PoolStatsData: poolStatsData{ LastWorkHeight: ui.cfg.FetchLastWorkHeight(),