mirror of
https://github.com/UNITRONIX/BetterDesk.git
synced 2026-09-10 09:35:39 +00:00
7a0b3b7387
- #90: Bump z-index hierarchy (modal 1100, toast 1200, tooltip 1300) - #97: Block old peer ID re-registration after ID change (IsRenamedPeerID) - #100: Add broken pipe/connection refused to isNormalClose(), reduce TCP log spam - #82: Reset cookie secure flag + CSRF downgrade on SSL cert fallback - #78: Docker entrypoint write-check before start with clear error message - #75: Replace transition:all with specific properties in 6 CSS files - #98: Show HTTPS URL in Docker startup banner when SSL enabled - #68: Add %% escaping for systemd specifiers alongside web-nodejs/server.js escaping Files: 5 Go (signal, db), 2 Node.js (server, csrf), 6 CSS, 1 Docker, 1 installer
1358 lines
28 KiB
CSS
1358 lines
28 KiB
CSS
/**
|
|
* BetterDesk Console - Devices Page Styles v2
|
|
* Responsive: PC (>=1024px) > Tablet (600-1023px) > Phone (<600px)
|
|
*/
|
|
|
|
/* ==================== Page Layout ==================== */
|
|
|
|
.devices-page {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm, 0.5rem);
|
|
}
|
|
|
|
/* ==================== Header ==================== */
|
|
|
|
.devices-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--space-md);
|
|
}
|
|
|
|
.devices-title {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.devices-title h1 {
|
|
font-size: var(--font-size-xl, 1.25rem);
|
|
font-weight: var(--font-weight-bold);
|
|
margin: 0;
|
|
}
|
|
|
|
.devices-count {
|
|
background: var(--accent-blue-muted);
|
|
color: var(--accent-blue);
|
|
padding: 2px 8px;
|
|
border-radius: var(--radius-full);
|
|
font-size: var(--font-size-xs);
|
|
font-weight: var(--font-weight-medium);
|
|
}
|
|
|
|
.devices-actions .btn-sm {
|
|
padding: 6px 12px;
|
|
font-size: var(--font-size-sm);
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.devices-actions .btn-sm .material-icons {
|
|
font-size: 18px;
|
|
}
|
|
|
|
/* ==================== Folder Chips ==================== */
|
|
|
|
.folders-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs, 0.25rem);
|
|
min-height: 34px;
|
|
}
|
|
|
|
.folders-chips {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs, 0.25rem);
|
|
overflow-x: auto;
|
|
scrollbar-width: none;
|
|
-ms-overflow-style: none;
|
|
flex: 1;
|
|
min-width: 0;
|
|
padding: 2px 0;
|
|
}
|
|
|
|
.folders-chips::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.folder-chip {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 4px 10px;
|
|
border: 1px solid var(--border-primary, #30363d);
|
|
border-radius: var(--radius-full, 9999px);
|
|
background: var(--bg-secondary, #161b22);
|
|
color: var(--text-secondary, #8b949e);
|
|
font-size: var(--font-size-xs, 0.75rem);
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
|
|
flex-shrink: 0;
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
position: relative;
|
|
font-family: inherit;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.folder-chip:hover {
|
|
background: var(--bg-hover);
|
|
color: var(--text-primary);
|
|
border-color: var(--border-hover, #484f58);
|
|
}
|
|
|
|
.folder-chip.active {
|
|
background: var(--accent-blue-muted, rgba(88, 166, 255, 0.15));
|
|
border-color: var(--accent-blue, #58a6ff);
|
|
color: var(--accent-blue, #58a6ff);
|
|
}
|
|
|
|
.folder-chip.drag-over {
|
|
background: var(--accent-green-muted);
|
|
border-color: var(--accent-green);
|
|
color: var(--accent-green);
|
|
}
|
|
|
|
.chip-icon {
|
|
font-size: 14px !important;
|
|
}
|
|
|
|
.chip-count {
|
|
font-size: 10px;
|
|
background: var(--bg-tertiary, #21262d);
|
|
padding: 0 5px;
|
|
border-radius: var(--radius-full);
|
|
line-height: 16px;
|
|
transition: opacity 0.15s ease;
|
|
}
|
|
|
|
.folder-chip.active .chip-count {
|
|
background: rgba(88, 166, 255, 0.25);
|
|
}
|
|
|
|
/* Chip actions (edit/delete) — shown on hover for custom folders */
|
|
.chip-actions {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
margin-left: 2px;
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
position: absolute;
|
|
right: 6px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
transition: opacity 0.15s ease, visibility 0.15s ease;
|
|
background: inherit;
|
|
padding: 0 2px;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
.folder-chip:hover .chip-actions {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
}
|
|
|
|
.folder-chip:hover .chip-count {
|
|
opacity: 0;
|
|
}
|
|
|
|
.chip-action {
|
|
font-size: 14px !important;
|
|
cursor: pointer;
|
|
padding: 1px;
|
|
border-radius: var(--radius-sm);
|
|
transition: color 0.1s;
|
|
color: var(--text-tertiary);
|
|
}
|
|
|
|
.chip-action:hover {
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.chip-action.folder-delete:hover {
|
|
color: var(--accent-red);
|
|
}
|
|
|
|
/* Add folder chip */
|
|
.chip-add {
|
|
padding: 4px 8px;
|
|
border-style: dashed;
|
|
}
|
|
|
|
.chip-add:hover {
|
|
border-color: var(--accent-blue);
|
|
color: var(--accent-blue);
|
|
}
|
|
|
|
.chip-add .material-icons {
|
|
font-size: 16px;
|
|
}
|
|
|
|
/* ==================== Toolbar ==================== */
|
|
|
|
.devices-toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm, 0.5rem);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.toolbar-search {
|
|
flex: 1;
|
|
min-width: 180px;
|
|
}
|
|
|
|
.toolbar-search .form-input {
|
|
padding: 6px 12px 6px 32px;
|
|
font-size: var(--font-size-sm);
|
|
height: 32px;
|
|
}
|
|
|
|
.toolbar-search .material-icons {
|
|
font-size: 18px;
|
|
left: 8px;
|
|
}
|
|
|
|
.toolbar-filters {
|
|
display: flex;
|
|
gap: 2px;
|
|
background: var(--bg-tertiary, #21262d);
|
|
border-radius: var(--radius-md, 8px);
|
|
padding: 2px;
|
|
}
|
|
|
|
.filter-btn {
|
|
padding: 4px 10px;
|
|
font-size: var(--font-size-xs, 0.75rem);
|
|
background: transparent;
|
|
border: none;
|
|
border-radius: var(--radius-sm, 6px);
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.filter-btn:hover {
|
|
color: var(--text-primary);
|
|
background: var(--bg-hover);
|
|
}
|
|
|
|
.filter-btn.active {
|
|
background: var(--accent-blue-muted);
|
|
color: var(--accent-blue);
|
|
}
|
|
|
|
.toolbar-icon {
|
|
width: 32px;
|
|
height: 32px;
|
|
padding: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: var(--radius-md);
|
|
border: 1px solid var(--border-primary);
|
|
background: var(--bg-secondary);
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
|
|
}
|
|
|
|
.toolbar-icon:hover {
|
|
color: var(--text-primary);
|
|
background: var(--bg-hover);
|
|
}
|
|
|
|
/* Column visibility dropdown */
|
|
.column-visibility-dropdown {
|
|
position: relative;
|
|
display: inline-flex;
|
|
}
|
|
|
|
.column-visibility-menu {
|
|
display: none;
|
|
position: absolute;
|
|
top: 100%;
|
|
right: 0;
|
|
margin-top: 4px;
|
|
background: var(--bg-elevated, #2d333b);
|
|
border: 1px solid var(--border-primary);
|
|
border-radius: var(--radius-md);
|
|
padding: var(--space-xs);
|
|
z-index: 100;
|
|
min-width: 160px;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.column-visibility-menu.show {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.column-toggle {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
padding: 6px 8px;
|
|
border-radius: var(--radius-sm);
|
|
cursor: pointer;
|
|
font-size: var(--font-size-sm);
|
|
color: var(--text-secondary);
|
|
transition: background 0.15s;
|
|
user-select: none;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.column-toggle:hover {
|
|
background: var(--bg-hover);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.column-toggle input[type="checkbox"] {
|
|
width: 15px;
|
|
height: 15px;
|
|
accent-color: var(--accent-blue);
|
|
cursor: pointer;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.column-toggle span {
|
|
flex: 1;
|
|
}
|
|
|
|
/* ==================== Table ==================== */
|
|
|
|
.devices-table-container {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border-primary);
|
|
border-radius: var(--radius-lg, 12px);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.devices-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
.devices-table th {
|
|
padding: 8px 12px;
|
|
font-size: var(--font-size-xs, 0.75rem);
|
|
font-weight: var(--font-weight-semibold);
|
|
color: var(--text-secondary);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
background: var(--bg-tertiary);
|
|
text-align: left;
|
|
white-space: nowrap;
|
|
border-bottom: 1px solid var(--border-primary);
|
|
user-select: none;
|
|
}
|
|
|
|
.devices-table th.sortable {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.devices-table th.sortable:hover {
|
|
color: var(--text-primary);
|
|
background: var(--bg-hover);
|
|
}
|
|
|
|
.devices-table td {
|
|
padding: 6px 12px;
|
|
font-size: var(--font-size-sm, 0.875rem);
|
|
color: var(--text-primary);
|
|
border-bottom: 1px solid var(--border-primary);
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.devices-table tbody tr {
|
|
transition: background 0.1s ease;
|
|
cursor: default;
|
|
}
|
|
|
|
.devices-table tbody tr:hover {
|
|
background: var(--bg-hover, rgba(255, 255, 255, 0.03));
|
|
}
|
|
|
|
.devices-table tbody tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
/* Hidden columns */
|
|
th.column-hidden,
|
|
td.column-hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
/* ==================== Table Cell: ID ==================== */
|
|
|
|
.device-id {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.device-status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.device-status-dot.online {
|
|
background: var(--accent-green, #2ea44f);
|
|
box-shadow: 0 0 4px var(--accent-green);
|
|
}
|
|
|
|
.device-status-dot.offline {
|
|
background: var(--text-tertiary, #6e7681);
|
|
}
|
|
|
|
.device-status-dot.banned {
|
|
background: var(--accent-red, #f85149);
|
|
}
|
|
|
|
.device-id-text {
|
|
font-family: var(--font-mono);
|
|
font-weight: var(--font-weight-medium);
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.copy-btn {
|
|
padding: 2px;
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-tertiary);
|
|
cursor: pointer;
|
|
border-radius: var(--radius-sm);
|
|
display: inline-flex;
|
|
align-items: center;
|
|
opacity: 0;
|
|
transition: opacity 0.1s, color 0.1s;
|
|
}
|
|
|
|
.copy-btn .material-icons {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.device-id:hover .copy-btn {
|
|
opacity: 1;
|
|
}
|
|
|
|
.copy-btn:hover {
|
|
color: var(--accent-blue);
|
|
background: var(--accent-blue-muted);
|
|
}
|
|
|
|
/* ==================== Table Cell: Platform / Type ==================== */
|
|
|
|
.platform-icon {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
color: var(--text-secondary);
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.platform-icon .material-icons {
|
|
font-size: 16px;
|
|
}
|
|
|
|
/* ==================== Table Cell: Last Seen ==================== */
|
|
|
|
.last-seen-text {
|
|
color: var(--text-secondary);
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
/* ==================== Table Cell: Status Badge ==================== */
|
|
|
|
.status-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 2px 8px;
|
|
border-radius: var(--radius-full);
|
|
font-size: var(--font-size-xs);
|
|
font-weight: var(--font-weight-medium);
|
|
}
|
|
|
|
.status-badge.online {
|
|
background: var(--accent-green-muted);
|
|
color: var(--accent-green);
|
|
}
|
|
|
|
.status-badge.offline {
|
|
background: var(--bg-tertiary);
|
|
color: var(--text-tertiary);
|
|
}
|
|
|
|
.status-badge.banned {
|
|
background: var(--accent-red-muted);
|
|
color: var(--accent-red);
|
|
}
|
|
|
|
.status-badge .status-dot {
|
|
width: 6px;
|
|
height: 6px;
|
|
border-radius: 50%;
|
|
background: currentColor;
|
|
}
|
|
|
|
/* ==================== Table Cell: Kebab Menu ==================== */
|
|
|
|
.col-actions {
|
|
width: 40px;
|
|
text-align: center;
|
|
}
|
|
|
|
.kebab-wrapper {
|
|
position: relative;
|
|
display: inline-flex;
|
|
}
|
|
|
|
.kebab-btn {
|
|
padding: 4px;
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-tertiary);
|
|
cursor: pointer;
|
|
border-radius: var(--radius-sm);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: color 0.1s, background 0.1s;
|
|
}
|
|
|
|
.kebab-btn:hover {
|
|
color: var(--text-primary);
|
|
background: var(--bg-tertiary);
|
|
}
|
|
|
|
.kebab-btn .material-icons {
|
|
font-size: 20px;
|
|
}
|
|
|
|
.kebab-menu {
|
|
display: none;
|
|
position: fixed;
|
|
z-index: 9999;
|
|
min-width: 180px;
|
|
max-height: calc(100vh - 32px);
|
|
overflow-y: auto;
|
|
background: var(--bg-elevated, #2d333b);
|
|
border: 1px solid var(--border-primary);
|
|
border-radius: var(--radius-md, 8px);
|
|
padding: 4px 0;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
.kebab-menu.open {
|
|
display: block;
|
|
}
|
|
|
|
.kebab-menu-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 8px 12px;
|
|
font-size: var(--font-size-sm);
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
transition: background 0.1s;
|
|
border: none;
|
|
background: none;
|
|
width: 100%;
|
|
text-align: left;
|
|
font-family: inherit;
|
|
}
|
|
|
|
.kebab-menu-item:hover {
|
|
background: var(--bg-hover);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.kebab-menu-item .material-icons {
|
|
font-size: 18px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.kebab-menu-item.connect { color: var(--accent-green); }
|
|
.kebab-menu-item.connect:hover { background: rgba(34, 197, 94, 0.1); }
|
|
|
|
.kebab-menu-item.connect-desktop { color: var(--accent-purple, #a855f7); }
|
|
.kebab-menu-item.connect-desktop:hover { background: rgba(168, 85, 247, 0.1); }
|
|
|
|
.kebab-menu-item.info { color: var(--accent-blue); }
|
|
.kebab-menu-item.info:hover { background: rgba(59, 130, 246, 0.1); }
|
|
|
|
.kebab-menu-item.ban { color: var(--accent-orange); }
|
|
.kebab-menu-item.ban:hover { background: rgba(249, 115, 22, 0.1); }
|
|
|
|
.kebab-menu-item.unban { color: var(--accent-green); }
|
|
.kebab-menu-item.unban:hover { background: rgba(34, 197, 94, 0.1); }
|
|
|
|
.kebab-menu-item.danger { color: var(--accent-red); }
|
|
.kebab-menu-item.danger:hover { background: rgba(239, 68, 68, 0.1); }
|
|
|
|
.kebab-divider {
|
|
height: 1px;
|
|
background: var(--border-primary);
|
|
margin: 4px 0;
|
|
}
|
|
|
|
/* ==================== Banned Rows ==================== */
|
|
|
|
.banned-row {
|
|
background: rgba(239, 68, 68, 0.05) !important;
|
|
}
|
|
|
|
.banned-row:hover {
|
|
background: rgba(239, 68, 68, 0.08) !important;
|
|
}
|
|
|
|
.banned-row .device-id-text {
|
|
text-decoration: line-through;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
/* ==================== Draggable Rows ==================== */
|
|
|
|
.devices-table tbody tr[draggable="true"] {
|
|
cursor: grab;
|
|
}
|
|
|
|
.devices-table tbody tr.dragging {
|
|
opacity: 0.4;
|
|
}
|
|
|
|
/* ==================== Pagination ==================== */
|
|
|
|
.devices-pagination {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 8px 12px;
|
|
border-top: 1px solid var(--border-primary);
|
|
background: var(--bg-tertiary);
|
|
font-size: var(--font-size-xs);
|
|
}
|
|
|
|
.pagination-info {
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.pagination-controls {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
}
|
|
|
|
.pagination-btn {
|
|
padding: 4px 8px;
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border-primary);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-primary);
|
|
cursor: pointer;
|
|
font-size: var(--font-size-xs);
|
|
transition: background 0.1s, color 0.1s, border-color 0.1s;
|
|
min-width: 28px;
|
|
text-align: center;
|
|
}
|
|
|
|
.pagination-btn:hover:not(:disabled) {
|
|
background: var(--bg-elevated);
|
|
}
|
|
|
|
.pagination-btn:disabled {
|
|
opacity: 0.4;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.pagination-btn.active {
|
|
background: var(--accent-blue);
|
|
border-color: var(--accent-blue);
|
|
color: white;
|
|
}
|
|
|
|
.pagination-btn .material-icons {
|
|
font-size: 16px;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
/* ==================== Empty State ==================== */
|
|
|
|
.devices-empty {
|
|
text-align: center;
|
|
padding: var(--space-3xl);
|
|
}
|
|
|
|
.devices-empty-icon {
|
|
font-size: 56px;
|
|
color: var(--text-tertiary);
|
|
margin-bottom: var(--space-md);
|
|
}
|
|
|
|
.devices-empty-title {
|
|
font-size: var(--font-size-lg);
|
|
font-weight: var(--font-weight-semibold);
|
|
margin-bottom: var(--space-xs);
|
|
}
|
|
|
|
.devices-empty-text {
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* ==================== Folder Form Modal ==================== */
|
|
|
|
.folder-form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.folder-form .form-group {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.folder-form .form-group label {
|
|
font-size: var(--font-size-sm);
|
|
margin-bottom: var(--space-xs);
|
|
display: block;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.color-picker {
|
|
display: flex;
|
|
gap: var(--space-xs);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.color-option {
|
|
width: 28px;
|
|
height: 28px;
|
|
border-radius: 50%;
|
|
border: 2px solid transparent;
|
|
cursor: pointer;
|
|
transition: transform 0.15s, border-color 0.15s;
|
|
transform: scale(1);
|
|
flex-shrink: 0;
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
padding: 0;
|
|
}
|
|
|
|
.color-option:hover {
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.color-option.active {
|
|
border-color: var(--text-primary);
|
|
transform: scale(1.15);
|
|
}
|
|
|
|
/* ==================== Device Details Modal ==================== */
|
|
|
|
.device-details {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.detail-row {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
padding: var(--space-sm) 0;
|
|
border-bottom: 1px solid var(--border-primary);
|
|
}
|
|
|
|
.detail-row:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.detail-label {
|
|
flex: 0 0 140px;
|
|
color: var(--text-secondary);
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.detail-value {
|
|
flex: 1;
|
|
color: var(--text-primary);
|
|
word-break: break-word;
|
|
}
|
|
|
|
/* Device edit info grid */
|
|
.device-info-grid {
|
|
display: grid;
|
|
gap: var(--space-md);
|
|
}
|
|
|
|
.device-info-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: var(--space-sm);
|
|
background: var(--bg-tertiary);
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
.device-info-item label {
|
|
color: var(--text-secondary);
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.device-info-item span {
|
|
font-family: var(--font-mono);
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.device-info-item.full-width {
|
|
grid-column: 1 / -1;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.device-info-item .form-input {
|
|
width: 100%;
|
|
padding: var(--space-sm) var(--space-md);
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border-primary);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-primary);
|
|
font-size: var(--font-size-sm);
|
|
font-family: var(--font-sans);
|
|
transition: border-color 0.15s ease;
|
|
}
|
|
|
|
.device-info-item .form-input:focus {
|
|
outline: none;
|
|
border-color: var(--accent-blue);
|
|
}
|
|
|
|
.device-info-item textarea.form-input {
|
|
resize: vertical;
|
|
min-height: 48px;
|
|
}
|
|
|
|
/* ID change warning */
|
|
.id-change-warning {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: var(--space-sm);
|
|
padding: var(--space-md);
|
|
background: var(--accent-yellow-muted);
|
|
border: 1px solid var(--accent-yellow);
|
|
border-radius: var(--radius-md);
|
|
margin-bottom: var(--space-md);
|
|
color: var(--accent-yellow);
|
|
}
|
|
|
|
.id-change-warning .material-icons {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.id-change-warning p {
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
/* ==================== Bulk Actions ==================== */
|
|
|
|
.bulk-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 8px 12px;
|
|
background: var(--accent-blue-muted);
|
|
border-radius: var(--radius-md);
|
|
margin-bottom: var(--space-sm);
|
|
}
|
|
|
|
.bulk-actions-info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-md);
|
|
color: var(--accent-blue);
|
|
font-weight: var(--font-weight-medium);
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.bulk-actions-buttons {
|
|
display: flex;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.bulk-actions.hidden {
|
|
display: none;
|
|
}
|
|
|
|
/* ==================== RESPONSIVE: Tablet (<=1024px) ==================== */
|
|
|
|
@media (max-width: 1024px) {
|
|
.devices-table th[data-column="device_type"],
|
|
.devices-table td[data-column="device_type"] {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
/* ==================== RESPONSIVE: Small Tablet (<=768px) ==================== */
|
|
|
|
@media (max-width: 768px) {
|
|
.devices-header {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.devices-toolbar {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.toolbar-search {
|
|
min-width: 100%;
|
|
order: -1;
|
|
}
|
|
|
|
.toolbar-filters {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.devices-table th[data-column="platform"],
|
|
.devices-table td[data-column="platform"],
|
|
.devices-table th[data-column="last_online"],
|
|
.devices-table td[data-column="last_online"] {
|
|
display: none;
|
|
}
|
|
|
|
.devices-actions .btn-label {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
/* ==================== RESPONSIVE: Phone (<=600px) ==================== */
|
|
|
|
@media (max-width: 600px) {
|
|
.devices-page {
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.devices-title h1 {
|
|
font-size: var(--font-size-lg);
|
|
}
|
|
|
|
/* Card-style rows on phone */
|
|
.devices-table thead {
|
|
display: none;
|
|
}
|
|
|
|
.devices-table tbody {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
padding: 6px;
|
|
}
|
|
|
|
.devices-table tbody tr {
|
|
display: grid;
|
|
grid-template-columns: 1fr auto;
|
|
grid-template-rows: auto auto;
|
|
gap: 2px 8px;
|
|
padding: 10px 12px;
|
|
border: 1px solid var(--border-primary);
|
|
border-radius: var(--radius-md);
|
|
background: var(--bg-secondary);
|
|
}
|
|
|
|
.devices-table tbody tr td {
|
|
padding: 0;
|
|
border-bottom: none;
|
|
}
|
|
|
|
/* Row 1, Col 1: ID with status dot */
|
|
.devices-table td[data-column="id"] {
|
|
grid-column: 1;
|
|
grid-row: 1;
|
|
font-weight: var(--font-weight-semibold);
|
|
}
|
|
|
|
/* Row 1-2, Col 2: Kebab menu (spans both rows) */
|
|
.devices-table td[data-column="actions"] {
|
|
grid-column: 2;
|
|
grid-row: 1 / 3;
|
|
display: flex !important;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
/* Row 2, Col 1: Hostname */
|
|
.devices-table td[data-column="hostname"] {
|
|
grid-column: 1;
|
|
grid-row: 2;
|
|
color: var(--text-secondary);
|
|
font-size: var(--font-size-xs);
|
|
}
|
|
|
|
/* Hide non-essential columns on phone */
|
|
.devices-table td[data-column="device_type"],
|
|
.devices-table td[data-column="platform"],
|
|
.devices-table td[data-column="last_online"],
|
|
.devices-table td[data-column="status"] {
|
|
display: none;
|
|
}
|
|
|
|
/* Larger touch target for kebab */
|
|
.kebab-btn {
|
|
padding: 8px;
|
|
}
|
|
|
|
.kebab-btn .material-icons {
|
|
font-size: 24px;
|
|
}
|
|
|
|
/* Mobile bottom sheet for kebab menu */
|
|
.kebab-menu {
|
|
position: fixed;
|
|
top: auto;
|
|
right: 16px;
|
|
bottom: 16px;
|
|
left: 16px;
|
|
min-width: auto;
|
|
border-radius: var(--radius-lg);
|
|
max-height: 60vh;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.kebab-menu-item {
|
|
padding: 12px 16px;
|
|
font-size: var(--font-size-md, 1rem);
|
|
}
|
|
|
|
.kebab-menu-item .material-icons {
|
|
font-size: 22px;
|
|
}
|
|
|
|
/* Overlay backdrop for mobile bottom sheet */
|
|
.kebab-overlay {
|
|
display: none;
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
z-index: 199;
|
|
}
|
|
|
|
.kebab-overlay.open {
|
|
display: block;
|
|
}
|
|
|
|
/* Compact pagination */
|
|
.devices-pagination {
|
|
flex-wrap: wrap;
|
|
gap: 4px;
|
|
justify-content: center;
|
|
}
|
|
|
|
.pagination-info {
|
|
width: 100%;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Banned card styling */
|
|
.banned-row {
|
|
border-color: var(--accent-red) !important;
|
|
border-left: 3px solid var(--accent-red) !important;
|
|
}
|
|
|
|
/* Folder chips scroll hint */
|
|
.folders-bar {
|
|
position: relative;
|
|
}
|
|
|
|
.folders-bar::after {
|
|
content: '';
|
|
position: absolute;
|
|
right: 40px;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 24px;
|
|
background: linear-gradient(to right, transparent, var(--bg-primary, #0d1117));
|
|
pointer-events: none;
|
|
}
|
|
}
|
|
|
|
/* ==================== RESPONSIVE: Small Phone (<=400px) ==================== */
|
|
|
|
@media (max-width: 400px) {
|
|
/* Show only icons for folder chips (except All and Unassigned) */
|
|
.folder-chip .chip-label {
|
|
display: none;
|
|
}
|
|
|
|
.folder-chip[data-folder="all"] .chip-label,
|
|
.folder-chip[data-folder="unassigned"] .chip-label {
|
|
display: inline;
|
|
}
|
|
|
|
.filter-btn {
|
|
padding: 4px 6px;
|
|
font-size: 10px;
|
|
}
|
|
|
|
.devices-table tbody tr {
|
|
padding: 8px 10px;
|
|
}
|
|
}
|
|
|
|
/* ==================== Delete Confirmation Modal ==================== */
|
|
|
|
.delete-confirm-modal {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.7);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 10000;
|
|
animation: fadeIn 0.2s ease;
|
|
}
|
|
|
|
.delete-confirm-modal .modal-container {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--accent-red);
|
|
border-radius: var(--radius-lg);
|
|
max-width: 450px;
|
|
width: 90%;
|
|
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
|
|
animation: slideUp 0.3s ease;
|
|
}
|
|
|
|
.delete-confirm-modal .modal-header {
|
|
padding: var(--space-lg);
|
|
border-bottom: 1px solid var(--border-primary);
|
|
}
|
|
|
|
.delete-confirm-modal .modal-title {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
font-size: var(--font-size-lg);
|
|
color: var(--accent-red);
|
|
margin: 0;
|
|
}
|
|
|
|
.delete-confirm-modal .modal-body {
|
|
padding: var(--space-lg);
|
|
text-align: center;
|
|
}
|
|
|
|
.delete-confirm-modal .delete-warning {
|
|
font-size: var(--font-size-md);
|
|
color: var(--text-primary);
|
|
margin-bottom: var(--space-md);
|
|
}
|
|
|
|
.delete-confirm-modal .delete-device-id {
|
|
font-size: var(--font-size-xl);
|
|
font-family: var(--font-mono);
|
|
color: var(--accent-red);
|
|
padding: var(--space-md);
|
|
background: rgba(239, 68, 68, 0.1);
|
|
border-radius: var(--radius-md);
|
|
margin-bottom: var(--space-md);
|
|
}
|
|
|
|
.delete-confirm-modal .delete-info {
|
|
font-size: var(--font-size-sm);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.delete-confirm-modal .modal-footer {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: var(--space-sm);
|
|
padding: var(--space-lg);
|
|
border-top: 1px solid var(--border-primary);
|
|
background: var(--bg-tertiary);
|
|
}
|
|
|
|
.delete-confirm-modal .confirm-delete-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.delete-confirm-modal .confirm-delete-btn:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.delete-confirm-modal .countdown {
|
|
font-weight: var(--font-weight-bold);
|
|
}
|
|
|
|
/* ==================== Animations ==================== */
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; }
|
|
to { opacity: 1; }
|
|
}
|
|
|
|
@keyframes slideUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20px) scale(0.95);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0) scale(1);
|
|
}
|
|
}
|
|
|
|
/* ============ Access Policy Modal ============ */
|
|
|
|
.access-policy-form .form-section {
|
|
margin-bottom: 20px;
|
|
padding-bottom: 16px;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
|
}
|
|
|
|
.access-policy-form .form-section:last-child {
|
|
border-bottom: none;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.access-policy-form .form-section h4 {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--text-primary, #e6edf3);
|
|
margin: 0 0 12px 0;
|
|
}
|
|
|
|
.access-policy-form .form-section h4 .material-icons {
|
|
font-size: 18px;
|
|
color: var(--accent, #58a6ff);
|
|
}
|
|
|
|
.access-policy-form .toggle-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
cursor: pointer;
|
|
padding: 6px 0;
|
|
font-size: 13px;
|
|
color: var(--text-secondary, #8b949e);
|
|
}
|
|
|
|
.access-policy-form .toggle-row input[type="checkbox"] {
|
|
width: 16px;
|
|
height: 16px;
|
|
accent-color: var(--accent, #58a6ff);
|
|
}
|
|
|
|
.access-policy-form .form-row {
|
|
margin: 10px 0;
|
|
}
|
|
|
|
.access-policy-form .form-row label {
|
|
display: block;
|
|
font-size: 12px;
|
|
color: var(--text-secondary, #8b949e);
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.access-policy-form .form-row-inline {
|
|
display: flex;
|
|
gap: 12px;
|
|
}
|
|
|
|
.access-policy-form .form-row-inline > div {
|
|
flex: 1;
|
|
}
|
|
|
|
.access-policy-form .form-input {
|
|
width: 100%;
|
|
padding: 8px 12px;
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
border-radius: 6px;
|
|
background: rgba(255, 255, 255, 0.04);
|
|
color: var(--text-primary, #e6edf3);
|
|
font-size: 13px;
|
|
outline: none;
|
|
transition: border-color 0.15s;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.access-policy-form .form-input:focus {
|
|
border-color: var(--accent, #58a6ff);
|
|
}
|
|
|
|
.access-policy-form .form-hint {
|
|
font-size: 11px;
|
|
color: var(--text-muted, #6e7681);
|
|
margin: 4px 0 0;
|
|
}
|
|
|
|
.access-policy-form .form-meta {
|
|
font-size: 11px;
|
|
color: var(--text-muted, #6e7681);
|
|
margin-top: 12px;
|
|
text-align: right;
|
|
}
|
|
|
|
.access-policy-form .day-checkboxes {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
}
|
|
|
|
.access-policy-form .day-checkbox {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 4px 10px;
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
border-radius: 14px;
|
|
font-size: 12px;
|
|
color: var(--text-secondary, #8b949e);
|
|
cursor: pointer;
|
|
transition: background 0.12s, border-color 0.12s;
|
|
}
|
|
|
|
.access-policy-form .day-checkbox:has(input:checked) {
|
|
background: rgba(88, 166, 255, 0.12);
|
|
border-color: rgba(88, 166, 255, 0.4);
|
|
color: var(--text-primary, #e6edf3);
|
|
}
|
|
|
|
.access-policy-form .day-checkbox input {
|
|
width: 14px;
|
|
height: 14px;
|
|
accent-color: var(--accent, #58a6ff);
|
|
}
|
|
|
|
.access-policy-form .badge {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
border-radius: 10px;
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.access-policy-form .badge-success {
|
|
background: rgba(63, 185, 80, 0.15);
|
|
color: #3fb950;
|
|
}
|
|
|
|
.access-policy-form .badge-warning {
|
|
background: rgba(210, 153, 34, 0.15);
|
|
color: #d29922;
|
|
}
|