Files
cad-data-router/renderer/index.html

211 lines
4.6 KiB
HTML

<!doctype html>
<html lang="it">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CAD File Router</title>
<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;
}
.rules {
margin-top: 18px;
border: 1px solid var(--border);
border-radius: 10px;
padding: 14px;
background: #f8fafc;
}
.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;
}
.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;
}
.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);
}
@media (max-width: 760px) {
.rule-row {
grid-template-columns: 1fr;
}
}
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">
<h1>Smistatore automatico</h1>
<p>Seleziona una cartella o uno ZIP con i disegni da smistare</p>
<div class="actions">
<button id="folderBtn">Process Folder</button>
<button id="zipBtn" class="secondary">Process ZIP</button>
</div>
<section class="drop-zone" id="dropZone">
Trascina qui una cartella o un file .zip
</section>
<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>
<div class="rule-status" id="destinationStatus"></div>
</section>
<pre id="output">Pronto.</pre>
</main>
<script src="./renderer.js"></script>
</body>
</html>