chore: update version to 0.6.4 and add log file opening functionality in main window
This commit is contained in:
parent
bbf5e9f875
commit
fba25534d9
4 changed files with 43 additions and 3 deletions
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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: <AppData/Roaming>/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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue