audrey/resources/setup.blp
2024-10-29 15:46:33 +01:00

65 lines
1.4 KiB
Text

using Gtk 4.0;
using Adw 1;
template $AudreyUiSetup: Adw.PreferencesDialog {
title: _("Setup");
Adw.ToolbarView {
[top]
Adw.HeaderBar {}
Adw.PreferencesPage {
Adw.PreferencesGroup {
title: _("Authentication");
[header-suffix]
Gtk.Button {
styles [ "flat" ]
icon-name: "edit-undo";
sensitive: bind template.authn_can_validate;
}
Adw.EntryRow {
title: _("Server URL");
input-purpose: url;
sensitive: bind template.authn_can_edit;
text: bind template.server_url bidirectional;
changed => $on_authn_changed ();
}
Adw.EntryRow {
title: _("Username");
sensitive: bind template.authn_can_edit;
text: bind template.username bidirectional;
changed => $on_authn_changed ();
}
Adw.PasswordEntryRow {
title: _("Password");
sensitive: bind template.authn_can_edit;
text: bind template.password bidirectional;
changed => $on_authn_changed ();
}
Adw.ActionRow {
title: _("Status");
subtitle: bind template.status;
styles [
"property",
]
}
Adw.ButtonRow {
title: _("Connect and save");
sensitive: bind template.authn_can_validate;
activated => $on_authn_validate_activated ();
}
}
}
}
}