2024-10-10 10:12:43 +00:00
|
|
|
using Gtk 4.0;
|
|
|
|
using Adw 1;
|
|
|
|
|
2024-10-29 14:46:33 +00:00
|
|
|
template $AudreyUiSetup: Adw.PreferencesDialog {
|
2024-10-10 10:12:43 +00:00
|
|
|
title: _("Setup");
|
|
|
|
|
|
|
|
Adw.ToolbarView {
|
|
|
|
[top]
|
|
|
|
Adw.HeaderBar {}
|
|
|
|
|
2024-10-12 19:06:15 +00:00
|
|
|
Adw.PreferencesPage {
|
|
|
|
Adw.PreferencesGroup {
|
2024-10-10 10:16:23 +00:00
|
|
|
title: _("Authentication");
|
2024-10-10 10:12:43 +00:00
|
|
|
|
2024-10-11 08:22:05 +00:00
|
|
|
[header-suffix]
|
|
|
|
Gtk.Button {
|
|
|
|
styles [ "flat" ]
|
|
|
|
icon-name: "edit-undo";
|
|
|
|
sensitive: bind template.authn_can_validate;
|
|
|
|
}
|
|
|
|
|
|
|
|
Adw.EntryRow {
|
2024-10-10 10:16:23 +00:00
|
|
|
title: _("Server URL");
|
2024-10-10 10:12:43 +00:00
|
|
|
input-purpose: url;
|
2024-10-11 08:22:05 +00:00
|
|
|
sensitive: bind template.authn_can_edit;
|
|
|
|
text: bind template.server_url bidirectional;
|
|
|
|
|
|
|
|
changed => $on_authn_changed ();
|
2024-10-10 10:12:43 +00:00
|
|
|
}
|
|
|
|
|
2024-10-11 08:22:05 +00:00
|
|
|
Adw.EntryRow {
|
2024-10-10 10:16:23 +00:00
|
|
|
title: _("Username");
|
2024-10-11 08:22:05 +00:00
|
|
|
sensitive: bind template.authn_can_edit;
|
|
|
|
text: bind template.username bidirectional;
|
|
|
|
|
|
|
|
changed => $on_authn_changed ();
|
2024-10-10 10:12:43 +00:00
|
|
|
}
|
|
|
|
|
2024-10-11 08:22:05 +00:00
|
|
|
Adw.PasswordEntryRow {
|
2024-10-10 10:16:23 +00:00
|
|
|
title: _("Password");
|
2024-10-11 08:22:05 +00:00
|
|
|
sensitive: bind template.authn_can_edit;
|
|
|
|
text: bind template.password bidirectional;
|
|
|
|
|
|
|
|
changed => $on_authn_changed ();
|
2024-10-10 10:12:43 +00:00
|
|
|
}
|
|
|
|
|
2024-10-11 08:22:05 +00:00
|
|
|
Adw.ActionRow {
|
2024-10-10 10:16:23 +00:00
|
|
|
title: _("Status");
|
2024-10-11 08:22:05 +00:00
|
|
|
subtitle: bind template.status;
|
2024-10-10 10:12:43 +00:00
|
|
|
|
|
|
|
styles [
|
|
|
|
"property",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2024-10-11 08:22:05 +00:00
|
|
|
Adw.ButtonRow {
|
2024-10-10 10:16:23 +00:00
|
|
|
title: _("Connect and save");
|
2024-10-11 08:22:05 +00:00
|
|
|
sensitive: bind template.authn_can_validate;
|
|
|
|
|
|
|
|
activated => $on_authn_validate_activated ();
|
2024-10-10 10:12:43 +00:00
|
|
|
}
|
2024-10-12 19:06:15 +00:00
|
|
|
}
|
2024-10-10 10:12:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|