aboutsummaryrefslogtreecommitdiff
path: root/ui/client-style/src
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2026-01-25 15:01:38 +0100
committermetamuffin <metamuffin@disroot.org>2026-01-25 15:01:38 +0100
commit5075aede44cb8ab2df10e6debba38483e8d11e96 (patch)
treef719e4b4a0c29f3a27b4fa7cf0a6ee6f7739125c /ui/client-style/src
parent53361f4c6027d1569a707ce58889bc2c2ea3749c (diff)
downloadjellything-5075aede44cb8ab2df10e6debba38483e8d11e96.tar
jellything-5075aede44cb8ab2df10e6debba38483e8d11e96.tar.bz2
jellything-5075aede44cb8ab2df10e6debba38483e8d11e96.tar.zst
remove some unused imports; css reload; port login logic
Diffstat (limited to 'ui/client-style/src')
-rw-r--r--ui/client-style/src/lib.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/client-style/src/lib.rs b/ui/client-style/src/lib.rs
index 06ddce4..f0c99cf 100644
--- a/ui/client-style/src/lib.rs
+++ b/ui/client-style/src/lib.rs
@@ -5,6 +5,19 @@
*/
use std::borrow::Cow;
+#[cfg(not(feature = "reload"))]
pub fn css_bundle() -> Cow<'static, str> {
include_str!(concat!(env!("OUT_DIR"), "/bundle.css")).into()
}
+
+#[cfg(feature = "reload")]
+pub fn css_bundle() -> Cow<'static, str> {
+ let mut out = String::new();
+ for file in glob::glob("ui/client-style/src/**/*.css")
+ .unwrap()
+ .map(Result::unwrap)
+ {
+ out += &std::fs::read_to_string(file).unwrap();
+ }
+ Cow::Owned(out)
+}