From 949cb9e1622f193ad6a011b7a268bbdc2ad6dd8a Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 8 Jul 2025 23:39:45 +0100 Subject: [PATCH] Updated pyprooject file / timezones / supported browsers / payment page --- gui/__main__.py | 24 ++++-------------------- pyproject.toml | 1 + 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/gui/__main__.py b/gui/__main__.py index 8e0148b..eae6c38 100644 --- a/gui/__main__.py +++ b/gui/__main__.py @@ -233,7 +233,7 @@ class WorkerThread(QThread): self.check_for_update() locations = LocationController.get_all() browser = ApplicationVersionController.get_all() - all_browser_versions = [f"{browser.application_code}:{browser.version_number}" for browser in browser] + all_browser_versions = [f"{browser.application_code}:{browser.version_number}" for browser in browser if browser.supported] 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, False) except Exception as e: @@ -1938,19 +1938,6 @@ class ConnectionManager: self._is_profile_being_enabled = {} self.profile_button_objects = {} - self._timezone_mapping = { - 'md': 'Europe/Chisinau', - 'nl': 'Europe/Amsterdam', - 'us': 'America/New_York', - 'ca': 'America/Los_Angeles', - 'fi': 'Europe/Helsinki', - 'is': 'Atlantic/Reykjavik', - 'my': 'Asia/Kuala_Lumpur', - 'la': 'America/Los_Angeles', - 'ru': 'Europe/Moscow', - 'ro': 'Europe/Bucharest', - 'ch': 'Europe/Zurich' - } self._location_list = [] self._browser_list = [] @@ -1960,10 +1947,7 @@ class ConnectionManager: def set_profile_button_objects(self, profile_id, profile_button_objects): self.profile_button_objects[profile_id] = profile_button_objects - def get_timezone(self, location_code): - if location_code in self._timezone_mapping: - return self._timezone_mapping[location_code] - return None + def add_connected_profile(self, profile_id): self._connected_profiles.add(profile_id) @@ -4110,7 +4094,7 @@ class EditorPage(Page): if location: profile.location.code = location.code profile.location.country_code = location.country_code - profile.location.time_zone = self.connection_manager.get_timezone(location.country_code) + profile.location.time_zone = location.time_zone profile.subscription = None @@ -5694,7 +5678,7 @@ class DurationSelectionPage(Page): self.combo_box = QComboBox(self) self.combo_box.setGeometry(200, 200, 400, 60) self.combo_box.addItems(["1 month ($1)", "3 months ($3)", "6 months ($5)", "12 months ($10)"]) - self.combo_box.setEditable(True) + self.combo_box.setEditable(False) self.combo_box.setMaxVisibleItems(4) self.combo_box.setDuplicatesEnabled(True) self.combo_box.setPlaceholderText("Select options") diff --git a/pyproject.toml b/pyproject.toml index 50b1086..bb1d0d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,7 @@ dependencies = [ "sp-hydra-veil-core == 1.0.0", "pyperclip ~= 1.9.0", "pyqt6 ~= 6.7.1", + "qrcode[pil] ~= 8.2" ] [project.urls]