feat: implement brand-specific configuration and update management for Agravity Bridge
This commit is contained in:
parent
baf56e040f
commit
b988532aaa
9 changed files with 461 additions and 48 deletions
|
|
@ -1872,8 +1872,16 @@ class MainWindow(QMainWindow):
|
|||
|
||||
try:
|
||||
# Create update manager
|
||||
cache_dir = Path.home() / ".webdrop_bridge"
|
||||
manager = UpdateManager(current_version=self.config.app_version, config_dir=cache_dir)
|
||||
cache_dir = self.config.get_cache_dir()
|
||||
manager = UpdateManager(
|
||||
current_version=self.config.app_version,
|
||||
config_dir=cache_dir,
|
||||
brand_id=self.config.brand_id,
|
||||
forgejo_url=self.config.update_base_url,
|
||||
repo=self.config.update_repo,
|
||||
update_channel=self.config.update_channel,
|
||||
manifest_name=self.config.update_manifest_name,
|
||||
)
|
||||
|
||||
# Run async check in background
|
||||
self._run_async_check(manager)
|
||||
|
|
@ -2090,7 +2098,13 @@ class MainWindow(QMainWindow):
|
|||
|
||||
# Create update manager
|
||||
manager = UpdateManager(
|
||||
current_version=self.config.app_version, config_dir=Path.home() / ".webdrop_bridge"
|
||||
current_version=self.config.app_version,
|
||||
config_dir=self.config.get_cache_dir(),
|
||||
brand_id=self.config.brand_id,
|
||||
forgejo_url=self.config.update_base_url,
|
||||
repo=self.config.update_repo,
|
||||
update_channel=self.config.update_channel,
|
||||
manifest_name=self.config.update_manifest_name,
|
||||
)
|
||||
|
||||
# Create and start background thread
|
||||
|
|
@ -2229,7 +2243,13 @@ class MainWindow(QMainWindow):
|
|||
from webdrop_bridge.core.updater import UpdateManager
|
||||
|
||||
manager = UpdateManager(
|
||||
current_version=self.config.app_version, config_dir=Path.home() / ".webdrop_bridge"
|
||||
current_version=self.config.app_version,
|
||||
config_dir=self.config.get_cache_dir(),
|
||||
brand_id=self.config.brand_id,
|
||||
forgejo_url=self.config.update_base_url,
|
||||
repo=self.config.update_repo,
|
||||
update_channel=self.config.update_channel,
|
||||
manifest_name=self.config.update_manifest_name,
|
||||
)
|
||||
|
||||
if manager.install_update(installer_path):
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class SettingsDialog(QDialog):
|
|||
"""
|
||||
super().__init__(parent)
|
||||
self.config = config
|
||||
self.profile_manager = ConfigProfile()
|
||||
self.profile_manager = ConfigProfile(config.config_dir_name)
|
||||
self.setWindowTitle(tr("settings.title"))
|
||||
self.setGeometry(100, 100, 600, 500)
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ class SettingsDialog(QDialog):
|
|||
self.config.window_width = config_data["window_width"]
|
||||
self.config.window_height = config_data["window_height"]
|
||||
|
||||
config_path = Config.get_default_config_path()
|
||||
config_path = self.config.get_config_path()
|
||||
self.config.to_file(config_path)
|
||||
|
||||
logger.info(f"Configuration saved to {config_path}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue