Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / parentalcontrols / src / main / java / com / vayunmathur / parentalcontrols / Route.kt
Route.kt54 lines · 1.7 KiBRaw
| 1 | package com.vayunmathur.parentalcontrols |
| 2 | |
| 3 | import com.vayunmathur.library.util.NavKey |
| 4 | import com.vayunmathur.parentalcontrols.domain.PinGateTarget |
| 5 | import kotlinx.serialization.Serializable |
| 6 | |
| 7 | @Serializable |
| 8 | /** Navigation destinations for Parental Controls. */ |
| 9 | sealed interface Route : NavKey { |
| 10 | @Serializable |
| 11 | /** The top-level parental-controls page from Settings. Read-only without the PIN. */ |
| 12 | data object Dashboard : Route |
| 13 | |
| 14 | @Serializable |
| 15 | /** The device-wide daily screen-time budget. Parent-gated. */ |
| 16 | data object DailyLimit : Route |
| 17 | |
| 18 | @Serializable |
| 19 | /** Per-app daily caps. Parent-gated. */ |
| 20 | data object AppLimits : Route |
| 21 | |
| 22 | @Serializable |
| 23 | /** Budget picker dialog over [DailyLimit]. */ |
| 24 | data object DailyLimitPickerDialog : Route |
| 25 | |
| 26 | @Serializable |
| 27 | /** The nightly bedtime window. Parent-gated. */ |
| 28 | data object Bedtime : Route |
| 29 | |
| 30 | @Serializable |
| 31 | /** The daytime downtime window. Parent-gated. */ |
| 32 | data object Downtime : Route |
| 33 | |
| 34 | @Serializable |
| 35 | /** The school-hours window. Parent-gated. */ |
| 36 | data object SchoolTime : Route |
| 37 | |
| 38 | @Serializable |
| 39 | /** Web content filters. Parent-gated. */ |
| 40 | data object WebFilters : Route |
| 41 | |
| 42 | @Serializable |
| 43 | /** First-run PIN creation, and PIN change after the gate passes. */ |
| 44 | data object PinSetup : Route |
| 45 | |
| 46 | @Serializable |
| 47 | /** |
| 48 | * The parent-PIN challenge for [target]. The gated destination itself is |
| 49 | * never on the stack below this route: verification replaces the gate |
| 50 | * with the destination, and cancel pops it (finishing the host when the |
| 51 | * gate is the only entry), so back can never expose gated content. |
| 52 | */ |
| 53 | data class PinGate(val target: PinGateTarget) : Route |
| 54 | } |