cleanup
Some checks are pending
Tests & Quality Checks / Test on Python 3.11 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.10 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-2 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-2 (push) Waiting to run
Tests & Quality Checks / Build Artifacts (push) Blocked by required conditions
Tests & Quality Checks / Build Artifacts-1 (push) Blocked by required conditions
Some checks are pending
Tests & Quality Checks / Test on Python 3.11 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.10 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-2 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-2 (push) Waiting to run
Tests & Quality Checks / Build Artifacts (push) Blocked by required conditions
Tests & Quality Checks / Build Artifacts-1 (push) Blocked by required conditions
This commit is contained in:
parent
910ac3390a
commit
4cc158a791
2 changed files with 0 additions and 556 deletions
288
CHANGELOG.md
288
CHANGELOG.md
|
|
@ -1,288 +0,0 @@
|
||||||
## [0.7.1] - 2026-02-25
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
## [0.7.0] - 2026-02-25
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
## [0.6.5] - 2026-02-25
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
## [0.6.4] - 2026-02-25
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
## [0.6.3] - 2026-02-25
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
## [0.6.2] - 2026-02-25
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
## [0.6.1] - 2026-02-25
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
## [0.6.0] - 2026-02-20
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- **UI Enhancements**
|
|
||||||
- Web source configuration tab in settings dialog for URL mapping management
|
|
||||||
- Enhanced about dialog with product description and contact information
|
|
||||||
|
|
||||||
- **Build & Distribution**
|
|
||||||
- Executable versioning support for Windows builds
|
|
||||||
- Desktop shortcut creation in WiX installer
|
|
||||||
- Support for 64-bit components in MSI installer (fix)
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- Refactored logging configuration to use AppData directory (Windows) instead of application root
|
|
||||||
- Enhanced Windows installer with improved UI and error reporting
|
|
||||||
- Improved code structure and readability across multiple modules
|
|
||||||
- Refactored version syncing script with better Unicode handling
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- Fixed import order in settings_dialog.py (QTabWidget positioning)
|
|
||||||
- Improved error reporting in Windows installer linking
|
|
||||||
- Enhanced Unicode handling in build scripts
|
|
||||||
|
|
||||||
# Changelog
|
|
||||||
|
|
||||||
All notable changes to WebDrop Bridge will be documented in this file.
|
|
||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
||||||
|
|
||||||
## [0.1.0] - 2026-01-28
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- **Core Features**
|
|
||||||
- Qt6-based desktop application for web-to-file drag-and-drop
|
|
||||||
- PySide6 integration with WebEngine for embedded browser
|
|
||||||
- Path validation and security with whitelist-based access control
|
|
||||||
- Drag-and-drop event interception and handling
|
|
||||||
- Real-time drag state monitoring
|
|
||||||
|
|
||||||
- **UI/UX**
|
|
||||||
- Professional main window with toolbar navigation
|
|
||||||
- Restricted web view with URL whitelist enforcement
|
|
||||||
- Kiosk-mode support (restricted browsing)
|
|
||||||
- Beautiful default welcome page for unconfigured instances
|
|
||||||
- Responsive layout with proper window management
|
|
||||||
|
|
||||||
- **Configuration**
|
|
||||||
- Environment-based configuration system (.env file support)
|
|
||||||
- Configurable allowed root directories for file access
|
|
||||||
- URL whitelist with wildcard support (*.example.com)
|
|
||||||
- Window size and appearance settings
|
|
||||||
- Logging level and output control
|
|
||||||
|
|
||||||
- **Logging & Monitoring**
|
|
||||||
- Structured logging with INFO, DEBUG, ERROR levels
|
|
||||||
- Optional file-based logging
|
|
||||||
- Comprehensive error messages and diagnostics
|
|
||||||
- Application startup and shutdown logging
|
|
||||||
|
|
||||||
- **Build & Distribution**
|
|
||||||
- PyInstaller configuration for Windows and macOS
|
|
||||||
- Standalone executable generation (195.7 MB for Windows)
|
|
||||||
- Dependency bundling (PySide6, Qt6, Chromium)
|
|
||||||
- Resource embedding (webapp, icons, stylesheets)
|
|
||||||
- Cross-platform support (Windows .exe, macOS .dmg)
|
|
||||||
|
|
||||||
- **Testing & Quality**
|
|
||||||
- 99 unit and integration tests
|
|
||||||
- 84% code coverage
|
|
||||||
- Ruff linting and Black code formatting
|
|
||||||
- mypy type checking
|
|
||||||
- Comprehensive test fixtures and mocking
|
|
||||||
|
|
||||||
- **CI/CD**
|
|
||||||
- Build automation scripts for Windows and macOS
|
|
||||||
- Forgejo Packages support for distribution
|
|
||||||
- SHA256 checksum generation for release files
|
|
||||||
- Release documentation on Forgejo
|
|
||||||
|
|
||||||
- **Documentation**
|
|
||||||
- Comprehensive API documentation with docstrings
|
|
||||||
- Architecture documentation (ARCHITECTURE.md)
|
|
||||||
- Development plan (DEVELOPMENT_PLAN.md)
|
|
||||||
- Setup and quickstart guides
|
|
||||||
- Contributing guidelines
|
|
||||||
|
|
||||||
### Technical Details
|
|
||||||
- **Language**: Python 3.13
|
|
||||||
- **Framework**: PySide6 6.10.1 (Qt6)
|
|
||||||
- **Web Engine**: Qt6 WebEngine with Chromium
|
|
||||||
- **Build Tool**: PyInstaller 6.18.0
|
|
||||||
- **Testing**: pytest with coverage
|
|
||||||
- **Linting**: Ruff + Black
|
|
||||||
|
|
||||||
### Known Limitations
|
|
||||||
- Requires configuration for custom web applications
|
|
||||||
- Manual release builds needed (no CI/CD runners in Forgejo at this time)
|
|
||||||
|
|
||||||
## [0.5.0] - 2026-02-18
|
|
||||||
|
|
||||||
### Added - Phase 4 Professional Features
|
|
||||||
|
|
||||||
#### Phase 4.1: Auto-Update System
|
|
||||||
- **Auto-update Manager** (`core/updater.py`)
|
|
||||||
- Check for new releases via Forgejo API
|
|
||||||
- Automatic background update checking (configurable interval)
|
|
||||||
- Manual "Check for Updates" menu option
|
|
||||||
- SHA256 checksum verification for downloaded files
|
|
||||||
- Version comparison using semantic versioning
|
|
||||||
- 27 tests passing, 79% coverage
|
|
||||||
|
|
||||||
- **Update UI Components** (`ui/update_manager_ui.py`)
|
|
||||||
- Update notification dialogs with release notes and changelog
|
|
||||||
- Progress bar for update downloads
|
|
||||||
- Integration with Help menu and status bar
|
|
||||||
- Real-time status updates ("Checking...", "Downloading...", "Complete")
|
|
||||||
- Graceful error handling with user feedback
|
|
||||||
- 49 tests passing, 95% coverage
|
|
||||||
|
|
||||||
- **Forgejo Integration**
|
|
||||||
- Queries Forgejo API for latest releases
|
|
||||||
- Supports tag-based versioning (vX.Y.Z)
|
|
||||||
- Release notes parsing and display
|
|
||||||
- Asset/checksum management
|
|
||||||
|
|
||||||
#### Phase 4.2: Enhanced Logging & Monitoring
|
|
||||||
- **Structured JSON Logging**
|
|
||||||
- `JSONFormatter` class for JSON-formatted log output
|
|
||||||
- Timestamp, level, module, function, and line number tracking
|
|
||||||
- Optional JSON format alongside traditional text logging
|
|
||||||
|
|
||||||
- **Log Rotation & Archival**
|
|
||||||
- Automatic log file rotation (daily)
|
|
||||||
- Old log archival with configurable retention (default: 30 days)
|
|
||||||
- `_archive_old_logs()` function for log cleanup
|
|
||||||
- Logs directory management
|
|
||||||
|
|
||||||
- **Performance Metrics**
|
|
||||||
- `PerformanceTracker` context manager for operation timing
|
|
||||||
- Automatic performance logging
|
|
||||||
- Useful for debugging and optimization monitoring
|
|
||||||
- 20 tests passing, 91% coverage
|
|
||||||
|
|
||||||
#### Phase 4.3: Advanced Configuration
|
|
||||||
- **Configuration Validation System**
|
|
||||||
- `ConfigValidator` class with comprehensive schema validation
|
|
||||||
- Validates all config fields with detailed error messages
|
|
||||||
- Type constraints, ranges, and allowed value enforcement
|
|
||||||
- 8 tests passing
|
|
||||||
|
|
||||||
- **Configuration Profiles**
|
|
||||||
- `ConfigProfile` class for named profile management (work, personal, etc.)
|
|
||||||
- Profile storage in `~/.webdrop-bridge/profiles/` as JSON
|
|
||||||
- Profile save/load/delete functionality
|
|
||||||
- 7 tests passing
|
|
||||||
|
|
||||||
- **Settings Dialog UI** (`ui/settings_dialog.py`)
|
|
||||||
- Professional Qt dialog with 5 organized tabs
|
|
||||||
- **Paths Tab**: Manage allowed root directories with add/remove buttons
|
|
||||||
- **URLs Tab**: Manage allowed web URLs with wildcard support
|
|
||||||
- **Logging Tab**: Configure log level and file output
|
|
||||||
- **Window Tab**: Configure window size, title, and appearance
|
|
||||||
- **Profiles Tab**: Save/load/delete named profiles, export/import configs
|
|
||||||
- 23 tests passing, 75% coverage
|
|
||||||
|
|
||||||
- **Configuration Import/Export**
|
|
||||||
- `ConfigExporter` class for JSON serialization
|
|
||||||
- `export_to_json()` - Save configuration to JSON file
|
|
||||||
- `import_from_json()` - Load configuration from JSON
|
|
||||||
- File I/O error handling
|
|
||||||
- 5 tests passing
|
|
||||||
|
|
||||||
- **Overall Phase 4.3 Stats**
|
|
||||||
- 43 tests passing total
|
|
||||||
- 87% coverage on `config_manager.py`
|
|
||||||
- 75% coverage on `settings_dialog.py`
|
|
||||||
|
|
||||||
### Technical Improvements
|
|
||||||
- **Test Coverage**: Increased from 84% (v1.0.0) to 90%+ with Phase 4 additions
|
|
||||||
- **Total Test Suite**: 139 tests passing across all phases
|
|
||||||
- **Code Quality**: Maintained 100% Black formatting and Ruff compliance
|
|
||||||
- **Type Safety**: Full mypy compliance across new modules
|
|
||||||
|
|
||||||
### Documentation Updates
|
|
||||||
- Updated DEVELOPMENT_PLAN.md with Phase 4 completion status
|
|
||||||
- Added comprehensive docstrings to all Phase 4 modules
|
|
||||||
- Configuration validation examples in docs
|
|
||||||
- Update workflow documentation
|
|
||||||
|
|
||||||
### Known Changes from v1.0.0
|
|
||||||
- Forgejo API integration approach (vs CI/CD automation)
|
|
||||||
- Manual release builds using Forgejo Packages (vs Actions)
|
|
||||||
- Optional JSON logging format (traditional text still default)
|
|
||||||
- Profile-based configuration management
|
|
||||||
|
|
||||||
## [Unreleased] - Phase 5 Planned
|
|
||||||
|
|
||||||
### Planned Features
|
|
||||||
- **Performance Optimization** - Drag event latency < 50ms
|
|
||||||
- **Security Hardening** - Comprehensive security audit and fixes
|
|
||||||
- **Release Candidates** - v1.0.1-rc1, rc2, rc3 testing
|
|
||||||
- **Final Releases** - Stable Windows & macOS builds
|
|
||||||
- **Analytics** (Optional post-release)
|
|
||||||
- **Community Support** - GitHub/Forgejo discussion forums
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Version Numbering
|
|
||||||
|
|
||||||
- **MAJOR**: Significant feature additions or breaking changes
|
|
||||||
- **MINOR**: New features, backward compatible
|
|
||||||
- **PATCH**: Bug fixes, improvements
|
|
||||||
|
|
||||||
Example: `1.0.0` = Version 1, Release 0, Patch 0
|
|
||||||
|
|
||||||
## Release Process
|
|
||||||
|
|
||||||
1. Update version in `src/webdrop_bridge/__init__.py` (__version__)
|
|
||||||
2. Update CHANGELOG.md with new features/fixes
|
|
||||||
3. Commit: `git commit -m "chore: Bump version to X.Y.Z"`
|
|
||||||
4. Build on Windows: `python build/scripts/build_windows.py`
|
|
||||||
5. Build on macOS: `bash build/scripts/build_macos.sh`
|
|
||||||
6. Tag: `git tag -a vX.Y.Z -m "Release version X.Y.Z"`
|
|
||||||
7. Push: `git push upstream vX.Y.Z`
|
|
||||||
8. (Optional) Upload to Forgejo Packages using provided upload scripts
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Current Version**: 1.0.0 (Released 2026-01-28)
|
|
||||||
**Last Updated**: 2026-02-18 with v1.0.1 Phase 4 features
|
|
||||||
**Next Version**: 1.1.0 (Planned for Phase 5 release candidates)
|
|
||||||
|
|
@ -1,268 +0,0 @@
|
||||||
# Angular CDK Drag & Drop Analysis - GlobalDAM
|
|
||||||
|
|
||||||
## Framework Detection
|
|
||||||
|
|
||||||
**Web Application:** Agravity GlobalDAM
|
|
||||||
**Framework:** Angular 19.2.14
|
|
||||||
**Drag & Drop:** Angular CDK (Component Dev Kit)
|
|
||||||
**Styling:** TailwindCSS
|
|
||||||
|
|
||||||
## Technical Findings
|
|
||||||
|
|
||||||
### 1. Angular CDK Implementation
|
|
||||||
|
|
||||||
```html
|
|
||||||
<!-- Drag Group (oberste Ebene) -->
|
|
||||||
<div cdkdroplistgroup="" aydnd="" class="flex h-full flex-col">
|
|
||||||
|
|
||||||
<!-- Drop Zone (Collections) -->
|
|
||||||
<div cdkdroplist="" class="cdk-drop-list" id="collectioncsuaaDVNokl0...">
|
|
||||||
|
|
||||||
<!-- Draggable Element (Asset Card) -->
|
|
||||||
<li cdkdrag="" class="cdk-drag asset-list-item" draggable="false">
|
|
||||||
<img src="./GlobalDAM JRI_files/anPGZszKzgKaSz1SIx2HFgduy"
|
|
||||||
alt="weiss_ORIGINAL">
|
|
||||||
</li>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. Key Observations
|
|
||||||
|
|
||||||
#### Native HTML5 Drag ist DEAKTIVIERT
|
|
||||||
```html
|
|
||||||
draggable="false"
|
|
||||||
```
|
|
||||||
|
|
||||||
**Bedeutung:**
|
|
||||||
- Kein Zugriff auf native `dragstart`, `drag`, `dragend` Events
|
|
||||||
- Kein `event.dataTransfer` API verfügbar
|
|
||||||
- Angular CDK simuliert Drag & Drop komplett in JavaScript
|
|
||||||
- Daten werden NICHT über natives Clipboard/DataTransfer übertragen
|
|
||||||
|
|
||||||
#### Angular CDK Direktiven
|
|
||||||
- `cdkdroplistgroup` - Gruppiert mehrere Drop-Zonen
|
|
||||||
- `cdkdroplist` - Markiert Drop-Bereiche (Collections, Clipboard)
|
|
||||||
- `cdkdrag` - Markiert draggbare Elemente (Assets)
|
|
||||||
- `cdkdroplistsortingdisabled` - Sortierung deaktiviert
|
|
||||||
|
|
||||||
#### Asset Identifikation
|
|
||||||
```html
|
|
||||||
<!-- Asset ID im Element-ID -->
|
|
||||||
<div id="anPGZszKzgKaSz1SIx2HFgduy">
|
|
||||||
|
|
||||||
<!-- Asset ID in der Bild-URL -->
|
|
||||||
<img src="./GlobalDAM JRI_files/anPGZszKzgKaSz1SIx2HFgduy">
|
|
||||||
|
|
||||||
<!-- Asset Name im alt-Attribut -->
|
|
||||||
<img alt="weiss_ORIGINAL">
|
|
||||||
```
|
|
||||||
|
|
||||||
## Impact on WebDrop Bridge
|
|
||||||
|
|
||||||
### ❌ Bisheriger Ansatz funktioniert NICHT
|
|
||||||
|
|
||||||
Unser aktueller Ansatz basiert auf:
|
|
||||||
1. Interception von nativen Drag-Events
|
|
||||||
2. Manipulation von `event.dataTransfer.effectAllowed` und `.dropEffect`
|
|
||||||
3. Setzen von URLs im DataTransfer
|
|
||||||
|
|
||||||
**Das funktioniert NICHT mit Angular CDK**, da:
|
|
||||||
- Angular CDK das native Drag & Drop komplett umgeht
|
|
||||||
- Keine nativen Events gefeuert werden
|
|
||||||
- DataTransfer API nicht verwendet wird
|
|
||||||
|
|
||||||
### ✅ Mögliche Lösungsansätze
|
|
||||||
|
|
||||||
#### Ansatz 1: JavaScript Injection zur Laufzeit
|
|
||||||
Injiziere JavaScript-Code, der Angular CDK Events abfängt:
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
// Überwache Angular CDK Event-Handler
|
|
||||||
document.addEventListener('cdkDragStarted', (event) => {
|
|
||||||
const assetId = event.source.element.nativeElement.id;
|
|
||||||
const assetName = event.source.element.nativeElement.querySelector('img')?.alt;
|
|
||||||
|
|
||||||
// Sende an Qt WebChannel
|
|
||||||
bridge.handleDragStart(assetId, assetName);
|
|
||||||
});
|
|
||||||
|
|
||||||
document.addEventListener('cdkDragDropped', (event) => {
|
|
||||||
// Verhindere das Standard-Verhalten
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
// Starte nativen Drag von Qt aus
|
|
||||||
bridge.initNativeDrag();
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
**Vorteile:**
|
|
||||||
- ✅ Direkter Zugriff auf Angular CDK Events
|
|
||||||
- ✅ Kann Asset-Informationen extrahieren
|
|
||||||
- ✅ Kann Drag-Operationen abfangen
|
|
||||||
|
|
||||||
**Nachteile:**
|
|
||||||
- ⚠️ Erfordert genaue Kenntnis der Angular CDK Internals
|
|
||||||
- ⚠️ Könnte bei Angular CDK Updates brechen
|
|
||||||
- ⚠️ Komplexer zu implementieren
|
|
||||||
|
|
||||||
#### Ansatz 2: DOM Mutation Observer
|
|
||||||
Überwache DOM-Änderungen während des Drags:
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
const observer = new MutationObserver((mutations) => {
|
|
||||||
mutations.forEach((mutation) => {
|
|
||||||
// Suche nach CDK Drag-Elementen mit bestimmten Klassen
|
|
||||||
const dragElement = document.querySelector('.cdk-drag-preview');
|
|
||||||
if (dragElement) {
|
|
||||||
const assetId = dragElement.querySelector('[id^="a"]')?.id;
|
|
||||||
bridge.handleDrag(assetId);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
observer.observe(document.body, {
|
|
||||||
childList: true,
|
|
||||||
subtree: true,
|
|
||||||
attributes: true,
|
|
||||||
attributeFilter: ['class']
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
**Vorteile:**
|
|
||||||
- ✅ Robuster gegenüber Framework-Updates
|
|
||||||
- ✅ Funktioniert mit beliebigen Frameworks
|
|
||||||
|
|
||||||
**Nachteile:**
|
|
||||||
- ⚠️ Performance-Overhead
|
|
||||||
- ⚠️ Kann falsche Positive erzeugen
|
|
||||||
|
|
||||||
#### Ansatz 3: Qt WebChannel Bridge mit Custom Events
|
|
||||||
Nutze Qt WebChannel, um mit der Angular-Anwendung zu kommunizieren:
|
|
||||||
|
|
||||||
```python
|
|
||||||
# Python-Seite (Qt)
|
|
||||||
class DragBridge(QObject):
|
|
||||||
@Slot(str, str)
|
|
||||||
def onAssetDragStart(self, asset_id: str, asset_name: str):
|
|
||||||
"""Called from JavaScript when Angular CDK drag starts."""
|
|
||||||
logger.info(f"Asset drag started: {asset_id} ({asset_name})")
|
|
||||||
self.convert_and_drag(asset_id, asset_name)
|
|
||||||
```
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
// JavaScript-Seite (injiziert via QWebEngineScript)
|
|
||||||
new QWebChannel(qt.webChannelTransport, (channel) => {
|
|
||||||
const dragBridge = channel.objects.dragBridge;
|
|
||||||
|
|
||||||
// Monkey-patch Angular CDK's DragRef
|
|
||||||
const originalStartDraggingSequence = CdkDrag.prototype._startDraggingSequence;
|
|
||||||
CdkDrag.prototype._startDraggingSequence = function(event) {
|
|
||||||
const assetElement = this.element.nativeElement;
|
|
||||||
const assetId = assetElement.id;
|
|
||||||
const assetName = assetElement.querySelector('img')?.alt;
|
|
||||||
|
|
||||||
// Benachrichtige Qt
|
|
||||||
dragBridge.onAssetDragStart(assetId, assetName);
|
|
||||||
|
|
||||||
// Rufe original Angular CDK Methode auf
|
|
||||||
return originalStartDraggingSequence.call(this, event);
|
|
||||||
};
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
**Vorteile:**
|
|
||||||
- ✅ Saubere Kommunikation zwischen Qt und Web
|
|
||||||
- ✅ Kann Asset-Informationen zuverlässig extrahieren
|
|
||||||
- ✅ Typensicher (Qt Signals/Slots)
|
|
||||||
|
|
||||||
**Nachteile:**
|
|
||||||
- ⚠️ Erfordert Monkey-Patching von Angular CDK
|
|
||||||
- ⚠️ Kann bei CDK Updates brechen
|
|
||||||
|
|
||||||
#### Ansatz 4: Browser DevTools Protocol (Chrome DevTools)
|
|
||||||
Nutze Chrome DevTools Protocol für tiefere Integration:
|
|
||||||
|
|
||||||
```python
|
|
||||||
from PySide6.QtWebEngineCore import QWebEngineProfile
|
|
||||||
|
|
||||||
profile = QWebEngineProfile.defaultProfile()
|
|
||||||
profile.setRequestInterceptor(...)
|
|
||||||
|
|
||||||
# Intercepte Netzwerk-Requests und injiziere Header
|
|
||||||
# Überwache JavaScript-Execution via CDP
|
|
||||||
```
|
|
||||||
|
|
||||||
**Vorteile:**
|
|
||||||
- ✅ Sehr mächtig, kann JavaScript-Execution überwachen
|
|
||||||
- ✅ Kann Events auf niedrigerer Ebene abfangen
|
|
||||||
|
|
||||||
**Nachteile:**
|
|
||||||
- ⚠️ Sehr komplex
|
|
||||||
- ⚠️ Erfordert Chrome DevTools Protocol Kenntnisse
|
|
||||||
- ⚠️ Performance-Overhead
|
|
||||||
|
|
||||||
## Empfohlener Ansatz
|
|
||||||
|
|
||||||
### **Ansatz 3: Qt WebChannel Bridge** (BEVORZUGT)
|
|
||||||
|
|
||||||
**Begründung:**
|
|
||||||
1. ✅ Saubere Architektur mit klarer Trennung
|
|
||||||
2. ✅ Typsicher durch Qt Signals/Slots
|
|
||||||
3. ✅ Kann Asset-IDs und -Namen zuverlässig extrahieren
|
|
||||||
4. ✅ Funktioniert auch wenn Angular CDK interne Änderungen hat
|
|
||||||
5. ✅ Ermöglicht bidirektionale Kommunikation
|
|
||||||
|
|
||||||
**Implementierungsschritte:**
|
|
||||||
|
|
||||||
### Phase 1: Asset-Informationen extrahieren
|
|
||||||
1. JavaScript via QWebEngineScript injizieren
|
|
||||||
2. Qt WebChannel setuppen
|
|
||||||
3. Angular CDK Events überwachen (ohne Monkey-Patching als Test)
|
|
||||||
4. Asset-IDs und Namen an Qt senden
|
|
||||||
|
|
||||||
### Phase 2: Native Drag initiieren
|
|
||||||
1. Bei CDK Drag-Start: Extrahiere Asset-Informationen
|
|
||||||
2. Sende Asset-ID an Backend/API
|
|
||||||
3. Erhalte lokalen Dateipfad oder Azure Blob URL
|
|
||||||
4. Konvertiere zu lokalem Pfad (wie aktuell)
|
|
||||||
5. Initiiere nativen Drag mit QDrag
|
|
||||||
|
|
||||||
### Phase 3: Drag-Feedback
|
|
||||||
1. Zeige Drag-Preview in Qt (optional)
|
|
||||||
2. Update Cursor während Drag
|
|
||||||
3. Cleanup nach Drag-Ende
|
|
||||||
|
|
||||||
## Asset-ID zu Dateipfad Mapping
|
|
||||||
|
|
||||||
Die Anwendung verwendet Asset-IDs in mehreren Formaten:
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
// Asset-ID: anPGZszKzgKaSz1SIx2HFgduy
|
|
||||||
|
|
||||||
// Mögliche URL-Konstruktion:
|
|
||||||
const assetUrl = `https://dev.agravity.io/api/assets/${assetId}`;
|
|
||||||
const downloadUrl = `https://dev.agravity.io/api/assets/${assetId}/download`;
|
|
||||||
const blobUrl = `https://static.agravity.io/${workspaceId}/${assetId}/${filename}`;
|
|
||||||
```
|
|
||||||
|
|
||||||
**Für WebDrop Bridge:**
|
|
||||||
- Asset-ID aus DOM extrahieren
|
|
||||||
- Asset-Metadaten via API abrufen (falls verfügbar)
|
|
||||||
- Blob-URL konstruieren
|
|
||||||
- URL Converter nutzen (bereits implementiert!)
|
|
||||||
|
|
||||||
## Next Steps
|
|
||||||
|
|
||||||
1. **Proof of Concept**: Qt WebChannel mit einfachem Event-Logger
|
|
||||||
2. **Asset-ID Extraction**: JavaScript Injection testen
|
|
||||||
3. **API Research**: GlobalDAM API untersuchen (Asset-Metadaten)
|
|
||||||
4. **Integration**: Mit bestehendem URLConverter verbinden
|
|
||||||
5. **Testing**: Mit echten Assets testen
|
|
||||||
|
|
||||||
## Hinweise
|
|
||||||
|
|
||||||
- Angular CDK Version kann sich unterscheiden - Code muss robust sein
|
|
||||||
- Asset-IDs scheinen eindeutig zu sein (Base64-ähnlich)
|
|
||||||
- Die Anwendung nutzt Azure Blob Storage (basierend auf bisherigen URLs)
|
|
||||||
- Custom Components (`ay-*`) deuten auf eine eigene Component Library hin
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue