mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-05 16:04:15 +00:00
rename request component to input
This commit is contained in:
parent
80aea6a653
commit
55afe17271
@ -1,14 +1,14 @@
|
|||||||
mod content;
|
mod content;
|
||||||
mod database;
|
mod database;
|
||||||
|
mod input;
|
||||||
mod meta;
|
mod meta;
|
||||||
mod navigation;
|
mod navigation;
|
||||||
mod request;
|
|
||||||
mod widget;
|
mod widget;
|
||||||
|
|
||||||
use content::Content;
|
use content::Content;
|
||||||
use database::Database;
|
use database::Database;
|
||||||
|
use input::Input;
|
||||||
use navigation::Navigation;
|
use navigation::Navigation;
|
||||||
use request::Request;
|
|
||||||
use widget::Widget;
|
use widget::Widget;
|
||||||
|
|
||||||
use meta::{Meta, Mime, Status};
|
use meta::{Meta, Mime, Status};
|
||||||
@ -37,7 +37,7 @@ pub struct Page {
|
|||||||
// Components
|
// Components
|
||||||
navigation: Arc<Navigation>,
|
navigation: Arc<Navigation>,
|
||||||
content: Arc<Content>,
|
content: Arc<Content>,
|
||||||
request: Arc<Request>,
|
input: Arc<Input>,
|
||||||
// Extras
|
// Extras
|
||||||
meta: Arc<RefCell<Meta>>,
|
meta: Arc<RefCell<Meta>>,
|
||||||
// GTK
|
// GTK
|
||||||
@ -75,14 +75,14 @@ impl Page {
|
|||||||
action_update.clone(),
|
action_update.clone(),
|
||||||
);
|
);
|
||||||
|
|
||||||
let request = Request::new_arc();
|
let input = Input::new_arc();
|
||||||
|
|
||||||
let widget = Widget::new_arc(
|
let widget = Widget::new_arc(
|
||||||
&id,
|
&id,
|
||||||
action_page_open.clone(),
|
action_page_open.clone(),
|
||||||
navigation.gobject(),
|
navigation.gobject(),
|
||||||
content.gobject(),
|
content.gobject(),
|
||||||
request.gobject(),
|
input.gobject(),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Init async mutable Meta object
|
// Init async mutable Meta object
|
||||||
@ -117,7 +117,7 @@ impl Page {
|
|||||||
// Components
|
// Components
|
||||||
content,
|
content,
|
||||||
navigation,
|
navigation,
|
||||||
request,
|
input,
|
||||||
// Extras
|
// Extras
|
||||||
meta,
|
meta,
|
||||||
// GTK
|
// GTK
|
||||||
@ -165,7 +165,7 @@ impl Page {
|
|||||||
let id = self.id.to_variant();
|
let id = self.id.to_variant();
|
||||||
let navigation = self.navigation.clone();
|
let navigation = self.navigation.clone();
|
||||||
let content = self.content.clone();
|
let content = self.content.clone();
|
||||||
let request = self.request.clone();
|
let input = self.input.clone();
|
||||||
let meta = self.meta.clone();
|
let meta = self.meta.clone();
|
||||||
let action_update = self.action_update.clone();
|
let action_update = self.action_update.clone();
|
||||||
|
|
||||||
@ -279,7 +279,7 @@ impl Page {
|
|||||||
meta.borrow_mut().description = None; // @TODO
|
meta.borrow_mut().description = None; // @TODO
|
||||||
meta.borrow_mut().title = Some(gformat!("Input expected"));
|
meta.borrow_mut().title = Some(gformat!("Input expected"));
|
||||||
|
|
||||||
request.show(&placeholder, false);
|
input.show(&placeholder, false);
|
||||||
},
|
},
|
||||||
None => todo!(),
|
None => todo!(),
|
||||||
}
|
}
|
||||||
@ -294,7 +294,7 @@ impl Page {
|
|||||||
meta.borrow_mut().description = None; // @TODO
|
meta.borrow_mut().description = None; // @TODO
|
||||||
meta.borrow_mut().title = Some(gformat!("Input expected"));
|
meta.borrow_mut().title = Some(gformat!("Input expected"));
|
||||||
|
|
||||||
request.show(&placeholder, true);
|
input.show(&placeholder, true);
|
||||||
},
|
},
|
||||||
None => todo!(),
|
None => todo!(),
|
||||||
}
|
}
|
||||||
|
@ -7,12 +7,12 @@ use widget::Widget;
|
|||||||
use adw::ToolbarView;
|
use adw::ToolbarView;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
pub struct Request {
|
pub struct Input {
|
||||||
content: Arc<Content>,
|
content: Arc<Content>,
|
||||||
widget: Arc<Widget>,
|
widget: Arc<Widget>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Request {
|
impl Input {
|
||||||
// Construct
|
// Construct
|
||||||
pub fn new_arc() -> Arc<Self> {
|
pub fn new_arc() -> Arc<Self> {
|
||||||
// Init components
|
// Init components
|
Loading…
x
Reference in New Issue
Block a user