Two of the panels this desktop still handed to GNOME Settings. Users manages the account through accountsservice -- the same daemon GNOME's panel drives, so a name or picture set here is what the login screen and lock screen read. Name, picture, account type, password, automatic login, and adding or removing other accounts. Every change is authorized by polkit through the agent this session already runs; a dismissed prompt is a normal outcome and says so. A new password is read from the helper's stdin, hashed by openssl reading its own stdin, and handed over D-Bus from inside that process. It is never an argument: argv is world-readable through /proc, so a password passed that way is published to every process on the machine. Removing an account takes two presses and says it destroys their files; the last administrator cannot be removed or demoted, because a machine nobody can administer is not a state to offer. Sharing reports what is actually true, including "the software for this is not installed" -- the honest answer for Samba here, and the case the panel it replaces shows as a switch that does nothing. Password sign-in is reported from sshd's configuration rather than assumed: claiming "keys only" when the file is silent would state a security property that cannot be backed up. The Control Center now draws the account's real picture and name. A generic glyph sat there while a real avatar was already set, which made the desktop look like it did not know whose it was. Also here: the KDE Connect contract no longer requires a phone to be awake. kdeconnectd drops its device objects for a phone it has not seen recently while the pairing survives in its config, so demanding one failed whenever the phone was off. Claude-Session: https://claude.ai/code/session_01BRvzt4H8XXLPVH5MyYdk9L
89 lines
2.8 KiB
QML
89 lines
2.8 KiB
QML
// A row whose trailing control is a free-text field, NOT bound to a schema key.
|
|
//
|
|
// TextFieldRow {
|
|
// label: "Full name"
|
|
// text: Accounts.me.realName
|
|
// onAccepted: value => Accounts.setRealName("gib", value)
|
|
// }
|
|
//
|
|
// TextEntryRow is the schema-bound one, and is the right choice for anything
|
|
// that is a Panama setting. This is for values that live in the system rather
|
|
// than in settings.json -- an account's real name, the machine's hostname --
|
|
// where the label, the validation, and the write all belong to whoever owns
|
|
// that value.
|
|
//
|
|
// Committed on Enter or when focus leaves, never per keystroke: these drive
|
|
// privileged calls that prompt, and prompting once per typed character would be
|
|
// unusable.
|
|
|
|
import QtQuick
|
|
import qs.config
|
|
|
|
SettingRow {
|
|
id: root
|
|
|
|
property string text: ""
|
|
property string placeholder: ""
|
|
property bool enabled: true
|
|
|
|
signal accepted(value: string)
|
|
|
|
controlWidth: 220
|
|
|
|
// An external change replaces what is shown, unless it would yank the field
|
|
// out from under someone mid-edit.
|
|
onTextChanged: if (!input.activeFocus) input.text = root.text
|
|
|
|
Rectangle {
|
|
anchors.right: parent.right
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
width: root.controlWidth
|
|
height: 32
|
|
radius: 9
|
|
color: Theme.alpha(Theme.fg, root.enabled ? 0.06 : 0.03)
|
|
border.width: input.activeFocus ? 2 : 1
|
|
border.color: input.activeFocus
|
|
? Theme.alpha(Theme.accent, 0.55)
|
|
: Theme.alpha(Theme.fg, 0.1)
|
|
opacity: root.enabled ? 1 : 0.5
|
|
|
|
TextInput {
|
|
id: input
|
|
anchors.fill: parent
|
|
anchors.leftMargin: 11
|
|
anchors.rightMargin: 11
|
|
enabled: root.enabled
|
|
activeFocusOnTab: true
|
|
text: root.text
|
|
color: Theme.fg
|
|
selectionColor: Theme.alpha(Theme.accent, 0.5)
|
|
selectedTextColor: Theme.fg
|
|
font.family: Theme.fontFamily
|
|
font.pixelSize: Theme.fontSize
|
|
verticalAlignment: TextInput.AlignVCenter
|
|
clip: true
|
|
|
|
onAccepted: if (input.text !== root.text) root.accepted(input.text)
|
|
|
|
onActiveFocusChanged: {
|
|
if (input.activeFocus)
|
|
return;
|
|
if (input.text !== root.text)
|
|
root.accepted(input.text);
|
|
else
|
|
input.text = root.text;
|
|
}
|
|
|
|
Text {
|
|
anchors.fill: parent
|
|
visible: input.text === ""
|
|
text: root.placeholder
|
|
color: Theme.fgMuted
|
|
font: input.font
|
|
verticalAlignment: Text.AlignVCenter
|
|
elide: Text.ElideRight
|
|
}
|
|
}
|
|
}
|
|
}
|