mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
add identity page for CertificateRequest status code
This commit is contained in:
parent
611addda42
commit
63f7f1c769
4 changed files with 68 additions and 0 deletions
|
|
@ -0,0 +1,29 @@
|
|||
use adw::StatusPage;
|
||||
use gtk::{prelude::ButtonExt, Align, Button};
|
||||
|
||||
// Defaults
|
||||
const DEFAULT_ICON_NAME: &str = "avatar-default-symbolic";
|
||||
const DEFAULT_TITLE: &str = "Identity";
|
||||
const DEFAULT_DESCRIPTION: &str = "Client certificate required to continue!";
|
||||
const DEFAULT_BUTTON_LABEL: &str = "Select";
|
||||
|
||||
/// Create new default preset for `Identity`
|
||||
/// [StatusPage](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.StatusPage.html)
|
||||
pub fn new_gobject() -> StatusPage {
|
||||
// Init certificate selection
|
||||
let button = &Button::builder()
|
||||
.label(DEFAULT_BUTTON_LABEL)
|
||||
.halign(Align::Center)
|
||||
.build();
|
||||
|
||||
// Init events
|
||||
button.connect_activate(|_| {}); // @TODO
|
||||
|
||||
// Init status page
|
||||
StatusPage::builder()
|
||||
.description(DEFAULT_DESCRIPTION)
|
||||
.icon_name(DEFAULT_ICON_NAME)
|
||||
.title(DEFAULT_TITLE)
|
||||
.child(button)
|
||||
.build()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue