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(_("""
  • """))