- Created architecture documentation outlining high-level design, module organization, data flow, security model, performance considerations, testing strategy, and deployment architecture. - Added pyproject.toml for project metadata and dependencies management. - Introduced requirements files for development and production dependencies. - Set up testing configuration with pytest and tox. - Established basic directory structure for source code and tests, including __init__.py files. - Implemented a sample web application (index.html) for drag-and-drop functionality. - Configured VS Code workspace settings for Python development.
249 lines
7.4 KiB
HTML
249 lines
7.4 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>Sample Image</h3>
|
|
<p id="path1">Z:\samples\image.psd</p>
|
|
</div>
|
|
|
|
<div class="drag-item" draggable="true" id="dragItem2">
|
|
<div class="icon">📄</div>
|
|
<h3>Sample Document</h3>
|
|
<p id="path2">Z:\samples\document.indd</p>
|
|
</div>
|
|
|
|
<div class="drag-item" draggable="true" id="dragItem3">
|
|
<div class="icon">📊</div>
|
|
<h3>Sample Data</h3>
|
|
<p id="path3">C:\Users\Public\data.csv</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 below to the application</li>
|
|
<li>The file path should be converted to a real file drag</li>
|
|
<li>Check the browser console (F12) for debug info</li>
|
|
</ol>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>WebDrop Bridge v1.0.0 | Built with Qt and PySide6</p>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
const items = document.querySelectorAll('.drag-item');
|
|
const statusMessage = document.getElementById('statusMessage');
|
|
|
|
items.forEach(item => {
|
|
item.addEventListener('dragstart', (e) => {
|
|
const pathElement = item.querySelector('p');
|
|
const path = pathElement.textContent.trim();
|
|
|
|
e.dataTransfer.effectAllowed = 'copy';
|
|
e.dataTransfer.setData('text/plain', path);
|
|
|
|
statusMessage.textContent = `Dragging: ${path}`;
|
|
statusMessage.className = 'status-message info';
|
|
|
|
console.log('🚀 Drag started:', path);
|
|
console.log('📋 DataTransfer types:', e.dataTransfer.types);
|
|
});
|
|
|
|
item.addEventListener('dragend', (e) => {
|
|
const pathElement = item.querySelector('p');
|
|
const path = pathElement.textContent.trim();
|
|
|
|
if (e.dataTransfer.dropEffect === 'none') {
|
|
statusMessage.textContent = `❌ Drop failed or cancelled`;
|
|
statusMessage.className = 'status-message info';
|
|
} else {
|
|
statusMessage.textContent = `✅ Drop completed: ${e.dataTransfer.dropEffect}`;
|
|
statusMessage.className = 'status-message success';
|
|
}
|
|
|
|
console.log('🏁 Drag ended:', e.dataTransfer.dropEffect);
|
|
});
|
|
|
|
// Visual feedback
|
|
item.addEventListener('dragstart', () => {
|
|
item.style.opacity = '0.5';
|
|
item.style.transform = 'scale(0.95)';
|
|
});
|
|
|
|
item.addEventListener('dragend', () => {
|
|
item.style.opacity = '1';
|
|
item.style.transform = 'scale(1)';
|
|
});
|
|
});
|
|
|
|
// Application info
|
|
console.log('%cWebDrop Bridge', 'font-size: 18px; font-weight: bold; color: #667eea;');
|
|
console.log('Ready for testing. Drag items to other applications.');
|
|
console.log('Check the path values in the drag items above.');
|
|
</script>
|
|
</body>
|
|
</html>
|