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) diff --git a/plugins/Sidebar/SidebarPlugin.py b/plugins/Sidebar/SidebarPlugin.py index 987751e6..27f1e636 100644 --- a/plugins/Sidebar/SidebarPlugin.py +++ b/plugins/Sidebar/SidebarPlugin.py @@ -434,15 +434,41 @@ 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(_("""
  • """))