Files
Multi-Hoster-Upload/renderer/drop-target.html
T
Sucukdeluxe d7c9f287e4
CI / verify (push) Has been cancelled
release: restore v2.1.19 baseline for v2.1.24
Restore the v2.1.19 application baseline and retain only the focused import preflight summary with duplicate, unavailable, destination, job, and size-limit visibility.
2026-08-17 04:25:22 +02:00

93 lines
2.3 KiB
HTML

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
width: 100%;
height: 100%;
overflow: hidden;
background: transparent;
-webkit-app-region: drag;
user-select: none;
}
.target {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
border: 1px dashed rgba(186, 208, 252, 0.62);
border-radius: 8px;
background: rgba(35, 35, 35, 0.94);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
transition: border-color 0.15s, background-color 0.15s, transform 0.15s;
}
.target.drag-over {
border-color: #bad0fc;
background: rgba(51, 52, 54, 0.98);
transform: scale(0.98);
}
.icon {
width: 54px;
height: 54px;
display: grid;
place-items: center;
border-radius: 8px;
background: #2b2b2b;
color: #bad0fc;
-webkit-app-region: no-drag;
}
.icon svg {
width: 30px;
height: 30px;
fill: none;
stroke: currentColor;
stroke-width: 1.65;
stroke-linecap: round;
stroke-linejoin: round;
}
@media (prefers-reduced-motion: reduce) {
.target {
transition: none;
}
.target.drag-over {
transform: none;
}
}
</style>
</head>
<body>
<div class="target" id="target">
<div class="icon" aria-hidden="true">
<svg viewBox="0 0 24 24"><path d="M12 16V4m0 0L7.5 8.5M12 4l4.5 4.5M5 14v4.5A1.5 1.5 0 0 0 6.5 20h11a1.5 1.5 0 0 0 1.5-1.5V14"/></svg>
</div>
</div>
<script>
const target = document.getElementById('target');
target.addEventListener('dragover', (e) => {
e.preventDefault();
e.stopPropagation();
target.classList.add('drag-over');
});
target.addEventListener('dragleave', (e) => {
e.preventDefault();
target.classList.remove('drag-over');
});
target.addEventListener('drop', (e) => {
e.preventDefault();
e.stopPropagation();
target.classList.remove('drag-over');
const paths = [];
for (const file of e.dataTransfer.files) {
if (file.path) paths.push(file.path);
}
if (paths.length > 0) {
window.dropTargetApi.sendFiles(paths);
}
});
</script>
</body>
</html>