From bdd63b42d00fe6b415786f14bd8467449205f4b0 Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Tue, 15 Nov 2022 20:15:48 +0000 Subject: [PATCH] add support for ada/cardano donation addresses in sidebar refs #95 --- plugins/Sidebar/SidebarPlugin.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/Sidebar/SidebarPlugin.py b/plugins/Sidebar/SidebarPlugin.py index ddbd7cd63..ececb10bd 100644 --- a/plugins/Sidebar/SidebarPlugin.py +++ b/plugins/Sidebar/SidebarPlugin.py @@ -453,7 +453,8 @@ def sidebarRenderControls(self, body, site): donate_generic = site.content_manager.contents.get("content.json", {}).get("donate", None) or site.content_manager.contents.get("content.json", {}).get("donate-generic", None) donate_btc = site.content_manager.contents.get("content.json", {}).get("donate-btc", None) donate_xmr = site.content_manager.contents.get("content.json", {}).get("donate-xmr", None) - donate_enabled = bool(donate_generic or donate_btc or donate_xmr) + donate_ada = site.content_manager.contents.get("content.json", {}).get("donate-ada", None) + donate_enabled = bool(donate_generic or donate_btc or donate_xmr or donate_ada) if donate_enabled: body.append(_("""
  • @@ -483,6 +484,15 @@ def sidebarRenderControls(self, body, site): {_[Donate Monero]} """)) + if donate_ada: + body.append(_(""" +
    + {donate_ada}
    +
    + + """)) if donate_enabled: body.append(_("""