From 4ea4416165c754a87c924381b1bc4f770a2323e6 Mon Sep 17 00:00:00 2001 From: Adrien Date: Wed, 8 May 2024 10:23:18 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Remove=20Loading=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/components/loading.rs | 28 ------------ src/ui/components/loading.scss | 80 ---------------------------------- src/ui/components/mod.rs | 6 +-- 3 files changed, 2 insertions(+), 112 deletions(-) delete mode 100644 src/ui/components/loading.rs delete mode 100644 src/ui/components/loading.scss diff --git a/src/ui/components/loading.rs b/src/ui/components/loading.rs deleted file mode 100644 index e2aa62d..0000000 --- a/src/ui/components/loading.rs +++ /dev/null @@ -1,28 +0,0 @@ -use dioxus::prelude::*; -use log::debug; - -use super::spinner::Spinner; -use super::wallpaper::Wallpaper; - -turf::style_sheet!("src/ui/components/loading.scss"); - -pub fn LoadingPage() -> Element { - debug!("LoadingPage rendering"); - - rsx! { - style { {STYLE_SHEET} }, - - div { - class: ClassName::LOADING, - - Wallpaper { - display_version: true - }, - - div { - class: ClassName::LOADING_SPINNER, - Spinner {}, - } - } - } -} diff --git a/src/ui/components/loading.scss b/src/ui/components/loading.scss deleted file mode 100644 index f26b2a1..0000000 --- a/src/ui/components/loading.scss +++ /dev/null @@ -1,80 +0,0 @@ -@import "../_base.scss" -@import "./spinner.scss" - -.loading { - height: 100%; - width: 100%; - - display: flex; - align-items: center; - justify-content: center; - - &__spinner { - height: 5%; - aspect-ratio: $logo-aspect-ratio; - - position: absolute; - - $logo-center-pos: calc(50% + ($background-height / 2) - ($logo-height / 2)); - - @media (0px < height <= calc($background-height * 5)) { - top: $logo-center-pos; - } - @media (calc($background-height * 5) < height <= calc($background-height * 6)) { - top: calc($logo-center-pos + ($background-height * 1)); - } - @media (calc($background-height * 6) < height <= calc($background-height * 8)) { - top: calc($logo-center-pos + ($background-height * 2)); - } - @media (calc($background-height * 8) < height <= calc($background-height * 10)) { - top: calc($logo-center-pos + ($background-height * 3)); - } - @media (calc($background-height * 10) < height <= calc($background-height * 12)) { - top: calc($logo-center-pos + ($background-height * 4)); - } - @media (calc($background-height * 12) < height <= calc($background-height * 14)) { - top: calc($logo-center-pos + ($background-height * 5)); - } - @media (calc($background-height * 14) < height <= calc($background-height * 16)) { - top: calc($logo-center-pos + ($background-height * 6)); - } - @media (calc($background-height * 16) < height <= calc($background-height * 18)) { - top: calc($logo-center-pos + ($background-height * 7)); - } - @media (calc($background-height * 18) < height <= calc($background-height * 20)) { - top: calc($logo-center-pos + ($background-height * 8)); - } - @media (calc($background-height * 20) < height <= calc($background-height * 22)) { - top: calc($logo-center-pos + ($background-height * 9)); - } - @media (calc($background-height * 22) < height <= calc($background-height * 24)) { - top: calc($logo-center-pos + ($background-height * 10)); - } - @media (calc($background-height * 24) < height <= calc($background-height * 26)) { - top: calc($logo-center-pos + ($background-height * 11)); - } - @media (calc($background-height * 26) < height <= calc($background-height * 28)) { - top: calc($logo-center-pos + ($background-height * 12)); - } - @media (calc($background-height * 28) < height <= calc($background-height * 30)) { - top: calc($logo-center-pos + ($background-height * 13)); - } - @media (calc($background-height * 30) < height <= calc($background-height * 32)) { - top: calc($logo-center-pos + ($background-height * 14)); - } - @media (calc($background-height * 32) < height <= calc($background-height * 34)) { - top: calc($logo-center-pos + ($background-height * 15)); - } - @media (calc($background-height * 34) < height <= calc($background-height * 36)) { - top: calc($logo-center-pos + ($background-height * 16)); - } - @media (calc($background-height * 36) < height <= calc($background-height * 38)) { - top: calc($logo-center-pos + ($background-height * 17)); - } - @media (calc($background-height * 38) < height <= calc($background-height * 40)) { - top: calc($logo-center-pos + ($background-height * 18)); - } - - background-color: get-color(greyscale, 0); - } -} diff --git a/src/ui/components/mod.rs b/src/ui/components/mod.rs index ecab4e3..38d0069 100644 --- a/src/ui/components/mod.rs +++ b/src/ui/components/mod.rs @@ -1,12 +1,10 @@ pub(crate) mod avatar_selector; pub(crate) mod button; -pub(crate) mod chats_window; -pub(crate) mod contacts_window; +pub(crate) mod chat_panel; +pub(crate) mod conversations; pub(crate) mod header; pub(crate) mod icons; -pub(crate) mod loading; pub(crate) mod login; -pub(crate) mod main_window; pub(crate) mod modal; pub(crate) mod spinner; pub(crate) mod text_input;