audrey/resources/setup.blp

64 lines
1.5 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() swapped;
}
Adw.EntryRow {
title: _("Username");
sensitive: bind template.authn_can_edit;
text: bind template.username bidirectional;
changed => $on_authn_changed() swapped;
}
Adw.PasswordEntryRow {
title: _("Password");
sensitive: bind template.authn_can_edit;
text: bind template.password bidirectional;
changed => $on_authn_changed() swapped;
}
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() swapped;
}
}
}
}
}