247 lines
7.5 KiB
HTML
247 lines
7.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>WebDrop Bridge - Test Application</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
.container {
|
|
background: white;
|
|
border-radius: 16px;
|
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
|
max-width: 500px;
|
|
width: 100%;
|
|
padding: 40px;
|
|
}
|
|
|
|
h1 {
|
|
color: #333;
|
|
margin-bottom: 10px;
|
|
font-size: 28px;
|
|
text-align: center;
|
|
}
|
|
|
|
.subtitle {
|
|
color: #666;
|
|
text-align: center;
|
|
margin-bottom: 40px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.drag-items {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 20px;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.drag-item {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
padding: 20px;
|
|
border-radius: 12px;
|
|
cursor: grab;
|
|
text-align: center;
|
|
transition: all 0.3s ease;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
}
|
|
|
|
.drag-item:hover {
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
|
|
}
|
|
|
|
.drag-item:active {
|
|
cursor: grabbing;
|
|
}
|
|
|
|
.drag-item h3 {
|
|
font-size: 18px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.drag-item p {
|
|
font-size: 12px;
|
|
opacity: 0.9;
|
|
word-break: break-all;
|
|
font-family: "Courier New", monospace;
|
|
background: rgba(0, 0, 0, 0.2);
|
|
padding: 8px;
|
|
border-radius: 6px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.status {
|
|
background: #f5f5f5;
|
|
border: 1px solid #e0e0e0;
|
|
border-radius: 8px;
|
|
padding: 15px;
|
|
margin-bottom: 20px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.status h4 {
|
|
color: #333;
|
|
margin-bottom: 8px;
|
|
font-size: 12px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.status-message {
|
|
color: #666;
|
|
font-family: "Courier New", monospace;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.status-message.success {
|
|
color: #4caf50;
|
|
}
|
|
|
|
.status-message.info {
|
|
color: #2196f3;
|
|
}
|
|
|
|
.instructions {
|
|
background: #e3f2fd;
|
|
border-left: 4px solid #2196f3;
|
|
padding: 15px;
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
color: #1565c0;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.instructions li {
|
|
margin-left: 20px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.footer {
|
|
text-align: center;
|
|
margin-top: 30px;
|
|
font-size: 12px;
|
|
color: #999;
|
|
}
|
|
|
|
.icon {
|
|
font-size: 32px;
|
|
margin-bottom: 10px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="icon">📦</div>
|
|
<h1>WebDrop Bridge</h1>
|
|
<p class="subtitle">Drag files from here to InDesign, Word, or other applications</p>
|
|
|
|
<div class="status">
|
|
<h4>Status</h4>
|
|
<div class="status-message info" id="statusMessage">Ready to test drag and drop</div>
|
|
</div>
|
|
|
|
<div class="drag-items">
|
|
<div class="drag-item" draggable="true" id="dragItem1">
|
|
<div class="icon">🖼️</div>
|
|
<h3>Local Z:\ Image</h3>
|
|
<p id="path1">Z:\data\test-image.jpg</p>
|
|
</div>
|
|
|
|
<div class="drag-item" draggable="true" id="dragItem2">
|
|
<div class="icon">📄</div>
|
|
<h3>Local Z:\ Document</h3>
|
|
<p id="path2">Z:\data\API_DOCUMENTATION.pdf</p>
|
|
</div>
|
|
|
|
<div class="drag-item" draggable="true" id="dragItem3">
|
|
<div class="icon">☁️</div>
|
|
<h3>Azure Blob Storage Image</h3>
|
|
<p id="path3">https://devagravitystg.file.core.windows.net/devagravitysync/aN5PysnXIuRECzcRbvHkjL7g0/Hintergrund_Agravity.png</p>
|
|
</div>
|
|
|
|
<div class="drag-item" draggable="true" id="dragItem4">
|
|
<div class="icon">☁️</div>
|
|
<h3>Azure Blob Storage Document</h3>
|
|
<p id="path4">https://devagravitystg.file.core.windows.net/devagravitysync/test/document.pdf</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="instructions">
|
|
<h4>How to test:</h4>
|
|
<ol>
|
|
<li>Open InDesign, Word, or Notepad++</li>
|
|
<li>Drag one of the items above to the application</li>
|
|
<li>Local Z:\ paths and Azure URLs will be converted to file drags</li>
|
|
<li>Azure URLs will be mapped to Z:\ paths automatically</li>
|
|
<li>Check the browser console (F12) for debug info</li>
|
|
</ol>
|
|
<p><strong>Note:</strong> When dragging images from web apps like Agravity, the browser may not provide text/plain data. Press <kbd>ALT</kbd> while dragging to force text drag mode.</p>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>WebDrop Bridge v1.0.0 | Built with Qt and PySide6</p>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// Debug logging for drag operations
|
|
document.addEventListener('dragstart', function(e) {
|
|
var statusEl = document.getElementById('statusMessage');
|
|
|
|
// Log what's being dragged
|
|
var dt = e.dataTransfer;
|
|
var path = dt.getData('text/plain') || dt.getData('text/uri-list');
|
|
|
|
if (!path && e.target.tagName === 'IMG') {
|
|
path = e.target.src;
|
|
} else if (!path && e.target.tagName === 'A') {
|
|
path = e.target.href;
|
|
} else if (!path) {
|
|
var card = e.target.closest('.drag-item');
|
|
if (card) {
|
|
var pathEl = card.querySelector('p');
|
|
if (pathEl) path = pathEl.textContent.trim();
|
|
}
|
|
}
|
|
|
|
if (path) {
|
|
statusEl.className = 'status-message info';
|
|
statusEl.textContent = 'Dragging: ' + path;
|
|
console.log('[WebDrop] Drag started:', path);
|
|
}
|
|
}, false);
|
|
|
|
document.addEventListener('dragend', function(e) {
|
|
var statusEl = document.getElementById('statusMessage');
|
|
statusEl.className = 'status-message success';
|
|
statusEl.textContent = 'Drag completed!';
|
|
console.log('[WebDrop] Drag ended');
|
|
|
|
// Reset after 2 seconds
|
|
setTimeout(function() {
|
|
statusEl.className = 'status-message info';
|
|
statusEl.textContent = 'Ready to test drag and drop';
|
|
}, 2000);
|
|
}, false);
|
|
</script>
|
|
</body>
|
|
</html>
|