plugins: minor tweaks
- add icon to PluginDialog - add icon to psbt_nosr - rename 'PSBT Nostr' as 'Nostr Multisig'
This commit is contained in:
@@ -9,6 +9,7 @@ from PyQt6.QtCore import Qt
|
||||
from electrum.i18n import _
|
||||
|
||||
from .util import WindowModalDialog, Buttons, CloseButton, WWLabel, insert_spaces, MessageBoxMixin, EnterButton
|
||||
from .util import read_QIcon_from_bytes, IconLabel
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -25,8 +26,9 @@ class PluginDialog(WindowModalDialog):
|
||||
author = metadata.get('author', '')
|
||||
description = metadata.get('description', '')
|
||||
requires = metadata.get('requires')
|
||||
version = metadata.get('version', 'n/a')
|
||||
version = metadata.get('version')
|
||||
zip_hash = metadata.get('zip_hash_sha256', None)
|
||||
icon_path = metadata.get('icon')
|
||||
|
||||
WindowModalDialog.__init__(self, window, 'Plugin')
|
||||
self.setMinimumSize(400, 250)
|
||||
@@ -37,17 +39,26 @@ class PluginDialog(WindowModalDialog):
|
||||
self.status_button = status_button
|
||||
p = self.plugins.get(name) # is enabled
|
||||
vbox = QVBoxLayout(self)
|
||||
name_label = IconLabel(text=display_name, reverse=True)
|
||||
if icon_path:
|
||||
name_label.icon_size = 64
|
||||
icon = read_QIcon_from_bytes(self.plugins.read_file(name, icon_path))
|
||||
name_label.setIcon(icon)
|
||||
vbox.addWidget(name_label)
|
||||
form = QFormLayout(None)
|
||||
form.addRow(QLabel(_('Name') + ':'), QLabel(display_name))
|
||||
form.addRow(QLabel(_('Author') + ':'), QLabel(author))
|
||||
form.addRow(QLabel(_('Description') + ':'), WWLabel(description))
|
||||
form.addRow(QLabel(_('Version') + ':'), QLabel(version))
|
||||
if author:
|
||||
form.addRow(QLabel(_('Author') + ':'), QLabel(author))
|
||||
if description:
|
||||
form.addRow(QLabel(_('Description') + ':'), WWLabel(description))
|
||||
if version:
|
||||
form.addRow(QLabel(_('Version') + ':'), QLabel(version))
|
||||
if zip_hash:
|
||||
form.addRow(QLabel('Hash [sha256]:'), WWLabel(insert_spaces(zip_hash, 8)))
|
||||
if requires:
|
||||
msg = '\n'.join(map(lambda x: x[1], requires))
|
||||
form.addRow(QLabel(_('Requires') + ':'), WWLabel(msg))
|
||||
vbox.addLayout(form)
|
||||
vbox.addStretch()
|
||||
close_button = CloseButton(self)
|
||||
close_button.setText(_('Close'))
|
||||
buttons = [close_button]
|
||||
@@ -297,7 +308,6 @@ class PluginsDialog(WindowModalDialog, MessageBoxMixin):
|
||||
self.show_list()
|
||||
|
||||
def show_list(self):
|
||||
from .util import read_QIcon_from_bytes, IconLabel
|
||||
descriptions = self.plugins.descriptions
|
||||
descriptions = sorted(descriptions.items())
|
||||
grid = self.grid
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "labels",
|
||||
"fullname": "LabelSync",
|
||||
"author": "The Electrum Developers",
|
||||
"description": "Save your wallet labels on a remote server, and synchronize them across multiple devices where you use Electrum. Labels, transactions IDs and addresses are encrypted before they are sent to the remote server.",
|
||||
"icon":"labelsync.png",
|
||||
"available_for": ["qt", "qml", "cmdline"]
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{
|
||||
"name": "psbt_nostr",
|
||||
"fullname": "PSBT over Nostr",
|
||||
"name": "nostr_multisig",
|
||||
"fullname": "Nostr Multisig",
|
||||
"description": "This plugin facilitates the use of multi-signatures wallets. It sends and receives partially signed transactions from/to your cosigner wallet. PSBTs are sent and retrieved from Nostr relays.",
|
||||
"author": "The Electrum Developers",
|
||||
"available_for": ["qt"],
|
||||
"icon":"nostr_multisig.png",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
|
||||
BIN
electrum/plugins/psbt_nostr/nostr_multisig.png
Normal file
BIN
electrum/plugins/psbt_nostr/nostr_multisig.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user