Refactor UI components for layout management and results display
- Replaced the `renderizar` function in `layouts.rs` with a new `view` function using Iced for a more modern UI approach. - Introduced a new `view_secao_layouts` function to handle the display of saved layouts. - Updated the `resultado.rs` file to use Iced for rendering the results screen, including buttons for actions and pagination controls. - Created a new `selecionar_aba.rs` file for the selection of XLSX sheet tabs, implementing a preview feature. - Removed old rendering functions and replaced them with Iced components for better performance and maintainability. - Added design tokens in `design_tokens.json` for consistent styling across the application. - Created a mockup HTML file to visualize the UI design.
This commit is contained in:
@@ -0,0 +1,287 @@
|
||||
```html
|
||||
<!doctype html>
|
||||
<html lang="pt-BR">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Comparador de Notas - Mockup</title>
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--bg: #0f172a;
|
||||
--surface: #1e293b;
|
||||
--surface-2: #334155;
|
||||
|
||||
--text: #f1f5f9;
|
||||
--text-secondary: #94a3b8;
|
||||
|
||||
--border: #334155;
|
||||
|
||||
--primary: #3b82f6;
|
||||
--success: #22c55e;
|
||||
--warning: #f59e0b;
|
||||
--error: #ef4444;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: system-ui, sans-serif;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 1100px;
|
||||
margin: 40px auto;
|
||||
background: var(--surface);
|
||||
border-radius: 8px;
|
||||
padding: 24px;
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.actions button {
|
||||
background: var(--primary);
|
||||
border: none;
|
||||
padding: 10px 16px;
|
||||
border-radius: 6px;
|
||||
color: white;
|
||||
margin-left: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.actions button.secondary {
|
||||
background: var(--surface-2);
|
||||
}
|
||||
|
||||
.stats {
|
||||
display: flex;
|
||||
gap: 40px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.stat {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.stat strong {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.series-box {
|
||||
background: var(--surface-2);
|
||||
padding: 16px;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.series {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.progress {
|
||||
height: 8px;
|
||||
background: #111827;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.bar {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.green {
|
||||
background: var(--success);
|
||||
}
|
||||
.orange {
|
||||
background: var(--warning);
|
||||
}
|
||||
.red {
|
||||
background: var(--error);
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
thead {
|
||||
background: var(--surface-2);
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.status {
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.ok {
|
||||
background: rgba(34, 197, 94, 0.2);
|
||||
color: var(--success);
|
||||
}
|
||||
|
||||
.dup {
|
||||
background: rgba(239, 68, 68, 0.2);
|
||||
color: var(--error);
|
||||
}
|
||||
|
||||
.missing {
|
||||
background: rgba(245, 158, 11, 0.2);
|
||||
color: var(--warning);
|
||||
}
|
||||
|
||||
.footer {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.footer button {
|
||||
background: var(--surface-2);
|
||||
border: none;
|
||||
padding: 10px 14px;
|
||||
border-radius: 6px;
|
||||
color: var(--text);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.footer button.primary {
|
||||
background: var(--primary);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<div class="title">Comparador de Notas</div>
|
||||
|
||||
<div class="actions">
|
||||
<button>Importar Planilha</button>
|
||||
<button class="secondary">Configurar Campos</button>
|
||||
<button class="secondary">Exportar Relatório</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="stats">
|
||||
<div class="stat">
|
||||
<strong style="color: #3b82f6">48</strong> Notas Faltantes
|
||||
</div>
|
||||
<div class="stat">
|
||||
<strong style="color: #ef4444">6</strong> Notas Duplicadas
|
||||
</div>
|
||||
<div class="stat"><strong>R$ 125.600,00</strong> Total</div>
|
||||
</div>
|
||||
|
||||
<div class="series-box">
|
||||
<div class="series">
|
||||
Série 1 – NFE — 48 / 50 notas — 96% completo
|
||||
<div class="progress">
|
||||
<div class="bar green" style="width: 96%"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="series">
|
||||
Série 2 – NFCE — 20 / 25 notas — 80% completo
|
||||
<div class="progress">
|
||||
<div class="bar orange" style="width: 80%"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="series">
|
||||
Série 3 – NFE — 12 / 20 notas — 60% completo
|
||||
<div class="progress">
|
||||
<div class="bar red" style="width: 60%"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Número</th>
|
||||
<th>Série</th>
|
||||
<th>Tipo</th>
|
||||
<th>Valor</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1005</td>
|
||||
<td>1</td>
|
||||
<td>NFE</td>
|
||||
<td>R$ 2.500,00</td>
|
||||
<td><span class="status dup">Duplicada</span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>1006</td>
|
||||
<td>1</td>
|
||||
<td>NFE</td>
|
||||
<td>R$ 3.200,00</td>
|
||||
<td><span class="status ok">OK</span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>1010</td>
|
||||
<td>1</td>
|
||||
<td>NFE</td>
|
||||
<td>R$ 4.000,00</td>
|
||||
<td>
|
||||
<span class="status missing">Falta: 1010–1050</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>1051</td>
|
||||
<td>1</td>
|
||||
<td>NFE</td>
|
||||
<td>R$ 2.800,00</td>
|
||||
<td><span class="status ok">OK</span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>1075</td>
|
||||
<td>2</td>
|
||||
<td>NFCE</td>
|
||||
<td>R$ 1.200,00</td>
|
||||
<td><span class="status dup">Duplicada</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="footer">
|
||||
<button>Copiar Faltantes</button>
|
||||
<button>Copiar Duplicadas</button>
|
||||
<button class="primary">Exportar PDF</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
Reference in New Issue
Block a user