Face unlock window: live camera preview, Snap, thumbnails, one password on Apply
CI / test (push) Failing after 12m30s
CI / test (push) Failing after 12m30s
Settings > Session "Add or remove faces…" (and "Remove…" on a face) opens a compositor-drawn Face unlock window instead of running root steps one by one: - chandra-face camera runs as the user (no password): it streams a small live picture with the face box and a cropped thumbnail per snap; the snaps' embeddings stay in that process, nothing is written to disk. - Click a snap to drop it; mark saved faces Remove/Keep. - Apply saves the snaps as one face and removes the marked ones in one root `chandra-face apply` (JSON on stdin, validated) through run0/pkexec: one password prompt. - New raster host function image-pixels (host-wasm, wasmhost, native) for the window's pictures. Tests: camera session and apply in face/test_face.py; the window end to end against a fake tool in compositor/host/face_test.mbt. Docs explain why the change itself still needs root. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hhiJfJNAYqWzQiuKMf
This commit is contained in:
74 files changed
+2617
-89
No files matched your search
@@ -12,22 +12,60 @@ pub let binary_config : ClockConfig
|
||||
|
||||
pub fn binary_info() -> (String, String, Int32, Int32, Int32)
|
||||
|
||||
pub fn days_in_month(Int32, Int32) -> Int32
|
||||
|
||||
pub let digital_config : ClockConfig
|
||||
|
||||
pub fn digital_info() -> (String, String, Int32, Int32, Int32)
|
||||
|
||||
pub fn is_leap(Int32) -> Bool
|
||||
|
||||
pub fn iso_week(Int32, Int32, Int32) -> Int32
|
||||
|
||||
pub fn long_date(@types.Datetime) -> String
|
||||
|
||||
pub fn month_grid(Int32, Int32, Bool) -> Array[DayCell]
|
||||
|
||||
pub fn render_binary(@types.Size, @theme.Tokens, @types.Datetime, seconds? : Bool) -> Array[@types.DrawOp]
|
||||
|
||||
pub fn render_digital(@types.Size, @theme.Tokens, @types.Datetime, hour12? : Bool, show_date? : Bool, ampm? : Bool) -> Array[@types.DrawOp]
|
||||
|
||||
pub fn weekday_of(Int32, Int32, Int32) -> Int32
|
||||
|
||||
// Errors
|
||||
|
||||
// Types and methods
|
||||
pub(all) struct Calendar {
|
||||
mut open : Bool
|
||||
mut year : Int32
|
||||
mut month : Int32
|
||||
mut monday_first : Bool
|
||||
mut week_numbers : Bool
|
||||
mut hover : CalendarHit
|
||||
}
|
||||
pub fn Calendar::go_today(Self, @types.Datetime) -> Unit
|
||||
pub fn Calendar::handle(Self, Bool, @types.InputEvent, @types.Datetime) -> Bool
|
||||
pub fn Calendar::hit(Self, Int32, Int32) -> CalendarHit
|
||||
pub fn Calendar::new() -> Self
|
||||
pub fn Calendar::render(Self, @theme.Tokens, @types.Datetime, hour12? : Bool, ampm? : Bool) -> Array[@types.DrawOp]
|
||||
pub fn Calendar::shift(Self, Int32) -> Unit
|
||||
pub fn Calendar::size(Self) -> (Int32, Int32)
|
||||
pub fn Calendar::toggle(Self, @types.Datetime) -> Unit
|
||||
|
||||
#derive(Eq, @debug.Debug)
|
||||
pub(all) enum CalendarHit {
|
||||
Prev
|
||||
Next
|
||||
Today
|
||||
Nothing
|
||||
}
|
||||
|
||||
pub(all) struct ClockConfig {
|
||||
mut hour12 : Bool
|
||||
mut show_date : Bool
|
||||
mut seconds : Bool
|
||||
mut ampm : Bool
|
||||
cal : Calendar
|
||||
}
|
||||
pub fn ClockConfig::binary_items(Self) -> Array[ConfigEntry]
|
||||
pub fn ClockConfig::digital_items(Self) -> Array[ConfigEntry]
|
||||
@@ -42,6 +80,14 @@ pub(all) struct ConfigEntry {
|
||||
value : String
|
||||
}
|
||||
|
||||
#derive(Eq, @debug.Debug)
|
||||
pub(all) struct DayCell {
|
||||
year : Int32
|
||||
month : Int32
|
||||
day : Int32
|
||||
in_month : Bool
|
||||
}
|
||||
|
||||
// Type aliases
|
||||
|
||||
// Traits
|
||||
Reference in new issue
Block a user