update: dynamic provider name / verification tab

This commit is contained in:
John 2025-11-10 15:19:08 +01:00
parent 194a7428bd
commit 54ed907b26
10 changed files with 365 additions and 123 deletions

View file

@ -226,6 +226,7 @@ class WorkerThread(QThread):
def sync(self):
try:
ConfigurationController.set_endpoint_verification_enabled(True)
if self.action == 'SYNC_TOR':
ConfigurationController.set_connection('tor')
else:
@ -237,7 +238,7 @@ class WorkerThread(QThread):
all_location_codes = [f"{location.country_code}_{location.code}" for location in locations]
self.sync_output.emit(all_location_codes, all_browser_versions, True, False, locations, browser)
except Exception as e:
print(e)
print(f'the error is: {e}')
self.sync_output.emit([], [], False, False, [], [])
@ -461,7 +462,7 @@ class CustomWindow(QMainWindow):
if status:
sync_screen.update_after_sync(available_locations, available_browsers, locations, all_browsers)
else:
self.update_status.update_status('Sync failed. Please try again later.')
self.update_status('Sync failed. Please try again later.')
@ -642,8 +643,6 @@ class CustomWindow(QMainWindow):
pixmap = QPixmap(icon_path)
self.tor_icon.setPixmap(pixmap)
self.tor_icon.setScaledContents(True)
def create_toggle(self, is_tor_mode):
handle_x = 30 if is_tor_mode else 3
colors = self._get_toggle_colors(is_tor_mode)
@ -1260,9 +1259,6 @@ class Worker(QObject):
return f"Profile {int(profile_id)} {status}. Expires on {formatted_expiration}. Time left: {days_left} days, {hours_left} hours."
else:
return f"Profile {int(profile_id)} {status}"
class MenuPage(Page):
def __init__(self, page_stack=None, main_window=None, parent=None):
super().__init__("Menu", page_stack, main_window, parent)
@ -1907,7 +1903,6 @@ class MenuPage(Page):
def settings_gui(self):
self.page_stack.setCurrentIndex(self.page_stack.indexOf(self.page_stack.findChild(Settings)))
def eliminacion(self):
current_state = {
'is_tor_mode': self.is_tor_mode,
@ -2542,7 +2537,6 @@ class InstallSystemPackage(Page):
command_box.setStyleSheet(original_style + "background-color: #27ae60;")
QTimer.singleShot(200, lambda: command_box.setStyleSheet(original_style))
self.update_status.update_status("Command copied to clipboard")
def install_package(self):
if not self.install_command:
self.update_status.update_status(f"Installation not supported for {self.current_distro}")
@ -2852,15 +2846,24 @@ class HidetorPage(Page):
locations = self.connection_manager.get_location_info(icon_name)
if icon_name == 'my_14':
boton.setVisible(False)
boton.setIcon(QIcon(os.path.join(self.btn_path, f"button_{icon_name}.png")))
if boton.icon().isNull():
icon_path = os.path.join(self.btn_path, f"button_{icon_name}.png")
boton.setIcon(QIcon(icon_path))
fallback_path = os.path.join(self.btn_path, "default_location_button.png")
provider = locations.provider_name if locations and hasattr(locations, 'provider_name') else None
if boton.icon().isNull():
if locations and hasattr(locations, 'country_name'):
base_image = LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', fallback_path)
base_image = LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', fallback_path, provider)
boton.setIcon(QIcon(base_image))
else:
boton.setIcon(QIcon(fallback_path))
base_image = LocationPage.create_location_button_image('', fallback_path, provider)
boton.setIcon(QIcon(base_image))
else:
if locations and hasattr(locations, 'country_name'):
base_image = LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', fallback_path, provider, icon_path)
boton.setIcon(QIcon(base_image))
else:
base_image = LocationPage.create_location_button_image('', fallback_path, provider, icon_path)
boton.setIcon(QIcon(base_image))
self.buttons.append(boton)
self.buttonGroup.addButton(boton, j)
boton.clicked.connect(lambda _, location=icon_name: self.show_location(location))
@ -3115,7 +3118,6 @@ class ConnectionPage(Page):
label.setScaledContents(True) # Escalar contenido para ajustarlo al tamaño del QLabel
else: # Si no hay una imagen, crear una QLabel con el texto
label.setText(text)
class LocationPage(Page):
def __init__(self, page_stack, main_window, parent=None):
super().__init__("Location", page_stack, main_window, parent)
@ -3127,7 +3129,6 @@ class LocationPage(Page):
self.display.setGeometry(QtCore.QRect(5, 10, 390, 520))
self.title.setGeometry(395, 40, 380, 40); self.title.setText("Pick a location")
# Add initial display
self.initial_display = QLabel(self)
self.initial_display.setGeometry(5, 22, 355, 485)
self.initial_display.setAlignment(Qt.AlignmentFlag.AlignCenter)
@ -3151,14 +3152,24 @@ class LocationPage(Page):
boton.setCheckable(True)
locations = self.connection_manager.get_location_info(icon_name)
boton.setIcon(QIcon(os.path.join(self.btn_path, f"button_{icon_name}.png")))
if boton.icon().isNull():
icon_path = os.path.join(self.btn_path, f"button_{icon_name}.png")
boton.setIcon(QIcon(icon_path))
fallback_path = os.path.join(self.btn_path, "default_location_button.png")
provider = locations.provider_name if locations and hasattr(locations, 'provider_name') else None
if boton.icon().isNull():
if locations and hasattr(locations, 'country_name'):
base_image = LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', fallback_path)
base_image = LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', fallback_path, provider)
boton.setIcon(QIcon(base_image))
else:
boton.setIcon(QIcon(fallback_path))
base_image = LocationPage.create_location_button_image('', fallback_path, provider)
boton.setIcon(QIcon(base_image))
else:
if locations and hasattr(locations, 'country_name'):
base_image = LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', fallback_path, provider, icon_path)
boton.setIcon(QIcon(base_image))
else:
base_image = LocationPage.create_location_button_image('', fallback_path, provider, icon_path)
boton.setIcon(QIcon(base_image))
self.buttons.append(boton)
self.buttonGroup.addButton(boton, j)
@ -3193,20 +3204,26 @@ class LocationPage(Page):
self.page_stack.setCurrentIndex(self.page_stack.indexOf(self.page_stack.findChild(BrowserPage)))
@staticmethod
def create_location_button_image(location_name, fallback_image_path):
def create_location_button_image(location_name, fallback_image_path, provider=None, existing_icon_path=None):
if existing_icon_path:
base_image = QPixmap(existing_icon_path)
if base_image.isNull():
base_image = QPixmap(fallback_image_path)
draw_location_text = False
else:
base_image = QPixmap(fallback_image_path)
draw_location_text = True
if base_image.isNull():
return base_image
painter = QPainter(base_image)
try:
if draw_location_text:
font_size = 12
app_font = QApplication.font()
app_font.setPointSize(font_size)
app_font.setWeight(QFont.Weight.Bold)
yscale = 0
text_length = len(location_name)
if text_length <= 10:
@ -3221,8 +3238,6 @@ class LocationPage(Page):
font_stretch = 100
text_width_scale = 1.1
text_height_scale = 4.5
yscale = 5
app_font.setStretch(font_stretch)
painter.setFont(app_font)
painter.setPen(QColor(0, 255, 255))
@ -3237,8 +3252,8 @@ class LocationPage(Page):
painter.setFont(app_font)
text_rect = painter.fontMetrics().boundingRect(location_name)
x = ((base_image.width() - text_rect.width()) // 2 ) - 20
y = ((base_image.height() + text_rect.height()) // 2 ) + yscale
x = ((base_image.width() - text_rect.width()) // 2) - 30
y = ((base_image.height() + text_rect.height()) // 2) - 15
from PyQt6.QtGui import QTransform
transform = QTransform()
@ -3255,6 +3270,26 @@ class LocationPage(Page):
painter.setPen(QColor(0, 255, 255))
painter.drawText(x_scaled, y_scaled, location_name)
painter.setTransform(QTransform())
if provider:
provider_font = QApplication.font()
provider_font.setPointSize(8)
provider_font.setWeight(QFont.Weight.Normal)
painter.setFont(provider_font)
painter.setPen(QColor(128, 128, 128))
provider_label = "Provider:"
provider_label_rect = painter.fontMetrics().boundingRect(provider_label)
provider_text_rect = painter.fontMetrics().boundingRect(provider)
provider_x = ((base_image.width() - max(provider_label_rect.width(), provider_text_rect.width())) // 2) - 30
provider_y = 50
px = int(provider_x)
py = int(provider_y)
painter.drawText(px, py, provider_label)
painter.drawText(px, py + provider_label_rect.height() + 2, provider)
finally:
painter.end()
return base_image
@ -3463,8 +3498,6 @@ class BrowserPage(Page):
}
self.update_status.write_data(inserted_data)
class ScreenPage(Page):
def __init__(self, page_stack, main_window, parent=None):
super().__init__("Screen", page_stack, main_window, parent)
@ -3523,6 +3556,7 @@ class ScreenPage(Page):
else:
base_image = QPixmap(185, 75)
base_image.fill(QColor(44, 62, 80))
font_size = 13
painter = QPainter(base_image)
painter.setRenderHint(QPainter.RenderHint.Antialiasing)
@ -3789,9 +3823,18 @@ class ResumePage(Page):
icon_path = os.path.join(self.btn_path, f"{icon_name}_button.png")
if os.path.exists(icon_path):
label.setPixmap(QPixmap(icon_path))
if label.pixmap().isNull():
locations = self.connection_manager.get_location_info(icon_name)
label.setPixmap(LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', os.path.join(self.btn_path, "default_location_button.png")))
provider = locations.provider_name if locations and hasattr(locations, 'provider_name') else None
if label.pixmap().isNull():
if locations and hasattr(locations, 'country_name'):
label.setPixmap(LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', os.path.join(self.btn_path, "default_location_button.png"), provider))
else:
label.setPixmap(LocationPage.create_location_button_image('', os.path.join(self.btn_path, "default_location_button.png"), provider))
else:
if locations and hasattr(locations, 'country_name'):
label.setPixmap(LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', os.path.join(self.btn_path, "default_location_button.png"), provider, icon_path))
else:
label.setPixmap(LocationPage.create_location_button_image('', os.path.join(self.btn_path, "default_location_button.png"), provider, icon_path))
elif object_type == QLineEdit:
self.line_edit = object_type(self) # Define line_edit como un atributo de la clase ResumePage
self.line_edit.setGeometry(*geometry)
@ -3844,10 +3887,22 @@ class ResumePage(Page):
parent_label = QLabel(self)
parent_label.setGeometry(*geometry)
parent_label.setPixmap(QPixmap(icon_path))
if parent_label.pixmap().isNull():
locations = self.connection_manager.get_location_info(text)
provider = locations.provider_name if locations and hasattr(locations, 'provider_name') else None
fallback_path = os.path.join(self.btn_path, "default_location_button.png")
base_image = LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', fallback_path)
if parent_label.pixmap().isNull():
if locations and hasattr(locations, 'country_name'):
base_image = LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', fallback_path, provider)
parent_label.setPixmap(base_image)
else:
base_image = LocationPage.create_location_button_image('', fallback_path, provider)
parent_label.setPixmap(base_image)
else:
if locations and hasattr(locations, 'country_name'):
base_image = LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', fallback_path, provider, icon_path)
parent_label.setPixmap(base_image)
else:
base_image = LocationPage.create_location_button_image('', fallback_path, provider, icon_path)
parent_label.setPixmap(base_image)
parent_label.show()
self.labels_creados.append(parent_label)
@ -4062,8 +4117,6 @@ class ResumePage(Page):
self.worker_thread.quit()
self.worker_thread.wait()
self.worker_thread = None
class EditorPage(Page):
def __init__(self, page_stack, main_window):
super().__init__("Editor", page_stack, main_window)
@ -4286,9 +4339,19 @@ class EditorPage(Page):
current_value = f"{data_profile.get(key, '')}"
image_path = os.path.join(self.btn_path, f"button_{current_value}.png")
base_image = QPixmap(image_path)
if base_image.isNull():
locations = self.connection_manager.get_location_info(current_value)
provider = locations.provider_name if locations and hasattr(locations, 'provider_name') else None
fallback_path = os.path.join(self.btn_path, "default_location_button.png")
base_image = LocationPage.create_location_button_image(current_value, fallback_path)
if base_image.isNull():
if locations and hasattr(locations, 'country_name'):
base_image = LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', fallback_path, provider)
else:
base_image = LocationPage.create_location_button_image(current_value, fallback_path, provider)
else:
if locations and hasattr(locations, 'country_name'):
base_image = LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', fallback_path, provider, image_path)
else:
base_image = LocationPage.create_location_button_image(current_value, fallback_path, provider, image_path)
elif key == 'dimentions':
current_value = f"{data_profile.get(key, '')}"
@ -4642,8 +4705,6 @@ class EditorPage(Page):
resume_page = self.find_resume_page()
if resume_page:
resume_page.handle_core_action_create_profile('CREATE_SESSION_PROFILE', profile_data, 'session')
class Settings(Page):
def __init__(self, page_stack, main_window, parent=None):
super().__init__("Settings", page_stack, main_window, parent)
@ -4685,6 +4746,7 @@ class Settings(Page):
("Overview", self.show_account_page),
("Subscriptions", self.show_subscription_page),
("Create/Edit", self.show_registrations_page),
("Verification", self.show_verification_page),
("Delete Profile", self.show_delete_page),
("Error Logs", self.show_logs_page),
("Debug Help", self.show_debug_page)
@ -4725,22 +4787,6 @@ class Settings(Page):
self.left_layout.addStretch()
def setup_pages(self):
self.account_page = self.create_account_page()
self.subscription_page = self.create_subscription_page()
self.logs_page = self.create_logs_page()
self.delete_page = self.create_delete_page()
self.debug_page = self.create_debug_page()
self.content_layout.addWidget(self.account_page)
self.content_layout.addWidget(self.wireguard_page)
self.content_layout.addWidget(self.subscription_page)
self.content_layout.addWidget(self.logs_page)
self.content_layout.addWidget(self.delete_page)
self.content_layout.addWidget(self.debug_page)
self.show_account_page()
def create_delete_page(self):
page = QWidget()
layout = QVBoxLayout(page)
@ -5300,7 +5346,6 @@ class Settings(Page):
return None
except Exception:
return None
def copy_ping_command(self):
profile_id = self.debug_profile_selector.currentData()
if profile_id is None:
@ -5508,17 +5553,21 @@ class Settings(Page):
self.content_layout.setCurrentWidget(self.registrations_page)
self.update_button_states(2)
def show_verification_page(self):
self.content_layout.setCurrentWidget(self.verification_page)
self.update_button_states(3)
def show_delete_page(self):
self.content_layout.setCurrentWidget(self.delete_page)
self.update_button_states(3)
self.update_button_states(4)
def show_logs_page(self):
self.content_layout.setCurrentWidget(self.logs_page)
self.update_button_states(4)
self.update_button_states(5)
def show_debug_page(self):
self.content_layout.setCurrentWidget(self.debug_page)
self.update_button_states(5)
self.update_button_states(6)
def update_button_states(self, active_index):
for i, btn in enumerate(self.menu_buttons):
@ -5668,6 +5717,187 @@ class Settings(Page):
return page
def create_verification_page(self):
page = QWidget()
layout = QVBoxLayout(page)
layout.setSpacing(20)
layout.setContentsMargins(20, 20, 20, 20)
title = QLabel("Verification Information")
title.setStyleSheet(f"color: #808080; font-size: 12px; font-weight: bold; {self.font_style}")
layout.addWidget(title)
profile_label = QLabel("Profile Selection:")
profile_label.setStyleSheet(f"color: white; font-size: 14px; {self.font_style}")
layout.addWidget(profile_label)
self.verification_profile_selector = QComboBox()
self.verification_profile_selector.setStyleSheet(self.get_combobox_style())
profiles = ProfileController.get_all()
if profiles:
for profile_id, profile in profiles.items():
self.verification_profile_selector.addItem(f"Profile {profile_id}: {profile.name}", profile_id)
layout.addWidget(self.verification_profile_selector)
details_label = QLabel("Verification Details:")
details_label.setStyleSheet(f"color: white; font-size: 14px; margin-top: 20px; {self.font_style}")
layout.addWidget(details_label)
verification_layout = QVBoxLayout()
verification_layout.setSpacing(15)
self.verification_info = {}
self.verification_checkmarks = {}
self.verification_full_values = {}
info_items = [
("Operator Name", "operator_name"),
("Nostr Key", "nostr_public_key"),
("HydraVeil Key", "hydraveil_public_key"),
("Nostr Verification", "nostr_attestation_event_reference"),
]
for label, key in info_items:
container = QWidget()
container_layout = QHBoxLayout(container)
container_layout.setContentsMargins(0, 0, 0, 0)
container_layout.setSpacing(10)
label_widget = QLabel(label + ":")
label_widget.setStyleSheet(f"color: white; font-size: 12px; {self.font_style}")
label_widget.setMinimumWidth(120)
container_layout.addWidget(label_widget)
value_widget = QLineEdit()
value_widget.setReadOnly(True)
value_widget.setText("N/A")
value_widget.setStyleSheet(f"""
QLineEdit {{
color: white;
background: transparent;
border: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
padding: 5px 0px;
font-size: 12px;
{self.font_style}
}}
""")
container_layout.addWidget(value_widget, 1)
checkmark_widget = QLabel("")
checkmark_widget.setStyleSheet(f"color: #4CAF50; font-size: 20px; font-weight: bold; {self.font_style}")
checkmark_widget.setFixedSize(20, 20)
checkmark_widget.setAlignment(Qt.AlignmentFlag.AlignCenter)
checkmark_widget.hide()
container_layout.addWidget(checkmark_widget)
if key == "nostr_attestation_event_reference":
copy_button = QPushButton()
copy_button.setIcon(QIcon(os.path.join(self.btn_path, "paste_button.png")))
copy_button.setIconSize(QSize(24, 24))
copy_button.setFixedSize(30, 30)
copy_button.setStyleSheet(f"""
QPushButton {{
background: transparent;
border: none;
}}
QPushButton:hover {{
background: rgba(255, 255, 255, 0.1);
border-radius: 4px;
}}
""")
copy_button.clicked.connect(lambda checked=False, k=key: self.copy_verification_value(k))
container_layout.addWidget(copy_button)
verification_layout.addWidget(container)
self.verification_info[key] = value_widget
self.verification_checkmarks[key] = checkmark_widget
layout.addLayout(verification_layout)
layout.addStretch()
self.verification_profile_selector.currentIndexChanged.connect(self.update_verification_info)
self.verification_profile_selector.activated.connect(self.update_verification_info)
if self.verification_profile_selector.count() > 0:
self.update_verification_info(0)
return page
def truncate_key(self, text, max_length=50):
"""Truncate text in the middle, showing start and end parts."""
if not text or text == "N/A" or len(text) <= max_length:
return text
start_len = max_length // 2 - 2
end_len = max_length // 2 - 2
return text[:start_len] + "....." + text[-end_len:]
def update_verification_info(self, index):
if index < 0:
return
profile_id = self.verification_profile_selector.itemData(index)
if profile_id is None:
for key, widget in self.verification_info.items():
widget.setText("N/A")
self.verification_full_values[key] = "N/A"
if key in self.verification_checkmarks:
self.verification_checkmarks[key].hide()
return
profile = ProfileController.get(profile_id)
if not profile:
for key, widget in self.verification_info.items():
widget.setText("N/A")
self.verification_full_values[key] = "N/A"
if key in self.verification_checkmarks:
self.verification_checkmarks[key].hide()
return
operator = None
if profile.location and profile.location.operator:
operator = profile.location.operator
if operator:
operator_name = operator.name or "N/A"
self.verification_full_values["operator_name"] = operator_name
self.verification_info["operator_name"].setText(operator_name)
nostr_key = operator.nostr_public_key or "N/A"
self.verification_full_values["nostr_public_key"] = nostr_key
self.verification_info["nostr_public_key"].setText(self.truncate_key(nostr_key) if nostr_key != "N/A" else nostr_key)
hydraveil_key = operator.public_key or "N/A"
self.verification_full_values["hydraveil_public_key"] = hydraveil_key
self.verification_info["hydraveil_public_key"].setText(self.truncate_key(hydraveil_key) if hydraveil_key != "N/A" else hydraveil_key)
nostr_verification = operator.nostr_attestation_event_reference or "N/A"
self.verification_full_values["nostr_attestation_event_reference"] = nostr_verification
self.verification_info["nostr_attestation_event_reference"].setText(self.truncate_key(nostr_verification) if nostr_verification != "N/A" else nostr_verification)
else:
self.verification_info["operator_name"].setText("N/A")
self.verification_full_values["operator_name"] = "N/A"
self.verification_info["nostr_public_key"].setText("N/A")
self.verification_full_values["nostr_public_key"] = "N/A"
self.verification_info["hydraveil_public_key"].setText("N/A")
self.verification_full_values["hydraveil_public_key"] = "N/A"
self.verification_info["nostr_attestation_event_reference"].setText("N/A")
self.verification_full_values["nostr_attestation_event_reference"] = "N/A"
for key, widget in self.verification_info.items():
if key in self.verification_checkmarks:
full_value = self.verification_full_values.get(key, "")
if full_value and full_value != "N/A":
self.verification_checkmarks[key].show()
else:
self.verification_checkmarks[key].hide()
def copy_verification_value(self, key):
"""Copy the full verification value (not truncated) to clipboard."""
full_value = self.verification_full_values.get(key, "")
if full_value and full_value != "N/A":
clipboard = QApplication.clipboard()
clipboard.setText(full_value)
self.update_status.update_status("Verification value copied to clipboard")
def update_subscription_info(self, index):
if index < 0:
return
@ -5721,14 +5951,18 @@ class Settings(Page):
self.registrations_page = self.create_registrations_page()
self.content_layout.addWidget(self.registrations_page)
self.content_layout.removeWidget(self.delete_page)
self.delete_page = self.create_delete_page()
self.content_layout.addWidget(self.delete_page)
self.content_layout.removeWidget(self.verification_page)
self.verification_page = self.create_verification_page()
self.content_layout.addWidget(self.verification_page)
self.content_layout.removeWidget(self.logs_page)
self.logs_page = self.create_logs_page()
self.content_layout.addWidget(self.logs_page)
self.content_layout.removeWidget(self.delete_page)
self.delete_page = self.create_delete_page()
self.content_layout.addWidget(self.delete_page)
self.content_layout.removeWidget(self.debug_page)
self.debug_page = self.create_debug_page()
self.content_layout.addWidget(self.debug_page)
@ -5738,7 +5972,6 @@ class Settings(Page):
if self.content_layout.currentWidget() == self.subscription_page:
if self.profile_selector.count() > 0:
self.update_subscription_info(0)
def create_account_page(self):
page = QWidget()
layout = QVBoxLayout(page)
@ -5925,6 +6158,7 @@ class Settings(Page):
self.account_page = self.create_account_page()
self.subscription_page = self.create_subscription_page()
self.registrations_page = self.create_registrations_page()
self.verification_page = self.create_verification_page()
self.logs_page = self.create_logs_page()
self.delete_page = self.create_delete_page()
self.debug_page = self.create_debug_page()
@ -5932,10 +6166,12 @@ class Settings(Page):
self.content_layout.addWidget(self.account_page)
self.content_layout.addWidget(self.subscription_page)
self.content_layout.addWidget(self.registrations_page)
self.content_layout.addWidget(self.verification_page)
self.content_layout.addWidget(self.logs_page)
self.content_layout.addWidget(self.delete_page)
self.content_layout.addWidget(self.debug_page)
self.content_layout.setCurrentIndex(0)
self.show_account_page()
def create_logs_page(self):
@ -6322,7 +6558,6 @@ class ClickableLabel(QLabel):
start_x = center_x - (self.hover_width // 2)
painter.fillRect(start_x, 0, self.hover_width, self.height(), hover_color)
painter.end()
class PaymentConfirmed(Page):
def __init__(self, page_stack, main_window=None, parent=None):
super().__init__("Id", page_stack, main_window, parent)
@ -6955,7 +7190,6 @@ class DurationSelectionPage(Page):
def reverse(self):
self.page_stack.setCurrentIndex(self.page_stack.indexOf(self.page_stack.findChild(IdPage)))
class CurrencySelectionPage(Page):
def __init__(self, page_stack, main_window=None, parent=None):
super().__init__("Select Currency", page_stack, main_window, parent)
@ -7329,7 +7563,6 @@ class PaymentDetailsPage(Page):
else:
total_hours = duration_month_num * (30 * 24)
return total_hours
class FastRegistrationPage(Page):
def __init__(self, page_stack, main_window):
super().__init__("FastRegistration", page_stack, main_window)
@ -7508,9 +7741,19 @@ class FastRegistrationPage(Page):
if self.selected_values['location']:
image_path = os.path.join(self.btn_path, f"button_{self.selected_values['location']}.png")
location_image = QPixmap(image_path)
if location_image.isNull():
locations = self.connection_manager.get_location_info(self.selected_values['location'])
provider = locations.provider_name if locations and hasattr(locations, 'provider_name') else None
fallback_path = os.path.join(self.btn_path, "default_location_button.png")
location_image = LocationPage.create_location_button_image(self.selected_values['location'], fallback_path)
if location_image.isNull():
if locations and hasattr(locations, 'country_name'):
location_image = LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', fallback_path, provider)
else:
location_image = LocationPage.create_location_button_image(self.selected_values['location'], fallback_path, provider)
else:
if locations and hasattr(locations, 'country_name'):
location_image = LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', fallback_path, provider, image_path)
else:
location_image = LocationPage.create_location_button_image(self.selected_values['location'], fallback_path, provider, image_path)
else:
location_image = QPixmap(os.path.join(self.btn_path, "default_location_button.png"))
@ -7890,7 +8133,6 @@ class FastModePromptPage(Page):
return i
return 1
class QRCodeDialog(QDialog):
def __init__(self, address_text, full_amount, currency_type=None, parent=None):
super().__init__(parent)

BIN
gui/resources/images/button_is_1.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
gui/resources/images/button_md_cu.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
gui/resources/images/button_nl_li.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8 KiB

BIN
gui/resources/images/button_us_ny.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6 KiB

BIN
gui/resources/images/button_us_oh.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
gui/resources/images/button_us_wa.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

@ -1,6 +1,6 @@
[project]
name = "sp-hydra-veil-gui"
version = "1.1.5"
version = "1.1.6"
authors = [
{ name = "Simplified Privacy" },
]
@ -12,7 +12,7 @@ classifiers = [
"Operating System :: POSIX :: Linux",
]
dependencies = [
"sp-hydra-veil-core == 1.1.2",
"sp-hydra-veil-core == 1.1.6",
"pyperclip ~= 1.9.0",
"pyqt6 ~= 6.7.1",
"qrcode[pil] ~= 8.2"