Compare commits

..

3 commits

Author SHA1 Message Date
e84f7bbd66 Bump version to 0.8.2
Some checks failed
Tests & Quality Checks / Test on Python 3.11 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.12 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.11-1 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.12-1 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.10 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.11-2 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.12-2 (push) Has been cancelled
Tests & Quality Checks / Build Artifacts (push) Has been cancelled
Tests & Quality Checks / Build Artifacts-1 (push) Has been cancelled
2026-03-04 17:13:40 +01:00
e3fae14c69 feat: add Developer Tools integration with shortcut for enhanced debugging 2026-03-04 16:56:38 +01:00
44dbc9b2e5 feat: disable touch events in Qt WebEngineView for improved hover effect handling 2026-03-04 15:39:15 +01:00
9 changed files with 2998 additions and 2881 deletions

View file

@ -2,7 +2,7 @@
# Application # Application
APP_NAME=WebDrop Bridge APP_NAME=WebDrop Bridge
APP_VERSION=0.8.1 APP_VERSION=0.8.2
# Web App # Web App
WEBAPP_URL=file:///./webapp/index.html WEBAPP_URL=file:///./webapp/index.html

File diff suppressed because one or more lines are too long

View file

@ -2,7 +2,7 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:ui="http://schemas.microsoft.com/wix/2010/ui" xmlns:ui="http://schemas.microsoft.com/wix/2010/ui"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="*" Name="WebDrop Bridge" Language="1033" Version="0.8.1" <Product Id="*" Name="WebDrop Bridge" Language="1033" Version="0.8.2"
Manufacturer="HIM-Tools" Manufacturer="HIM-Tools"
UpgradeCode="12345678-1234-1234-1234-123456789012"> UpgradeCode="12345678-1234-1234-1234-123456789012">

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
"""WebDrop Bridge - Qt-based desktop application for intelligent drag-and-drop file handling.""" """WebDrop Bridge - Qt-based desktop application for intelligent drag-and-drop file handling."""
__version__ = "0.8.1" __version__ = "0.8.2"
__author__ = "WebDrop Team" __author__ = "WebDrop Team"
__license__ = "MIT" __license__ = "MIT"

View file

@ -1,7 +1,16 @@
"""WebDrop Bridge - Application entry point.""" """WebDrop Bridge - Application entry point."""
import os
import sys import sys
# Force Chromium to treat hover as primary input method and disable touch detection
# This ensures CSS media queries (hover: hover) evaluate correctly for desktop applications
os.environ["QTWEBENGINE_CHROMIUM_FLAGS"] = "--touch-events=disabled"
# Enable Qt WebEngine Remote Debugging Protocol (Chromium Developer Tools)
# Allows debugging via browser DevTools at http://localhost:9222 or edge://inspect
os.environ["QTWEBENGINE_REMOTE_DEBUGGING"] = "9222"
from PySide6.QtWidgets import QApplication from PySide6.QtWidgets import QApplication
from webdrop_bridge.config import Config, ConfigurationError from webdrop_bridge.config import Config, ConfigurationError

View file

@ -0,0 +1,54 @@
"""Developer Tools for WebDrop Bridge - using Chromium Remote Debugging Protocol."""
import logging
from typing import Any
from PySide6.QtCore import QTimer, QUrl
from PySide6.QtWebEngineWidgets import QWebEngineView
from PySide6.QtWidgets import QVBoxLayout, QWidget
logger = logging.getLogger(__name__)
__all__ = ["DeveloperToolsWidget"]
class DeveloperToolsWidget(QWidget):
"""Embedded Chromium Developer Tools Inspector.
Loads the Chromium DevTools UI using the Remote Debugging Protocol
running on localhost:9222.
Features:
- Real HTML/CSS Inspector with live editing
- Full JavaScript Console with all DevTools features
- Network monitoring
- Performance profiling
- Storage inspection
- All standard Chromium DevTools features
"""
def __init__(self, web_view: Any) -> None:
"""Initialize Developer Tools.
Args:
web_view: The QWebEngineView to debug
"""
super().__init__()
self.web_view = web_view
# Create layout
layout = QVBoxLayout(self)
layout.setContentsMargins(0, 0, 0, 0)
layout.setSpacing(0)
# Create WebEngineView for DevTools UI
self.dev_tools_view = QWebEngineView()
layout.addWidget(self.dev_tools_view)
# Load DevTools after delay to let debugger start
QTimer.singleShot(500, self._load_devtools)
def _load_devtools(self) -> None:
"""Load the DevTools targets page from localhost:9222."""
logger.info("Loading DevTools from http://localhost:9222")
self.dev_tools_view.load(QUrl("http://localhost:9222"))

View file

@ -22,7 +22,7 @@ from PySide6.QtCore import (
Signal, Signal,
Slot, Slot,
) )
from PySide6.QtGui import QDesktopServices, QIcon, QMouseEvent from PySide6.QtGui import QDesktopServices, QIcon, QKeySequence, QMouseEvent, QShortcut
from PySide6.QtWebChannel import QWebChannel from PySide6.QtWebChannel import QWebChannel
from PySide6.QtWebEngineCore import QWebEngineDownloadRequest, QWebEngineScript from PySide6.QtWebEngineCore import QWebEngineDownloadRequest, QWebEngineScript
from PySide6.QtWidgets import ( from PySide6.QtWidgets import (
@ -425,6 +425,11 @@ class MainWindow(QMainWindow):
# Create navigation toolbar (Kiosk-mode navigation) # Create navigation toolbar (Kiosk-mode navigation)
self._create_navigation_toolbar() self._create_navigation_toolbar()
# Set up F12 keyboard shortcut for Developer Tools
f12_shortcut = QShortcut(QKeySequence(Qt.Key.Key_F12), self)
f12_shortcut.activated.connect(self._open_developer_tools)
logger.debug("F12 shortcut registered for Developer Tools")
# Create status bar # Create status bar
self._create_status_bar() self._create_status_bar()
@ -1307,6 +1312,11 @@ class MainWindow(QMainWindow):
log_action.setToolTip("Open Log File") log_action.setToolTip("Open Log File")
log_action.triggered.connect(self._open_log_file) log_action.triggered.connect(self._open_log_file)
# Developer Tools button on the right
dev_tools_action = toolbar.addAction("🔧")
dev_tools_action.setToolTip("Developer Tools (F12)")
dev_tools_action.triggered.connect(self._open_developer_tools)
def _open_log_file(self) -> None: def _open_log_file(self) -> None:
"""Open the application log file in the system default text editor. """Open the application log file in the system default text editor.
@ -1334,6 +1344,50 @@ class MainWindow(QMainWindow):
f"No log file found at:\n{log_file}", f"No log file found at:\n{log_file}",
) )
def _open_developer_tools(self) -> None:
"""Open Developer Tools in a separate window.
Creates a dedicated window with JavaScript Console and DOM Inspector.
Provides code execution, DOM inspection, and console log capture all
in your application window - no external browser needed.
"""
try:
# Check if dev tools window already exists and is visible
if not hasattr(self, "_dev_tools_window") or self._dev_tools_window is None:
from webdrop_bridge.ui.developer_tools import DeveloperToolsWidget
# Create new window
self._dev_tools_window = QMainWindow()
self._dev_tools_window.setWindowTitle("🔧 Developer Tools")
self._dev_tools_window.setGeometry(100, 100, 1200, 700)
self._dev_tools_window.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose)
# Create developer tools widget
dev_tools_widget = DeveloperToolsWidget(self.web_view)
# Set the widget as central widget
self._dev_tools_window.setCentralWidget(dev_tools_widget)
# Connect close event to clear reference
def on_close_dev_tools():
self._dev_tools_window = None
self._dev_tools_window.destroyed.connect(on_close_dev_tools)
# Show or bring to front
self._dev_tools_window.show()
self._dev_tools_window.raise_()
self._dev_tools_window.activateWindow()
logger.info("Developer Tools window opened")
except Exception as e:
logger.error(f"Failed to open Developer Tools window: {e}", exc_info=True)
QMessageBox.warning(
self,
"Developer Tools",
f"Could not open Developer Tools:\n{e}",
)
def _create_status_bar(self) -> None: def _create_status_bar(self) -> None:
"""Create status bar with update status indicator.""" """Create status bar with update status indicator."""
self.status_bar = self.statusBar() self.status_bar = self.statusBar()