forked from Shinonome/dots-hyprland
waffles: polkit
This commit is contained in:
@@ -11,6 +11,18 @@ Singleton {
|
||||
property alias active: polkitAgent.isActive
|
||||
property alias flow: polkitAgent.flow
|
||||
property bool interactionAvailable: false
|
||||
property string cleanMessage: {
|
||||
if (!root.flow) return "";
|
||||
return root.flow.message.endsWith(".")
|
||||
? root.flow.message.slice(0, -1)
|
||||
: root.flow.message
|
||||
}
|
||||
property string cleanPrompt: {
|
||||
const inputPrompt = PolkitService.flow?.inputPrompt.trim() ?? "";
|
||||
const cleanedInputPrompt = inputPrompt.endsWith(":") ? inputPrompt.slice(0, -1) : inputPrompt;
|
||||
const usePasswordChars = !PolkitService.flow?.responseVisible ?? true
|
||||
return cleanedInputPrompt || (usePasswordChars ? Translation.tr("Password") : Translation.tr("Input"))
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
root.flow.cancelAuthenticationRequest()
|
||||
|
||||
Reference in New Issue
Block a user