From 2bc26bfb31443740f46d8bf59310e53625bcd4f2 Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Sat, 4 Jun 2022 07:27:59 +0000 Subject: [PATCH 1/3] Split custom/BTC/Monero donations for sites --- plugins/Sidebar/SidebarPlugin.py | 36 +++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/plugins/Sidebar/SidebarPlugin.py b/plugins/Sidebar/SidebarPlugin.py index 987751e6..5c771543 100644 --- a/plugins/Sidebar/SidebarPlugin.py +++ b/plugins/Sidebar/SidebarPlugin.py @@ -434,15 +434,37 @@ class UiWebsocketPlugin(object): """)) - donate_key = site.content_manager.contents.get("content.json", {}).get("donate", None) - if type(donate_key) is str and len(donate_key) > 0: + 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) + if donate_enabled: body.append(_("""
  • -
    -
    - {donate_key} - {_[Donate]} -
    +
    + """)) + if donate_generic: + body.append(_(""" +
    + {donate_generic} +
    + """)) + if donate_btc: + body.append(_(""" +
    + {donate_btc} + {_[Donate BTC]} +
    + """)) + if donate_xmr: + body.append(_(""" +
    + {donate_key} + {_[Donate Monero]} +
    + """)) + if donate_enabled: + body.append(_("""
  • """)) From 828c297788a932d3c66f990154be85dfd7837304 Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Wed, 8 Jun 2022 19:50:22 +0000 Subject: [PATCH 2/3] fix sidebar donations --- plugins/Sidebar/SidebarPlugin.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/Sidebar/SidebarPlugin.py b/plugins/Sidebar/SidebarPlugin.py index 5c771543..27f1e636 100644 --- a/plugins/Sidebar/SidebarPlugin.py +++ b/plugins/Sidebar/SidebarPlugin.py @@ -452,14 +452,18 @@ class UiWebsocketPlugin(object): if donate_btc: body.append(_("""
    - {donate_btc} + {donate_btc}
    +
    + """)) if donate_xmr: body.append(_("""
    - {donate_key} + {donate_key}
    +
    + """)) From 7a9a91d08e76ae734bc0bae70e90ecadb12040cb Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Wed, 8 Jun 2022 19:50:39 +0000 Subject: [PATCH 3/3] CHANGELOG sidebar donations --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d18d0011..d1465392 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### zeronet-conservancy 0.7.5+ maintainers: @caryoscelus, @d4708, @FraYoshi, @prtngn +- introduce multiple donations methods (@caryoscelus) - easier termux startup script (@unmanbearpig) - Brazilian Portuguese readme translation (@iFallenHunt) - reduce fingerprinting information (@caryoscelus)