workguard-sentinel / components /device-table.js
mfsobrin's picture
simule com 30 dispisitivo quero uma simulçao fiel
aa15735 verified
Raw History Blame Contribute Delete
2.56 kB
class CustomDeviceTable extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
.table-container {
background-color: #1f2937;
border-radius: 0.5rem;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
overflow-x: auto;
border: 1px solid #374151;
}
table {
color: #f3f4f6;
}
th {
background-color: #111827;
color: #f3f4f6;
}
tr:nth-child(even) {
background-color: #1f2937;
}
tr:nth-child(odd) {
background-color: #111827;
}
tr:hover {
background-color: #374151;
}
table {
width: 100%;
border-collapse: collapse;
font-size: 0.875rem;
}
th {
text-align: left;
padding: 1rem;
font-weight: 600;
color: #94a3b8;
white-space: nowrap;
}
td {
padding: 0.75rem 1rem;
border-bottom: 1px solid #334155;
color: #e2e8f0;
}
.status-badge {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.25rem 0.5rem;
border-radius: 9999px;
font-size: 0.75rem;
font-weight: 600;
}
.status-badge.compliant {
background-color: #10b98120;
color: #10b981;
}
.status-badge.non-compliant {
background-color: #ef444420;
color: #ef4444;
}
.device-type {
display: inline-flex;
align-items: center;
gap: 0.25rem;
}
.device-type.laptop::before {
content: '💻';
}
.device-type.desktop::before {
content: '🖥️';
}