From a2ef3f6ec4c830611fde1a2e935588ccbbc61c03 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Wed, 30 Apr 2025 10:47:54 +0200 Subject: config works --- ui/src/lib.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'ui/src/lib.rs') diff --git a/ui/src/lib.rs b/ui/src/lib.rs index 4f1901a..cbfc298 100644 --- a/ui/src/lib.rs +++ b/ui/src/lib.rs @@ -3,9 +3,12 @@ which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2025 metamuffin */ +pub mod account; +pub mod admin; pub mod filter_sort; pub mod format; pub mod home; +pub mod items; pub mod locale; pub mod node_card; pub mod node_page; @@ -13,9 +16,6 @@ pub mod props; pub mod scaffold; pub mod search; pub mod stats; -pub mod items; -pub mod admin; -pub mod account; use locale::Language; use markup::DynRender; @@ -41,7 +41,14 @@ static CONF: LazyLock = LazyLock::new(|| { .take() .expect("cache config not preloaded. logic error") }); -static CONF_PRELOAD: Mutex> = Mutex::new(None); +pub static CONF_PRELOAD: Mutex> = Mutex::new(None); + +pub fn get_brand() -> String { + CONF.brand.clone() +} +pub fn get_slogan() -> String { + CONF.slogan.clone() +} /// render as supertrait would be possible but is not /// dyn compatible and I really dont want to expose generics -- cgit v1.2.3-70-g09d2