From fba25534d90a3ef5c63ea8a889b7ff759b392788 Mon Sep 17 00:00:00 2001 From: claudi Date: Wed, 25 Feb 2026 15:09:22 +0100 Subject: [PATCH] chore: update version to 0.6.4 and add log file opening functionality in main window --- .env.example | 2 +- CHANGELOG.md | 8 +++++++ src/webdrop_bridge/__init__.py | 2 +- src/webdrop_bridge/ui/main_window.py | 34 +++++++++++++++++++++++++++- 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 4cfd642..cc823b8 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,7 @@ # Application APP_NAME=WebDrop Bridge -APP_VERSION=0.6.3 +APP_VERSION=0.6.4 # Web App WEBAPP_URL=file:///./webapp/index.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 593ba4e..0cc6720 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [0.6.4] - 2026-02-25 + +### Added + +### Changed + +### Fixed + ## [0.6.3] - 2026-02-25 ### Added diff --git a/src/webdrop_bridge/__init__.py b/src/webdrop_bridge/__init__.py index 8f2f36d..c4588de 100644 --- a/src/webdrop_bridge/__init__.py +++ b/src/webdrop_bridge/__init__.py @@ -1,6 +1,6 @@ """WebDrop Bridge - Qt-based desktop application for intelligent drag-and-drop file handling.""" -__version__ = "0.6.3" +__version__ = "0.6.4" __author__ = "WebDrop Team" __license__ = "MIT" diff --git a/src/webdrop_bridge/ui/main_window.py b/src/webdrop_bridge/ui/main_window.py index e7ec8a0..9cb364f 100644 --- a/src/webdrop_bridge/ui/main_window.py +++ b/src/webdrop_bridge/ui/main_window.py @@ -22,7 +22,7 @@ from PySide6.QtCore import ( Signal, Slot, ) -from PySide6.QtGui import QIcon, QMouseEvent +from PySide6.QtGui import QDesktopServices, QIcon, QMouseEvent from PySide6.QtWebChannel import QWebChannel from PySide6.QtWebEngineCore import QWebEngineDownloadRequest, QWebEngineScript from PySide6.QtWidgets import ( @@ -1122,6 +1122,38 @@ class MainWindow(QMainWindow): check_updates_action.setToolTip("Check for Updates") check_updates_action.triggered.connect(self._on_manual_check_for_updates) + # Log file button on the right + log_action = toolbar.addAction("📋") + log_action.setToolTip("Open Log File") + log_action.triggered.connect(self._open_log_file) + + def _open_log_file(self) -> None: + """Open the application log file in the system default text editor. + + Resolves the log file path from config, falls back to the default + AppData location, and opens it with QDesktopServices. Shows an + informational message if the file does not exist yet. + """ + log_file: Optional[Path] = None + + if self.config.log_file: + log_file = Path(self.config.log_file) + else: + # Default location: /webdrop_bridge/logs/webdrop_bridge.log + app_data = Path( + QStandardPaths.writableLocation(QStandardPaths.StandardLocation.AppDataLocation) + ) + log_file = app_data / "logs" / "webdrop_bridge.log" + + if log_file.exists(): + QDesktopServices.openUrl(QUrl.fromLocalFile(str(log_file))) + else: + QMessageBox.information( + self, + "Log File Not Found", + f"No log file found at:\n{log_file}", + ) + def _create_status_bar(self) -> None: """Create status bar with update status indicator.""" self.status_bar = self.statusBar()