Add location to empty view, reverse sort operations
This commit is contained in:
parent
12d087abd9
commit
2e84a26f7e
2 changed files with 26 additions and 22 deletions
|
|
@ -385,7 +385,7 @@ impl App {
|
|||
|
||||
if !self.pending_operations.is_empty() {
|
||||
let mut section = widget::settings::view_section(fl!("pending"));
|
||||
for (id, (op, progress)) in self.pending_operations.iter() {
|
||||
for (id, (op, progress)) in self.pending_operations.iter().rev() {
|
||||
section = section.add(widget::column::with_children(vec![
|
||||
widget::text(format!("{:?}", op)).into(),
|
||||
widget::progress_bar(0.0..=100.0, *progress)
|
||||
|
|
@ -398,7 +398,7 @@ impl App {
|
|||
|
||||
if !self.failed_operations.is_empty() {
|
||||
let mut section = widget::settings::view_section(fl!("failed"));
|
||||
for (id, (op, error)) in self.failed_operations.iter() {
|
||||
for (id, (op, error)) in self.failed_operations.iter().rev() {
|
||||
section = section.add(widget::column::with_children(vec![
|
||||
widget::text(format!("{:?}", op)).into(),
|
||||
widget::text(error).into(),
|
||||
|
|
@ -409,7 +409,7 @@ impl App {
|
|||
|
||||
if !self.complete_operations.is_empty() {
|
||||
let mut section = widget::settings::view_section(fl!("complete"));
|
||||
for (id, op) in self.complete_operations.iter() {
|
||||
for (id, op) in self.complete_operations.iter().rev() {
|
||||
section = section.add(widget::text(format!("{:?}", op)));
|
||||
}
|
||||
children.push(section.into());
|
||||
|
|
|
|||
|
|
@ -804,6 +804,8 @@ impl Tab {
|
|||
pub fn empty_view(&self, has_hidden: bool, core: &Core) -> Element<Message> {
|
||||
let cosmic_theme::Spacing { space_xxs, .. } = core.system_theme().cosmic().spacing;
|
||||
|
||||
widget::column::with_children(vec![
|
||||
self.location_view(core),
|
||||
widget::container(
|
||||
widget::column::with_children(vec![
|
||||
widget::icon::from_name("folder-symbolic")
|
||||
|
|
@ -824,6 +826,8 @@ impl Tab {
|
|||
.align_y(Vertical::Center)
|
||||
.width(Length::Fill)
|
||||
.height(Length::Fill)
|
||||
.into(),
|
||||
])
|
||||
.into()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue