rename identity widget

This commit is contained in:
yggverse 2024-11-16 14:52:37 +02:00
parent d717c1c246
commit 3e6f95833d
3 changed files with 13 additions and 13 deletions

View File

@ -1,16 +1,16 @@
mod auth;
mod bookmark;
mod database;
mod history;
mod home;
mod identity;
mod reload;
mod request;
mod widget;
use auth::Auth;
use bookmark::Bookmark;
use history::History;
use home::Home;
use identity::Identity;
use reload::Reload;
use request::Request;
use widget::Widget;
@ -24,11 +24,11 @@ use sqlite::Transaction;
use std::rc::Rc;
pub struct Navigation {
auth: Rc<Auth>,
profile: Rc<Profile>,
bookmark: Rc<Bookmark>,
history: Rc<History>,
home: Rc<Home>,
identity: Rc<Identity>,
profile: Rc<Profile>,
reload: Rc<Reload>,
request: Rc<Request>,
widget: Rc<Widget>,
@ -40,7 +40,7 @@ impl Navigation {
action: (Rc<BrowserAction>, Rc<WindowAction>, Rc<TabAction>),
) -> Self {
// Init components
let auth = Rc::new(Auth::new(action.2.clone()));
let identity = Rc::new(Identity::new(action.2.clone()));
let home = Rc::new(Home::new(action.1.clone()));
let history = Rc::new(History::new(action.1.clone()));
let reload = Rc::new(Reload::new(action.1.clone()));
@ -49,7 +49,7 @@ impl Navigation {
// Init widget
let widget = Rc::new(Widget::new(
auth.widget().gobject(),
identity.widget().gobject(),
home.widget().gobject(),
history.widget().gobject(),
reload.widget().gobject(),
@ -59,11 +59,11 @@ impl Navigation {
// Done
Self {
auth,
profile,
bookmark,
history,
home,
identity,
profile,
reload,
request,
widget,
@ -75,7 +75,7 @@ impl Navigation {
pub fn update(&self, progress_fraction: Option<f64>) {
let request = self.request.widget().gobject().text();
self.auth.update();
self.identity.update();
self.bookmark
.update(self.profile.bookmark.get(&request).is_ok());
self.history.update();

View File

@ -4,11 +4,11 @@ use widget::Widget;
use crate::app::browser::window::tab::item::Action;
use std::rc::Rc;
pub struct Auth {
pub struct Identity {
widget: Rc<Widget>,
}
impl Auth {
impl Identity {
// Construct
pub fn new(action: Rc<Action>) -> Self {
Self {
@ -18,7 +18,7 @@ impl Auth {
// Actions
pub fn update(&self) {
// @TODO
self.widget.update(false) // @TODO
}
// Getters

View File

@ -15,7 +15,7 @@ impl Widget {
// Init gobject
let gobject = Button::builder()
.icon_name("avatar-default-symbolic")
.tooltip_text("Auth")
.tooltip_text("Identity")
.sensitive(false)
.build();