Phase 6: schedules, blocklists, allowlists (editors + effective state)
- Weekly schedule editor per device: a Monday-Sunday grid of blocking windows, including windows that cross midnight. - Blocklist/allowlist editor per device: app (Android package / Windows process) and site (hostname) entries, tagged by the device platform. - Effective desired state: a manual lock, an active schedule window, or neither. While blocked the allowlist is honoured (Spotify stays while other apps are blocked). Published retained with reason schedule/manual. - Boundary-aware republish loop so a window turns on and off on time, and manual lock expiry is cleared promptly. - CONTROL_TIMEZONE (default Australia/Sydney) with embedded tzdata, so wall-clock windows are evaluated in the family zone, not the container. - Every change is written to the append-only audit log (FR-15). Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -464,6 +464,88 @@ a.button-primary:hover { text-decoration: none; }
|
||||
.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }
|
||||
a.button-utility { text-decoration: none; }
|
||||
|
||||
/* ---------- Weekly schedule editor (Phase 6) ---------- */
|
||||
|
||||
.visually-hidden {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0 0 0 0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.schedule-note {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--hairline);
|
||||
border-radius: var(--rounded-lg);
|
||||
padding: var(--space-md) var(--space-lg);
|
||||
display: grid;
|
||||
gap: var(--space-xs);
|
||||
}
|
||||
.schedule-note__now { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--ink); font: var(--type-body-md); }
|
||||
.schedule-note__next { margin: 0; color: var(--ink-muted); font: var(--type-body-sm); }
|
||||
.schedule-note__hint { margin: 0; color: var(--ink-muted); font: var(--type-body-sm); max-width: 70ch; }
|
||||
|
||||
.schedule-scroll { overflow-x: auto; }
|
||||
.schedule-grid {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
min-width: 520px;
|
||||
}
|
||||
.schedule-grid th,
|
||||
.schedule-grid td {
|
||||
text-align: left;
|
||||
padding: var(--space-xs) var(--space-sm);
|
||||
border-bottom: 1px solid var(--hairline);
|
||||
vertical-align: middle;
|
||||
}
|
||||
.schedule-grid thead th {
|
||||
font: var(--type-eyebrow);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
color: var(--ink-muted);
|
||||
}
|
||||
.schedule-grid tbody th { font: var(--type-body-md); color: var(--ink); white-space: nowrap; }
|
||||
.schedule-grid__slot { white-space: nowrap; }
|
||||
.schedule-grid__dash { padding: 0 6px; color: var(--ink-faint); }
|
||||
.time-input { width: auto; min-width: 120px; display: inline-block; }
|
||||
|
||||
/* ---------- Blocklist / allowlist editor (Phase 6) ---------- */
|
||||
|
||||
.list-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
||||
gap: var(--space-md);
|
||||
align-items: start;
|
||||
}
|
||||
.list-panel { display: grid; gap: var(--space-sm); }
|
||||
.list-panel__sub { margin: 0; color: var(--ink-muted); font: var(--type-body-sm); }
|
||||
.list-add { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
|
||||
.list-add .text-input { flex: 1 1 160px; min-width: 0; }
|
||||
.list-entries { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-xs); }
|
||||
.list-entry {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: var(--space-xs) var(--space-sm);
|
||||
padding: var(--space-xs) 0;
|
||||
border-top: 1px solid var(--hairline);
|
||||
}
|
||||
.list-entry--empty { color: var(--ink-muted); font-style: italic; border-top: 0; }
|
||||
.list-entry__kind {
|
||||
padding: 2px 8px;
|
||||
border-radius: var(--rounded-full);
|
||||
background: var(--surface-2);
|
||||
color: var(--ink-muted);
|
||||
font: var(--type-eyebrow);
|
||||
}
|
||||
.list-entry__value { flex: 1 1 auto; word-break: break-all; }
|
||||
.list-entry__remove { margin: 0; }
|
||||
|
||||
/* ---------- Responsive ---------- */
|
||||
|
||||
@media (max-width: 760px) {
|
||||
@@ -474,4 +556,5 @@ a.button-utility { text-decoration: none; }
|
||||
.nav-bar__user { display: none; }
|
||||
.section__head { flex-wrap: wrap; }
|
||||
.audit-item__meta { margin-left: 0; width: 100%; }
|
||||
.list-add .button-primary { flex: 1 1 auto; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user