mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-23 09:19:58 -05:00
waffles: polkit
This commit is contained in:
@@ -6,37 +6,10 @@ import qs.modules.common.functions
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
|
||||
Scope {
|
||||
FullscreenPolkitWindow {
|
||||
id: root
|
||||
|
||||
Loader {
|
||||
active: PolkitService.active
|
||||
sourceComponent: Variants {
|
||||
model: Quickshell.screens
|
||||
delegate: PanelWindow {
|
||||
id: panelWindow
|
||||
required property var modelData
|
||||
screen: modelData
|
||||
|
||||
anchors {
|
||||
top: true
|
||||
left: true
|
||||
right: true
|
||||
bottom: true
|
||||
}
|
||||
|
||||
color: "transparent"
|
||||
WlrLayershell.namespace: "quickshell:polkit"
|
||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
|
||||
WlrLayershell.layer: WlrLayer.Overlay
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
|
||||
PolkitContent {
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
}
|
||||
contentComponent: Component {
|
||||
PolkitContent {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,12 +66,7 @@ Item {
|
||||
WindowDialogParagraph {
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
text: {
|
||||
if (!PolkitService.flow) return;
|
||||
return PolkitService.flow.message.endsWith(".")
|
||||
? PolkitService.flow.message.slice(0, -1)
|
||||
: PolkitService.flow.message
|
||||
}
|
||||
text: PolkitService.cleanMessage
|
||||
}
|
||||
|
||||
MaterialTextField {
|
||||
@@ -79,11 +74,7 @@ Item {
|
||||
Layout.fillWidth: true
|
||||
focus: true
|
||||
enabled: PolkitService.interactionAvailable
|
||||
placeholderText: {
|
||||
const inputPrompt = PolkitService.flow?.inputPrompt.trim() ?? "";
|
||||
const cleanedInputPrompt = inputPrompt.endsWith(":") ? inputPrompt.slice(0, -1) : inputPrompt;
|
||||
return cleanedInputPrompt || (root.usePasswordChars ? Translation.tr("Password") : Translation.tr("Input"))
|
||||
}
|
||||
placeholderText: PolkitService.cleanPrompt
|
||||
echoMode: root.usePasswordChars ? TextInput.Password : TextInput.Normal
|
||||
onAccepted: root.submit();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user