Tier 0: render what the services already decided, honestly
Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
@@ -138,9 +138,11 @@ SettingsPage {
|
||||
|
||||
SettingsCard {
|
||||
title: "Camera, microphone & screen"
|
||||
subtitle: Permissions.available
|
||||
? "What is in use now, and the answers applications gave the desktop portal when they asked."
|
||||
: (Permissions.lastError || "The desktop portal's permission store is not running, so the grants below cannot be read.")
|
||||
subtitle: !Permissions.scanned
|
||||
? "Reading what is in use now, and what the desktop portal has recorded."
|
||||
: (Permissions.available
|
||||
? "What is in use now, and the answers applications gave the desktop portal when they asked."
|
||||
: (Permissions.lastError || "The desktop portal's permission store is not running, so the grants below cannot be read."))
|
||||
|
||||
Row {
|
||||
width: parent.width
|
||||
@@ -151,6 +153,9 @@ SettingsPage {
|
||||
width: (parent.width - 20) / 3
|
||||
glyph: "\u{F0100}"
|
||||
label: "Camera"
|
||||
// False until pw-dump has answered once, and false forever if
|
||||
// it cannot run: an unmeasured tile must not read as "Idle".
|
||||
measured: PrivacyState.initialized
|
||||
active: PrivacyState.cameraActive
|
||||
app: PrivacyState.cameraApp
|
||||
}
|
||||
@@ -159,6 +164,7 @@ SettingsPage {
|
||||
width: (parent.width - 20) / 3
|
||||
glyph: "\u{F036C}"
|
||||
label: "Microphone"
|
||||
measured: PrivacyState.initialized
|
||||
active: PrivacyState.microphoneActive
|
||||
app: PrivacyState.microphoneApp
|
||||
}
|
||||
@@ -167,6 +173,7 @@ SettingsPage {
|
||||
width: (parent.width - 20) / 3
|
||||
glyph: "\u{F0379}"
|
||||
label: "Screen sharing"
|
||||
measured: PrivacyState.initialized
|
||||
active: PrivacyState.screenSharingActive
|
||||
app: PrivacyState.screenSharingApp
|
||||
}
|
||||
@@ -200,11 +207,22 @@ SettingsPage {
|
||||
count: root.askedCount(section.rows.length)
|
||||
}
|
||||
|
||||
// An empty table means "nothing has asked" only once the store
|
||||
// has been read and answered. Before that, and when the
|
||||
// permission store is not running at all, every table is empty
|
||||
// for the same reason -- and "no app has asked for the camera"
|
||||
// is then a measurement nobody took.
|
||||
TextRow {
|
||||
width: section.width
|
||||
visible: section.rows.length === 0
|
||||
label: "Nothing has asked yet"
|
||||
detail: String(section.modelData.empty)
|
||||
label: !Permissions.scanned
|
||||
? "Not read yet"
|
||||
: (Permissions.available ? "Nothing has asked yet" : "Not measured")
|
||||
detail: !Permissions.scanned
|
||||
? "Reading what the desktop portal has recorded."
|
||||
: (Permissions.available
|
||||
? String(section.modelData.empty)
|
||||
: "The desktop portal's permission store is not answering, so what has asked for this cannot be read.")
|
||||
divider: false
|
||||
}
|
||||
|
||||
@@ -714,10 +732,21 @@ SettingsPage {
|
||||
|
||||
SettingsCard {
|
||||
title: "Device security"
|
||||
subtitle: DeviceSecurity.attentionCount === 0
|
||||
? "Everything below is in its recommended state."
|
||||
: DeviceSecurity.attentionCount + " item"
|
||||
+ (DeviceSecurity.attentionCount === 1 ? "" : "s") + " below may deserve attention."
|
||||
// Three answers, not two. "Everything is in its recommended state" is
|
||||
// computed from an empty fact list exactly as happily as from a clean
|
||||
// one, so a helper that failed to run would be reported as a machine
|
||||
// with nothing wrong with it. No facts means nothing was checked.
|
||||
subtitle: {
|
||||
if (!DeviceSecurity.scanned)
|
||||
return "Reading the firmware, the kernel and the filesystem…";
|
||||
if (DeviceSecurity.facts.length === 0)
|
||||
return "Could not check — " + (DeviceSecurity.lastError
|
||||
|| "the security helper did not answer.");
|
||||
if (DeviceSecurity.attentionCount === 0)
|
||||
return "Everything below is in its recommended state.";
|
||||
return DeviceSecurity.attentionCount + " item"
|
||||
+ (DeviceSecurity.attentionCount === 1 ? "" : "s") + " below may deserve attention.";
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: DeviceSecurity.facts
|
||||
|
||||
Reference in New Issue
Block a user