updated fast reg page
This commit is contained in:
parent
18fb772cb1
commit
dd978f681d
1 changed files with 26 additions and 10 deletions
|
@ -1819,7 +1819,7 @@ class MenuPage(Page):
|
||||||
|
|
||||||
def edit_prof(self):
|
def edit_prof(self):
|
||||||
settings_page = self.page_stack.findChild(Settings)
|
settings_page = self.page_stack.findChild(Settings)
|
||||||
if settings_page and settings_page.is_auto_sync_enabled():
|
if settings_page and settings_page.is_auto_sync_enabled() and not self.connection_manager.is_synced():
|
||||||
self.update_status.update_status('Syncing in progress..')
|
self.update_status.update_status('Syncing in progress..')
|
||||||
self.update_status.sync()
|
self.update_status.sync()
|
||||||
self.update_status.worker_thread.sync_output.connect(self.on_sync_complete_for_edit_profile)
|
self.update_status.worker_thread.sync_output.connect(self.on_sync_complete_for_edit_profile)
|
||||||
|
@ -2782,7 +2782,8 @@ class HidetorPage(Page):
|
||||||
if boton.icon().isNull():
|
if boton.icon().isNull():
|
||||||
fallback_path = os.path.join(self.btn_path, "default_location_button.png")
|
fallback_path = os.path.join(self.btn_path, "default_location_button.png")
|
||||||
if locations and hasattr(locations, 'country_name'):
|
if locations and hasattr(locations, 'country_name'):
|
||||||
base_image = LocationPage.create_location_button_image(locations.country_name, fallback_path)
|
|
||||||
|
base_image = LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', fallback_path)
|
||||||
boton.setIcon(QIcon(base_image))
|
boton.setIcon(QIcon(base_image))
|
||||||
else:
|
else:
|
||||||
boton.setIcon(QIcon(fallback_path))
|
boton.setIcon(QIcon(fallback_path))
|
||||||
|
@ -3080,7 +3081,7 @@ class LocationPage(Page):
|
||||||
if boton.icon().isNull():
|
if boton.icon().isNull():
|
||||||
fallback_path = os.path.join(self.btn_path, "default_location_button.png")
|
fallback_path = os.path.join(self.btn_path, "default_location_button.png")
|
||||||
if locations and hasattr(locations, 'country_name'):
|
if locations and hasattr(locations, 'country_name'):
|
||||||
base_image = LocationPage.create_location_button_image(locations.country_name, fallback_path)
|
base_image = LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', fallback_path)
|
||||||
boton.setIcon(QIcon(base_image))
|
boton.setIcon(QIcon(base_image))
|
||||||
else:
|
else:
|
||||||
boton.setIcon(QIcon(fallback_path))
|
boton.setIcon(QIcon(fallback_path))
|
||||||
|
@ -3716,7 +3717,7 @@ class ResumePage(Page):
|
||||||
label.setPixmap(QPixmap(icon_path))
|
label.setPixmap(QPixmap(icon_path))
|
||||||
if label.pixmap().isNull():
|
if label.pixmap().isNull():
|
||||||
locations = self.connection_manager.get_location_info(icon_name)
|
locations = self.connection_manager.get_location_info(icon_name)
|
||||||
label.setPixmap(LocationPage.create_location_button_image(locations.country_name, os.path.join(self.btn_path, "default_location_button.png")))
|
label.setPixmap(LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', os.path.join(self.btn_path, "default_location_button.png")))
|
||||||
elif object_type == QLineEdit:
|
elif object_type == QLineEdit:
|
||||||
self.line_edit = object_type(self) # Define line_edit como un atributo de la clase ResumePage
|
self.line_edit = object_type(self) # Define line_edit como un atributo de la clase ResumePage
|
||||||
self.line_edit.setGeometry(*geometry)
|
self.line_edit.setGeometry(*geometry)
|
||||||
|
@ -3772,7 +3773,7 @@ class ResumePage(Page):
|
||||||
if parent_label.pixmap().isNull():
|
if parent_label.pixmap().isNull():
|
||||||
locations = self.connection_manager.get_location_info(text)
|
locations = self.connection_manager.get_location_info(text)
|
||||||
fallback_path = os.path.join(self.btn_path, "default_location_button.png")
|
fallback_path = os.path.join(self.btn_path, "default_location_button.png")
|
||||||
base_image = LocationPage.create_location_button_image(locations.country_name, fallback_path)
|
base_image = LocationPage.create_location_button_image(f'{locations.country_code}_{locations.code}', fallback_path)
|
||||||
parent_label.setPixmap(base_image)
|
parent_label.setPixmap(base_image)
|
||||||
parent_label.show()
|
parent_label.show()
|
||||||
self.labels_creados.append(parent_label)
|
self.labels_creados.append(parent_label)
|
||||||
|
@ -4240,8 +4241,7 @@ class EditorPage(Page):
|
||||||
# Establecer el ícono girado en el botón
|
# Establecer el ícono girado en el botón
|
||||||
prev_button.setIcon(QIcon(rotated_icon))
|
prev_button.setIcon(QIcon(rotated_icon))
|
||||||
prev_button.setIconSize(prev_button.size())
|
prev_button.setIconSize(prev_button.size())
|
||||||
print('the key is: ', key)
|
|
||||||
print('the connection manager is synced: ', self.connection_manager.is_synced())
|
|
||||||
if (key == 'location' or key == 'browser') and not self.connection_manager.is_synced():
|
if (key == 'location' or key == 'browser') and not self.connection_manager.is_synced():
|
||||||
w = prev_button.width()
|
w = prev_button.width()
|
||||||
h = prev_button.height()
|
h = prev_button.height()
|
||||||
|
@ -5331,11 +5331,11 @@ class Settings(Page):
|
||||||
layout.setContentsMargins(20, 20, 20, 20)
|
layout.setContentsMargins(20, 20, 20, 20)
|
||||||
|
|
||||||
title = QLabel("Create/Edit SETTINGS")
|
title = QLabel("Create/Edit SETTINGS")
|
||||||
title.setStyleSheet(f"color: #808080; font-size: 14px; font-weight: bold; {self.font_style}")
|
title.setStyleSheet(f"color: #808080; font-size: 15px; font-weight: bold; {self.font_style}")
|
||||||
layout.addWidget(title)
|
layout.addWidget(title)
|
||||||
|
|
||||||
registrations_group = QGroupBox("Create/Edit Configuration")
|
registrations_group = QGroupBox("Create/Edit Configuration")
|
||||||
registrations_group.setStyleSheet(f"QGroupBox {{ color: white; font-size: 13px; padding: 15px; {self.font_style} }}")
|
registrations_group.setStyleSheet(f"QGroupBox {{ color: white; font-size: 15px; padding: 15px; {self.font_style} }}")
|
||||||
registrations_layout = QVBoxLayout(registrations_group)
|
registrations_layout = QVBoxLayout(registrations_group)
|
||||||
|
|
||||||
self.enable_auto_sync = QCheckBox("Enable auto-sync on Edit")
|
self.enable_auto_sync = QCheckBox("Enable auto-sync on Edit")
|
||||||
|
@ -6668,10 +6668,21 @@ class FastRegistrationPage(Page):
|
||||||
self.name_handle.setStyleSheet('color: #cacbcb;')
|
self.name_handle.setStyleSheet('color: #cacbcb;')
|
||||||
self.name_handle.setText("Profile Name:")
|
self.name_handle.setText("Profile Name:")
|
||||||
|
|
||||||
|
self.name_hint = QLabel(self)
|
||||||
|
self.name_hint.setGeometry(265, 100, 190, 20)
|
||||||
|
self.name_hint.setStyleSheet('color: #888888; font-size: 10px; font-style: italic;')
|
||||||
|
self.name_hint.setText("Click here to edit profile name")
|
||||||
|
self.name_hint.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
||||||
|
|
||||||
self.name = QLineEdit(self)
|
self.name = QLineEdit(self)
|
||||||
self.name.setPlaceholderText("Enter name")
|
self.name.setPlaceholderText("Enter name")
|
||||||
self.name.setGeometry(265, 70, 190, 30)
|
self.name.setGeometry(265, 70, 190, 30)
|
||||||
self.name.setStyleSheet("color: cyan; border: transparent;")
|
self.name.setStyleSheet("color: cyan; border: 1px solid #666666; border-radius: 3px; background-color: rgba(0, 0, 0, 0.3);")
|
||||||
|
self.name.setCursor(QtCore.Qt.CursorShape.IBeamCursor)
|
||||||
|
self.name.focusInEvent = lambda event: self.name_hint.hide()
|
||||||
|
self.name.focusOutEvent = lambda event: self.name_hint.show() if not self.name.text() else self.name_hint.hide()
|
||||||
|
|
||||||
|
self.name.textChanged.connect(lambda text: self.name_hint.hide() if text else self.name_hint.show())
|
||||||
|
|
||||||
self.profile_data = {}
|
self.profile_data = {}
|
||||||
self.selected_values = {
|
self.selected_values = {
|
||||||
|
@ -6696,6 +6707,11 @@ class FastRegistrationPage(Page):
|
||||||
for button in self.buttons:
|
for button in self.buttons:
|
||||||
button.deleteLater()
|
button.deleteLater()
|
||||||
self.buttons = []
|
self.buttons = []
|
||||||
|
|
||||||
|
if not self.name.text():
|
||||||
|
self.name_hint.show()
|
||||||
|
else:
|
||||||
|
self.name_hint.hide()
|
||||||
|
|
||||||
self.create_protocol_section()
|
self.create_protocol_section()
|
||||||
self.create_connection_section()
|
self.create_connection_section()
|
||||||
|
|
Loading…
Reference in a new issue