Major feature expansion for luci-app-bandwidth-manager: - Device Profiles: Gaming, Streaming, IoT, Work, Kids presets with custom QoS settings, bandwidth limits, and latency modes - Parental Controls: Quick preset modes (Bedtime, Homework, Family Time), access schedules, content filtering categories - Bandwidth Alerts: Threshold monitoring (80/90/100%), new device alerts, email/SMS notifications with configurable settings - Traffic Graphs: Real-time bandwidth charts, historical data visualization, top talkers list, protocol breakdown pie charts - Time Schedules: Full CRUD with day selection, limits, priority settings Backend additions: - ~30 new RPCD methods for all features - Alert monitoring cron job (every 5 minutes) - Shared alerts.sh library for email/SMS Frontend views: - profiles.js, parental-controls.js, alerts.js, traffic-graphs.js - Shared graphs.js utility for canvas drawing - parental.css for parental controls styling Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
670 lines
11 KiB
CSS
670 lines
11 KiB
CSS
/* SecuBox Parental Controls Styles
|
|
* Version: 1.0.0
|
|
*/
|
|
|
|
/* Preset Mode Cards */
|
|
.preset-modes-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
gap: 16px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.preset-mode-card {
|
|
background: var(--bw-light, #15151a);
|
|
border: 2px solid var(--bw-border, #25252f);
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.preset-mode-card:hover {
|
|
border-color: var(--bw-primary, #8b5cf6);
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
|
|
}
|
|
|
|
.preset-mode-card.active {
|
|
border-color: #10b981;
|
|
background: rgba(16, 185, 129, 0.1);
|
|
}
|
|
|
|
.preset-mode-card.active::after {
|
|
content: "✓";
|
|
position: absolute;
|
|
top: 8px;
|
|
right: 8px;
|
|
width: 24px;
|
|
height: 24px;
|
|
background: #10b981;
|
|
border-radius: 50%;
|
|
color: white;
|
|
font-size: 14px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.preset-mode-icon {
|
|
font-size: 48px;
|
|
margin-bottom: 12px;
|
|
display: block;
|
|
}
|
|
|
|
.preset-mode-name {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.preset-mode-desc {
|
|
font-size: 12px;
|
|
color: #999;
|
|
}
|
|
|
|
/* Weekly Schedule Grid */
|
|
.schedule-grid-container {
|
|
background: var(--bw-light, #15151a);
|
|
border: 1px solid var(--bw-border, #25252f);
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
margin-bottom: 24px;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.schedule-grid {
|
|
display: grid;
|
|
grid-template-columns: 80px repeat(7, 1fr);
|
|
gap: 2px;
|
|
min-width: 600px;
|
|
}
|
|
|
|
.schedule-grid-header {
|
|
background: var(--bw-dark, #0a0a0f);
|
|
padding: 12px 8px;
|
|
text-align: center;
|
|
font-weight: 600;
|
|
font-size: 12px;
|
|
color: #999;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.schedule-grid-time {
|
|
background: var(--bw-dark, #0a0a0f);
|
|
padding: 8px;
|
|
text-align: right;
|
|
font-size: 11px;
|
|
color: #666;
|
|
font-family: monospace;
|
|
}
|
|
|
|
.schedule-grid-cell {
|
|
background: var(--bw-dark, #0a0a0f);
|
|
padding: 4px;
|
|
min-height: 24px;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.schedule-grid-cell:hover {
|
|
background: rgba(139, 92, 246, 0.2);
|
|
}
|
|
|
|
.schedule-grid-cell.blocked {
|
|
background: rgba(244, 63, 94, 0.3);
|
|
}
|
|
|
|
.schedule-grid-cell.allowed {
|
|
background: rgba(16, 185, 129, 0.3);
|
|
}
|
|
|
|
.schedule-grid-cell.limited {
|
|
background: rgba(245, 158, 11, 0.3);
|
|
}
|
|
|
|
/* Schedule List */
|
|
.parental-schedule-list {
|
|
display: grid;
|
|
gap: 12px;
|
|
}
|
|
|
|
.parental-schedule-item {
|
|
background: var(--bw-light, #15151a);
|
|
border: 1px solid var(--bw-border, #25252f);
|
|
border-radius: 8px;
|
|
padding: 16px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
transition: border-color 0.2s;
|
|
}
|
|
|
|
.parental-schedule-item:hover {
|
|
border-color: var(--bw-primary, #8b5cf6);
|
|
}
|
|
|
|
.parental-schedule-item.disabled {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.schedule-info {
|
|
flex: 1;
|
|
}
|
|
|
|
.schedule-name {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
margin-bottom: 4px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.schedule-name .action-badge {
|
|
font-size: 11px;
|
|
padding: 2px 8px;
|
|
border-radius: 10px;
|
|
text-transform: uppercase;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.schedule-name .action-badge.block {
|
|
background: rgba(244, 63, 94, 0.2);
|
|
color: #f43f5e;
|
|
}
|
|
|
|
.schedule-name .action-badge.allow {
|
|
background: rgba(16, 185, 129, 0.2);
|
|
color: #10b981;
|
|
}
|
|
|
|
.schedule-name .action-badge.limit {
|
|
background: rgba(245, 158, 11, 0.2);
|
|
color: #f59e0b;
|
|
}
|
|
|
|
.schedule-time-range {
|
|
font-size: 13px;
|
|
color: #06b6d4;
|
|
font-family: monospace;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.schedule-target {
|
|
font-size: 12px;
|
|
color: #999;
|
|
}
|
|
|
|
.schedule-days-display {
|
|
display: flex;
|
|
gap: 4px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.day-indicator {
|
|
width: 28px;
|
|
height: 28px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
background: var(--bw-dark, #0a0a0f);
|
|
color: #666;
|
|
border: 1px solid var(--bw-border, #25252f);
|
|
}
|
|
|
|
.day-indicator.active {
|
|
background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
|
|
color: white;
|
|
border-color: transparent;
|
|
}
|
|
|
|
.schedule-toggle {
|
|
margin-left: 16px;
|
|
}
|
|
|
|
/* Content Filter Categories */
|
|
.filter-categories {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 12px;
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.filter-category {
|
|
background: var(--bw-light, #15151a);
|
|
border: 1px solid var(--bw-border, #25252f);
|
|
border-radius: 8px;
|
|
padding: 12px 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.filter-category:hover {
|
|
border-color: var(--bw-primary, #8b5cf6);
|
|
}
|
|
|
|
.filter-category.blocked {
|
|
border-color: #f43f5e;
|
|
background: rgba(244, 63, 94, 0.1);
|
|
}
|
|
|
|
.filter-category-icon {
|
|
font-size: 24px;
|
|
width: 40px;
|
|
height: 40px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--bw-dark, #0a0a0f);
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.filter-category-info {
|
|
flex: 1;
|
|
}
|
|
|
|
.filter-category-name {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
}
|
|
|
|
.filter-category-desc {
|
|
font-size: 11px;
|
|
color: #666;
|
|
}
|
|
|
|
.filter-category-toggle {
|
|
color: #666;
|
|
}
|
|
|
|
.filter-category.blocked .filter-category-toggle {
|
|
color: #f43f5e;
|
|
}
|
|
|
|
/* Device/Group Selection */
|
|
.target-selector {
|
|
display: flex;
|
|
gap: 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.target-type-btn {
|
|
flex: 1;
|
|
padding: 12px;
|
|
background: var(--bw-light, #15151a);
|
|
border: 2px solid var(--bw-border, #25252f);
|
|
border-radius: 8px;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
color: #999;
|
|
}
|
|
|
|
.target-type-btn:hover {
|
|
border-color: var(--bw-primary, #8b5cf6);
|
|
}
|
|
|
|
.target-type-btn.active {
|
|
border-color: var(--bw-primary, #8b5cf6);
|
|
background: rgba(139, 92, 246, 0.1);
|
|
color: #fff;
|
|
}
|
|
|
|
.target-type-btn i {
|
|
font-size: 24px;
|
|
margin-bottom: 8px;
|
|
display: block;
|
|
}
|
|
|
|
/* Day Selector */
|
|
.day-selector {
|
|
display: flex;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.day-selector-btn {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
background: var(--bw-dark, #0a0a0f);
|
|
color: #666;
|
|
border: 2px solid var(--bw-border, #25252f);
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.day-selector-btn:hover {
|
|
border-color: var(--bw-primary, #8b5cf6);
|
|
}
|
|
|
|
.day-selector-btn.selected {
|
|
background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
|
|
color: white;
|
|
border-color: transparent;
|
|
}
|
|
|
|
/* Time Picker */
|
|
.time-picker-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
}
|
|
|
|
.time-picker {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.time-picker label {
|
|
font-size: 13px;
|
|
color: #999;
|
|
min-width: 40px;
|
|
}
|
|
|
|
.time-picker input[type="time"] {
|
|
background: var(--bw-dark, #0a0a0f);
|
|
border: 1px solid var(--bw-border, #25252f);
|
|
border-radius: 6px;
|
|
padding: 8px 12px;
|
|
color: #fff;
|
|
font-size: 14px;
|
|
font-family: monospace;
|
|
}
|
|
|
|
.time-picker input[type="time"]:focus {
|
|
border-color: var(--bw-primary, #8b5cf6);
|
|
outline: none;
|
|
}
|
|
|
|
/* Quick Time Presets */
|
|
.time-presets {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-top: 12px;
|
|
}
|
|
|
|
.time-preset-btn {
|
|
padding: 6px 12px;
|
|
background: var(--bw-dark, #0a0a0f);
|
|
border: 1px solid var(--bw-border, #25252f);
|
|
border-radius: 16px;
|
|
color: #999;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.time-preset-btn:hover {
|
|
border-color: var(--bw-primary, #8b5cf6);
|
|
color: #fff;
|
|
}
|
|
|
|
/* Modal Styles */
|
|
.parental-modal-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0, 0, 0, 0.7);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 1000;
|
|
backdrop-filter: blur(4px);
|
|
}
|
|
|
|
.parental-modal {
|
|
background: var(--bw-dark, #0a0a0f);
|
|
border: 1px solid var(--bw-border, #25252f);
|
|
border-radius: 12px;
|
|
width: 90%;
|
|
max-width: 600px;
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.parental-modal-header {
|
|
padding: 20px;
|
|
border-bottom: 1px solid var(--bw-border, #25252f);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.parental-modal-title {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
}
|
|
|
|
.parental-modal-close {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--bw-light, #15151a);
|
|
color: #999;
|
|
cursor: pointer;
|
|
border: none;
|
|
font-size: 18px;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.parental-modal-close:hover {
|
|
background: var(--bw-border, #25252f);
|
|
color: #fff;
|
|
}
|
|
|
|
.parental-modal-body {
|
|
padding: 20px;
|
|
}
|
|
|
|
.parental-modal-footer {
|
|
padding: 16px 20px;
|
|
border-top: 1px solid var(--bw-border, #25252f);
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 12px;
|
|
}
|
|
|
|
/* Form Groups */
|
|
.parental-form-group {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.parental-form-label {
|
|
display: block;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: #999;
|
|
margin-bottom: 8px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.parental-form-input {
|
|
width: 100%;
|
|
background: var(--bw-light, #15151a);
|
|
border: 1px solid var(--bw-border, #25252f);
|
|
border-radius: 6px;
|
|
padding: 10px 14px;
|
|
color: #fff;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.parental-form-input:focus {
|
|
border-color: var(--bw-primary, #8b5cf6);
|
|
outline: none;
|
|
}
|
|
|
|
.parental-form-select {
|
|
width: 100%;
|
|
background: var(--bw-light, #15151a);
|
|
border: 1px solid var(--bw-border, #25252f);
|
|
border-radius: 6px;
|
|
padding: 10px 14px;
|
|
color: #fff;
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.parental-form-select:focus {
|
|
border-color: var(--bw-primary, #8b5cf6);
|
|
outline: none;
|
|
}
|
|
|
|
/* Action Selector */
|
|
.action-selector {
|
|
display: flex;
|
|
gap: 12px;
|
|
}
|
|
|
|
.action-selector-btn {
|
|
flex: 1;
|
|
padding: 12px;
|
|
background: var(--bw-light, #15151a);
|
|
border: 2px solid var(--bw-border, #25252f);
|
|
border-radius: 8px;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.action-selector-btn:hover {
|
|
border-color: var(--bw-primary, #8b5cf6);
|
|
}
|
|
|
|
.action-selector-btn.selected.block {
|
|
border-color: #f43f5e;
|
|
background: rgba(244, 63, 94, 0.1);
|
|
}
|
|
|
|
.action-selector-btn.selected.allow {
|
|
border-color: #10b981;
|
|
background: rgba(16, 185, 129, 0.1);
|
|
}
|
|
|
|
.action-selector-btn.selected.limit {
|
|
border-color: #f59e0b;
|
|
background: rgba(245, 158, 11, 0.1);
|
|
}
|
|
|
|
.action-selector-btn i {
|
|
font-size: 24px;
|
|
margin-bottom: 8px;
|
|
display: block;
|
|
}
|
|
|
|
.action-selector-btn span {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: #999;
|
|
}
|
|
|
|
.action-selector-btn.selected span {
|
|
color: #fff;
|
|
}
|
|
|
|
/* Empty State */
|
|
.parental-empty {
|
|
text-align: center;
|
|
padding: 48px 24px;
|
|
color: #666;
|
|
}
|
|
|
|
.parental-empty-icon {
|
|
font-size: 64px;
|
|
margin-bottom: 16px;
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.parental-empty-text {
|
|
font-size: 16px;
|
|
margin-bottom: 8px;
|
|
color: #999;
|
|
}
|
|
|
|
.parental-empty-hint {
|
|
font-size: 13px;
|
|
color: #666;
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 768px) {
|
|
.preset-modes-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
.schedule-grid-container {
|
|
padding: 12px;
|
|
}
|
|
|
|
.filter-categories {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.target-selector {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.time-picker-group {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.day-selector {
|
|
justify-content: center;
|
|
}
|
|
|
|
.parental-modal {
|
|
width: 95%;
|
|
margin: 16px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.preset-modes-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.day-selector-btn {
|
|
width: 40px;
|
|
height: 40px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.parental-schedule-item {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 12px;
|
|
}
|
|
|
|
.schedule-toggle {
|
|
margin-left: 0;
|
|
align-self: flex-end;
|
|
}
|
|
}
|