update: deploying gui fix

This commit is contained in:
Your Name 2025-12-16 19:26:59 +01:00
parent 33409d2a6e
commit 01d271b12e
2 changed files with 14 additions and 9 deletions

View file

@ -2309,7 +2309,6 @@ class MenuPage(Page):
def on_finished_update_gui(self, is_enabled, profile_id, profile_type, profile_connection): def on_finished_update_gui(self, is_enabled, profile_id, profile_type, profile_connection):
try: try:
if is_enabled: if is_enabled:
print(f"Adding connected profile: {profile_id}")
self.connection_manager.add_connected_profile(profile_id) self.connection_manager.add_connected_profile(profile_id)
target_button: QPushButton = self.connection_manager.get_profile_button_objects(profile_id) target_button: QPushButton = self.connection_manager.get_profile_button_objects(profile_id)
@ -2334,12 +2333,9 @@ class MenuPage(Page):
if profile_obj and profile_obj.connection and profile_obj.connection.code == 'wireguard' and ConfigurationController.get_endpoint_verification_enabled(): if profile_obj and profile_obj.connection and profile_obj.connection.code == 'wireguard' and ConfigurationController.get_endpoint_verification_enabled():
self.print_profile_details(f"Profile_{profile_id}") self.print_profile_details(f"Profile_{profile_id}")
else: else:
print(f"Removing connected profile: {profile_id}")
self.connection_manager.remove_connected_profile(profile_id) self.connection_manager.remove_connected_profile(profile_id)
print('profile_type: ', profile_type)
if profile_type == 1: if profile_type == 1:
if profile_id in self.button_states: if profile_id in self.button_states:
print('deleting button state')
del self.button_states[profile_id] del self.button_states[profile_id]
else: else:
self.IsSystem -= 1 self.IsSystem -= 1
@ -7135,8 +7131,15 @@ class Settings(Page):
try: try:
config = self.update_status._load_gui_config() config = self.update_status._load_gui_config()
if config and "registrations" in config: if config and "registrations" in config:
self.enable_auto_sync.setChecked(config["registrations"]["auto_sync_enabled"]) registrations = config["registrations"]
self.enable_fast_registration.setChecked(config["registrations"]["fast_registration_enabled"]) auto_sync = registrations.get("auto_sync_enabled", False)
fast_reg = registrations.get("fast_registration_enabled", False)
if "auto_sync_enabled" not in registrations or "fast_registration_enabled" not in registrations:
registrations["auto_sync_enabled"] = auto_sync
registrations["fast_registration_enabled"] = fast_reg
self.update_status._save_gui_config(config)
self.enable_auto_sync.setChecked(auto_sync)
self.enable_fast_registration.setChecked(fast_reg)
else: else:
self.enable_auto_sync.setChecked(False) self.enable_auto_sync.setChecked(False)
self.enable_fast_registration.setChecked(False) self.enable_fast_registration.setChecked(False)
@ -7177,7 +7180,8 @@ class Settings(Page):
try: try:
config = self.update_status._load_gui_config() config = self.update_status._load_gui_config()
if config and "registrations" in config: if config and "registrations" in config:
return config["registrations"]["auto_sync_enabled"] registrations = config["registrations"]
return registrations.get("auto_sync_enabled", False)
return False return False
except Exception as e: except Exception as e:
logging.error(f"Error checking auto-sync setting: {str(e)}") logging.error(f"Error checking auto-sync setting: {str(e)}")
@ -7187,7 +7191,8 @@ class Settings(Page):
try: try:
config = self.update_status._load_gui_config() config = self.update_status._load_gui_config()
if config and "registrations" in config: if config and "registrations" in config:
return config["registrations"]["fast_registration_enabled"] registrations = config["registrations"]
return registrations.get("fast_registration_enabled", False)
return False return False
except Exception as e: except Exception as e:
logging.error(f"Error checking fast registration setting: {str(e)}") logging.error(f"Error checking fast registration setting: {str(e)}")

View file

@ -1,6 +1,6 @@
[project] [project]
name = "sp-hydra-veil-gui" name = "sp-hydra-veil-gui"
version = "2.0.0" version = "2.0.1"
authors = [ authors = [
{ name = "Simplified Privacy" }, { name = "Simplified Privacy" },
] ]