secubox-openwrt/luci-app-system-hub/htdocs/luci-static/resources/system-hub/components.css
CyberMind-FR 801601591c release: v0.1.2-alpha - Dynamic Module Detection & Responsive Cards
Major Features:
• SecuBox v0.1.2: Real-time module auto-detection via opkg
• System Hub: Dynamic component detection leveraging SecuBox
• Responsive card grid layout for modules and components
• Category filtering tabs (All/Security/Monitoring/Network/System)
• Auto-refresh every 30 seconds with real-time status

SecuBox Changes:
• Added detect_real_modules() function to scan opkg for installed packages
• Enhanced get_modules() with dual-source detection (UCI + auto-detected)
• Enhanced get_modules_by_category() with same dual-source logic
• Auto-categorization based on package name patterns
• Real version detection from opkg for installed packages
• Added in_uci flag to distinguish module sources
• Responsive modules.js with card-based layout
• New modules.css with theme support and animations

System Hub Changes:
• Added get_components() and get_components_by_category() to RPCD
• Components leverage SecuBox module detection via ubus
• Completely rewritten components.js with responsive cards
• New components.css matching SecuBox design language
• Extended API with getComponents() methods
• Unified component management with quick actions

Deployment:
• Added deploy-secubox-v0.1.2.sh for SecuBox deployment
• Added deploy-system-hub-dynamic.sh for System Hub deployment
• Added deploy-dynamic-modules.sh for combined deployment

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 17:06:00 +01:00

337 lines
6.1 KiB
CSS

/**
* System Hub - Components Page Styles
* Responsive card layout with theme support
* Version: 0.1.2
*/
/* === Header & Filters === */
.sh-components-header {
margin-bottom: 24px;
}
.sh-page-title {
font-size: 28px;
font-weight: 700;
margin: 0 0 20px 0;
color: var(--sh-text-primary, #1e293b);
display: flex;
align-items: center;
gap: 12px;
}
.sh-title-icon {
font-size: 32px;
line-height: 1;
}
.sh-filter-tabs {
display: flex;
gap: 12px;
flex-wrap: wrap;
background: var(--sh-bg-secondary, #f8fafc);
padding: 12px;
border-radius: 12px;
border: 1px solid var(--sh-border, #e2e8f0);
}
.sh-filter-tab {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 20px;
background: var(--sh-bg-card, #ffffff);
border: 2px solid transparent;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s ease;
font-size: 14px;
font-weight: 600;
color: var(--sh-text-secondary, #64748b);
}
.sh-filter-tab:hover {
background: var(--sh-hover-bg, #f1f5f9);
border-color: var(--sh-primary, #6366f1);
transform: translateY(-2px);
}
.sh-filter-tab.active {
background: var(--sh-primary, #6366f1);
color: #ffffff;
border-color: var(--sh-primary, #6366f1);
}
.sh-tab-icon {
font-size: 18px;
line-height: 1;
}
.sh-tab-label {
white-space: nowrap;
}
/* === Components Grid === */
.sh-components-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
gap: 20px;
margin-top: 24px;
}
@media (max-width: 768px) {
.sh-components-grid {
grid-template-columns: 1fr;
}
}
/* === Component Card === */
.sh-component-card {
background: var(--sh-bg-card, #ffffff);
border-radius: 12px;
border: 1px solid var(--sh-border, #e2e8f0);
overflow: hidden;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
}
.sh-component-card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 24px var(--sh-hover-shadow, rgba(0, 0, 0, 0.12));
}
.sh-component-card-header {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 20px;
background: var(--sh-bg-secondary, #f8fafc);
border-bottom: 1px solid var(--sh-border, #e2e8f0);
}
.sh-component-icon {
font-size: 36px;
line-height: 1;
flex-shrink: 0;
}
.sh-component-info {
flex: 1;
min-width: 0;
}
.sh-component-name {
font-size: 18px;
font-weight: 700;
margin: 0 0 8px 0;
color: var(--sh-text-primary, #1e293b);
}
.sh-component-meta {
display: flex;
gap: 12px;
flex-wrap: wrap;
font-size: 13px;
}
.sh-component-version,
.sh-component-category {
padding: 4px 10px;
border-radius: 6px;
font-weight: 600;
}
.sh-component-version {
background: var(--sh-primary, #6366f1);
color: #ffffff;
}
.sh-component-category {
background: var(--sh-bg-tertiary, #f1f5f9);
color: var(--sh-text-secondary, #64748b);
text-transform: capitalize;
}
/* === Status Indicator === */
.sh-status-indicator {
width: 14px;
height: 14px;
border-radius: 50%;
flex-shrink: 0;
margin-top: 4px;
}
.sh-status-running {
background: #22c55e;
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.sh-status-stopped {
background: #f59e0b;
}
.sh-status-not-installed {
background: #94a3b8;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
/* === Component Card Body === */
.sh-component-card-body {
padding: 16px 20px;
}
.sh-component-description {
margin: 0;
font-size: 14px;
line-height: 1.6;
color: var(--sh-text-secondary, #64748b);
}
/* === Component Actions === */
.sh-component-card-actions {
display: flex;
gap: 10px;
padding: 16px 20px;
background: var(--sh-bg-secondary, #f8fafc);
border-top: 1px solid var(--sh-border, #e2e8f0);
flex-wrap: wrap;
}
.sh-action-btn {
flex: 1;
min-width: fit-content;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
padding: 8px 16px;
border-radius: 8px;
font-size: 14px;
font-weight: 600;
text-decoration: none;
border: none;
cursor: pointer;
transition: all 0.2s ease;
}
.sh-btn-success {
background: #22c55e;
color: #ffffff;
}
.sh-btn-success:hover {
background: #16a34a;
transform: translateY(-2px);
}
.sh-btn-danger {
background: #ef4444;
color: #ffffff;
}
.sh-btn-danger:hover {
background: #dc2626;
transform: translateY(-2px);
}
.sh-btn-warning {
background: #f59e0b;
color: #ffffff;
}
.sh-btn-warning:hover {
background: #d97706;
transform: translateY(-2px);
}
.sh-btn-primary {
background: var(--sh-primary, #6366f1);
color: #ffffff;
}
.sh-btn-primary:hover {
background: #4f46e5;
transform: translateY(-2px);
text-decoration: none;
}
.sh-btn-secondary {
background: var(--sh-bg-tertiary, #f1f5f9);
color: var(--sh-text-secondary, #64748b);
cursor: not-allowed;
opacity: 0.6;
}
/* === Empty State === */
.sh-empty-state {
grid-column: 1 / -1;
text-align: center;
padding: 60px 20px;
background: var(--sh-bg-secondary, #f8fafc);
border-radius: 12px;
border: 2px dashed var(--sh-border, #e2e8f0);
}
.sh-empty-icon {
font-size: 64px;
margin-bottom: 16px;
opacity: 0.5;
}
.sh-empty-text {
font-size: 16px;
color: var(--sh-text-secondary, #64748b);
font-weight: 600;
}
/* === Dark Mode Support === */
[data-theme="dark"] {
--sh-text-primary: #f1f5f9;
--sh-text-secondary: #cbd5e1;
--sh-bg-primary: #0f172a;
--sh-bg-secondary: #1e293b;
--sh-bg-tertiary: #334155;
--sh-bg-card: #1e293b;
--sh-border: #334155;
--sh-hover-bg: #334155;
--sh-hover-shadow: rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .sh-component-card {
background: var(--sh-bg-card);
border-color: var(--sh-border);
}
[data-theme="dark"] .sh-component-card-header,
[data-theme="dark"] .sh-component-card-actions {
background: var(--sh-bg-tertiary);
border-color: var(--sh-border);
}
[data-theme="dark"] .sh-filter-tabs {
background: var(--sh-bg-secondary);
border-color: var(--sh-border);
}
[data-theme="dark"] .sh-filter-tab {
background: var(--sh-bg-tertiary);
color: var(--sh-text-secondary);
}
[data-theme="dark"] .sh-filter-tab:hover {
background: var(--sh-hover-bg);
}
[data-theme="dark"] .sh-component-category {
background: var(--sh-bg-tertiary);
color: var(--sh-text-secondary);
}
[data-theme="dark"] .sh-empty-state {
background: var(--sh-bg-secondary);
border-color: var(--sh-border);
}