feat: warn when no polkit agent runs and offer to install one
This commit is contained in:
1 parent
b8cdd255ed
commit
8224b6f1d7
20 files changed
+2338
-1623
No files matched your search
@@ -191,6 +191,11 @@ void EnrollController::onFinished(const QJsonObject &result)
|
||||
}
|
||||
if (reason == u"denied") {
|
||||
m_error = i18n("A face can only be added with your password.");
|
||||
// Hyprland, Niri and the like bring no polkit agent, so no password window shows.
|
||||
const QStringList desktops = qEnvironmentVariable("XDG_CURRENT_DESKTOP").split(u':');
|
||||
if (!desktops.contains(u"KDE") && !desktops.contains(u"GNOME")) {
|
||||
m_error += u' ' + i18n("No password window? Start a polkit agent, for example hyprpolkitagent.");
|
||||
}
|
||||
} else if (reason == u"camera") {
|
||||
m_error = i18n("The camera could not be used: %1", result.value(u"message").toString());
|
||||
} else if (reason == u"models") {
|
||||
|
||||
Reference in new issue
Block a user