2026-03-05 14:45:06 +01:00
|
|
|
<!doctype html>
|
|
|
|
|
<html lang="it">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
2026-03-16 10:31:59 +01:00
|
|
|
<title>CadRoute</title>
|
2026-03-05 14:45:06 +01:00
|
|
|
<style>
|
|
|
|
|
:root {
|
|
|
|
|
color-scheme: light;
|
|
|
|
|
--bg: #f6f8fb;
|
|
|
|
|
--card: #ffffff;
|
|
|
|
|
--text: #0f172a;
|
|
|
|
|
--muted: #475569;
|
|
|
|
|
--accent: #0b5fff;
|
|
|
|
|
--border: #dbe2ea;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
* {
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
body {
|
|
|
|
|
margin: 0;
|
|
|
|
|
background: linear-gradient(130deg, #eaf0ff 0%, var(--bg) 45%, #f9fbff 100%);
|
|
|
|
|
color: var(--text);
|
|
|
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.page {
|
|
|
|
|
max-width: 820px;
|
|
|
|
|
margin: 40px auto;
|
|
|
|
|
background: var(--card);
|
|
|
|
|
border: 1px solid var(--border);
|
|
|
|
|
border-radius: 14px;
|
|
|
|
|
padding: 26px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
h1 {
|
|
|
|
|
margin-top: 0;
|
|
|
|
|
margin-bottom: 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
p {
|
|
|
|
|
margin: 0;
|
|
|
|
|
color: var(--muted);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.actions {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
margin-top: 18px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
button {
|
|
|
|
|
border: 1px solid transparent;
|
|
|
|
|
background: var(--accent);
|
|
|
|
|
color: white;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
padding: 11px 16px;
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
button.secondary {
|
|
|
|
|
background: #1f2937;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
button:hover {
|
|
|
|
|
opacity: 0.92;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
button:disabled {
|
|
|
|
|
opacity: 0.5;
|
|
|
|
|
cursor: wait;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.info {
|
|
|
|
|
margin-top: 18px;
|
|
|
|
|
padding: 14px;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
border: 1px solid var(--border);
|
|
|
|
|
background: #f8fafc;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-05 16:11:01 +01:00
|
|
|
.rules {
|
|
|
|
|
margin-top: 18px;
|
|
|
|
|
border: 1px solid var(--border);
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
padding: 14px;
|
|
|
|
|
background: #f8fafc;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-05 16:30:03 +01:00
|
|
|
.drop-zone {
|
|
|
|
|
margin-top: 18px;
|
|
|
|
|
border: 2px dashed #9db4d8;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
background: #f2f7ff;
|
|
|
|
|
color: #1e3a5f;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.drop-zone.active {
|
|
|
|
|
border-color: var(--accent);
|
|
|
|
|
background: #e8f0ff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.drop-zone.error {
|
|
|
|
|
border-color: #dc2626;
|
|
|
|
|
background: #fff1f2;
|
|
|
|
|
color: #991b1b;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-05 16:11:01 +01:00
|
|
|
.rules h2 {
|
|
|
|
|
margin: 0 0 10px;
|
|
|
|
|
font-size: 17px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.rule-row {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: 180px 1fr auto auto;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.rule-row.single-row {
|
|
|
|
|
grid-template-columns: 1fr auto auto;
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-16 10:27:12 +01:00
|
|
|
.rule-row.preview-actions {
|
|
|
|
|
grid-template-columns: auto auto;
|
|
|
|
|
justify-content: start;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-05 16:11:01 +01:00
|
|
|
.rule-label {
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
color: var(--muted);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.rule-row input {
|
|
|
|
|
min-width: 0;
|
|
|
|
|
padding: 9px 10px;
|
|
|
|
|
border: 1px solid var(--border);
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.rule-row button {
|
|
|
|
|
padding: 9px 12px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.rule-row button.browse {
|
|
|
|
|
background: #334155;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.rule-status {
|
|
|
|
|
margin-top: 4px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: var(--muted);
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-16 10:11:59 +01:00
|
|
|
.preview-overlay {
|
|
|
|
|
position: fixed;
|
|
|
|
|
inset: 0;
|
|
|
|
|
background: rgba(15, 23, 42, 0.55);
|
|
|
|
|
display: none;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
padding: 16px;
|
|
|
|
|
z-index: 20;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.preview-overlay.visible {
|
|
|
|
|
display: flex;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.preview-card {
|
|
|
|
|
width: min(900px, 100%);
|
|
|
|
|
max-height: 85vh;
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
border: 1px solid var(--border);
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
padding: 14px;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.preview-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
gap: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-16 10:27:12 +01:00
|
|
|
.preview-header-actions {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-16 10:11:59 +01:00
|
|
|
.preview-header h2 {
|
|
|
|
|
margin: 0;
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-16 10:27:12 +01:00
|
|
|
.danger {
|
|
|
|
|
background: #b91c1c;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-16 10:11:59 +01:00
|
|
|
.preview-meta {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: var(--muted);
|
|
|
|
|
word-break: break-all;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.preview-list {
|
|
|
|
|
margin: 0;
|
|
|
|
|
background: #0f172a;
|
|
|
|
|
color: #e2e8f0;
|
|
|
|
|
border: 1px solid var(--border);
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
padding: 12px;
|
|
|
|
|
overflow: auto;
|
|
|
|
|
min-height: 220px;
|
|
|
|
|
max-height: 58vh;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
white-space: pre-wrap;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-05 16:11:01 +01:00
|
|
|
@media (max-width: 760px) {
|
|
|
|
|
.rule-row {
|
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-05 14:45:06 +01:00
|
|
|
pre {
|
|
|
|
|
margin-top: 18px;
|
|
|
|
|
padding: 14px;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
border: 1px solid var(--border);
|
|
|
|
|
background: #0f172a;
|
|
|
|
|
color: #e2e8f0;
|
|
|
|
|
overflow: auto;
|
|
|
|
|
min-height: 180px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<main class="page">
|
2026-03-16 10:31:59 +01:00
|
|
|
<h1>CadRoute - Smistatore automatico</h1>
|
2026-03-05 16:11:01 +01:00
|
|
|
<p>Seleziona una cartella o uno ZIP con i disegni da smistare</p>
|
2026-03-05 14:45:06 +01:00
|
|
|
|
|
|
|
|
<div class="actions">
|
|
|
|
|
<button id="folderBtn">Process Folder</button>
|
|
|
|
|
<button id="zipBtn" class="secondary">Process ZIP</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-03-05 16:30:03 +01:00
|
|
|
<section class="drop-zone" id="dropZone">
|
|
|
|
|
Trascina qui una cartella o un file .zip
|
|
|
|
|
</section>
|
|
|
|
|
|
2026-03-05 16:11:01 +01:00
|
|
|
<section class="rules">
|
|
|
|
|
<h2>Destinazione file CAD</h2>
|
|
|
|
|
<div class="rule-row single-row">
|
|
|
|
|
<input id="destinationInput" type="text" placeholder="Percorso destinazione..." />
|
|
|
|
|
<button id="browseDestinationBtn" class="browse">Sfoglia</button>
|
|
|
|
|
<button id="saveDestinationBtn">Salva</button>
|
|
|
|
|
</div>
|
2026-03-16 10:27:12 +01:00
|
|
|
<div class="rule-row single-row preview-actions">
|
2026-03-16 10:11:59 +01:00
|
|
|
<button id="openUnroutedBtn" class="browse">Anteprima non smistati</button>
|
2026-03-16 10:27:12 +01:00
|
|
|
<button id="openDuplicatesBtn" class="browse">Anteprima duplicati</button>
|
2026-03-16 12:10:43 +01:00
|
|
|
<button id="openSkippedBtn" class="browse">Anteprima saltati</button>
|
2026-03-16 10:11:59 +01:00
|
|
|
</div>
|
2026-03-05 16:11:01 +01:00
|
|
|
<div class="rule-status" id="destinationStatus"></div>
|
|
|
|
|
</section>
|
2026-03-05 14:45:06 +01:00
|
|
|
<pre id="output">Pronto.</pre>
|
|
|
|
|
</main>
|
|
|
|
|
|
2026-03-16 10:27:12 +01:00
|
|
|
<section class="preview-overlay" id="previewOverlay">
|
2026-03-16 10:11:59 +01:00
|
|
|
<article class="preview-card">
|
|
|
|
|
<div class="preview-header">
|
2026-03-16 10:27:12 +01:00
|
|
|
<h2 id="previewTitle">Anteprima</h2>
|
|
|
|
|
<div class="preview-header-actions">
|
|
|
|
|
<button id="clearPreviewBtn" class="danger">Pulisci cartella</button>
|
|
|
|
|
<button id="closePreviewBtn" class="secondary">Chiudi</button>
|
|
|
|
|
</div>
|
2026-03-16 10:11:59 +01:00
|
|
|
</div>
|
2026-03-16 10:27:12 +01:00
|
|
|
<div class="preview-meta" id="previewMeta"></div>
|
|
|
|
|
<pre class="preview-list" id="previewList">Nessun dato.</pre>
|
2026-03-16 10:11:59 +01:00
|
|
|
</article>
|
|
|
|
|
</section>
|
|
|
|
|
|
2026-03-05 14:45:06 +01:00
|
|
|
<script src="./renderer.js"></script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|