mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
add comments
This commit is contained in:
parent
2ff6b9d963
commit
941b1cc283
1 changed files with 6 additions and 0 deletions
|
|
@ -295,12 +295,14 @@ impl Page {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Update `Self` witch children components
|
||||||
pub fn update(&self) {
|
pub fn update(&self) {
|
||||||
// Update components
|
// Update components
|
||||||
self.navigation.update(self.progress_fraction());
|
self.navigation.update(self.progress_fraction());
|
||||||
// @TODO self.content.update();
|
// @TODO self.content.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Cleanup `Self` session
|
||||||
pub fn clean(
|
pub fn clean(
|
||||||
&self,
|
&self,
|
||||||
transaction: &Transaction,
|
transaction: &Transaction,
|
||||||
|
|
@ -323,6 +325,7 @@ impl Page {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Restore `Self` session from database
|
||||||
pub fn restore(
|
pub fn restore(
|
||||||
&self,
|
&self,
|
||||||
transaction: &Transaction,
|
transaction: &Transaction,
|
||||||
|
|
@ -353,6 +356,7 @@ impl Page {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Save `Self` session to database
|
||||||
pub fn save(
|
pub fn save(
|
||||||
&self,
|
&self,
|
||||||
transaction: &Transaction,
|
transaction: &Transaction,
|
||||||
|
|
@ -382,6 +386,7 @@ impl Page {
|
||||||
self.title.borrow().clone()
|
self.title.borrow().clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Get value for progress bar, depending on `Self::Status`
|
||||||
pub fn progress_fraction(&self) -> Option<f64> {
|
pub fn progress_fraction(&self) -> Option<f64> {
|
||||||
// Interpret status to progress fraction
|
// Interpret status to progress fraction
|
||||||
match *self.status.borrow() {
|
match *self.status.borrow() {
|
||||||
|
|
@ -400,6 +405,7 @@ impl Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Get `Self` loading status
|
||||||
pub fn is_loading(&self) -> bool {
|
pub fn is_loading(&self) -> bool {
|
||||||
match self.progress_fraction() {
|
match self.progress_fraction() {
|
||||||
Some(progress_fraction) => progress_fraction < 1.0,
|
Some(progress_fraction) => progress_fraction < 1.0,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue