mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-06 03:25:27 +00:00
move identity feature to request area
This commit is contained in:
parent
78957ff85b
commit
2dc6154d54
32 changed files with 59 additions and 84 deletions
|
|
@ -4,4 +4,4 @@ pub mod identity;
|
|||
pub mod loading;
|
||||
pub mod mime;
|
||||
|
||||
use super::ItemAction;
|
||||
use super::{ItemAction, TabAction};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use crate::app::browser::window::tab::item::Action;
|
||||
use super::{ItemAction, TabAction};
|
||||
use adw::StatusPage;
|
||||
use gtk::{prelude::ButtonExt, Align, Button};
|
||||
use gtk::{prelude::ActionExt, Align, Button};
|
||||
use std::rc::Rc;
|
||||
|
||||
// Defaults
|
||||
|
|
@ -13,18 +13,16 @@ const DEFAULT_BUTTON_CLASS: &str = "suggested-action";
|
|||
|
||||
/// Create new default preset for `Identity`
|
||||
/// [StatusPage](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.StatusPage.html)
|
||||
pub fn build(action: Rc<Action>) -> StatusPage {
|
||||
pub fn build((tab_action, item_action): (&Rc<TabAction>, &Rc<ItemAction>)) -> StatusPage {
|
||||
// Init certificate selection
|
||||
let button = &Button::builder()
|
||||
.action_name(format!("{}.{}", tab_action.id, item_action.identity.name()))
|
||||
.css_classes([DEFAULT_BUTTON_CLASS])
|
||||
.label(DEFAULT_BUTTON_LABEL)
|
||||
.tooltip_text(DEFAULT_BUTTON_TOOLTIP_TEXT)
|
||||
.halign(Align::Center)
|
||||
.build();
|
||||
|
||||
// Init events
|
||||
button.connect_clicked(move |_| action.ident.activate());
|
||||
|
||||
// Init status page
|
||||
StatusPage::builder()
|
||||
.description(DEFAULT_DESCRIPTION)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue