Skip to content

Commit

Permalink
Merge branch 'dev' into user-replies-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
phillsatellite authored Jan 16, 2024
2 parents a6411be + 6b68d8e commit 47ce0ae
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ fn get_items_from_current_directory(
.filter_map(|item| item.get_file().ok())
.collect::<Vec<_>>();

directories.sort_by_key(|b| std::cmp::Reverse(b.modified()));
files.sort_by_key(|b| std::cmp::Reverse(b.modified()));
directories.sort_by_key(|b| std::cmp::Reverse(b.creation()));
files.sort_by_key(|b| std::cmp::Reverse(b.creation()));

let max_size = warp_storage.max_size();
let current_size = warp_storage.current_size();
Expand Down
5 changes: 3 additions & 2 deletions icons/src/icons/outline/loader.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion kit/src/elements/loader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@ use dioxus::prelude::*;
pub struct Props {
#[props(optional)]
spinning: Option<bool>,
#[props(optional)]
large: Option<bool>,
}

pub fn is_large(cx: &Scope<Props>) -> bool {
if let Some(f) = cx.props.large.as_ref() {
return *f;
}
false
}

#[allow(non_snake_case)]
pub fn Loader(cx: Scope<Props>) -> Element {
cx.render(rsx!(
div {
class: "loader",
class: if is_large(&cx) { "loader large" } else { "loader" },
div {
class: "spin",
IconElement { icon: Icon::Loader }
Expand Down
18 changes: 18 additions & 0 deletions kit/src/elements/loader/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,24 @@
fill: transparent;
stroke: var(--text-color);
}

&.large {
width: 60px;
height: 60px;

.spin {
width: 60px;
height: 60px;
top: 30px;
left: 30px;
}

svg {
height: 60px;
width: 60px;
stroke-width: 0.02rem;
}
}
}

@keyframes spin {
Expand Down

0 comments on commit 47ce0ae

Please sign in to comment.