aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-04-30 10:47:54 +0200
committermetamuffin <metamuffin@disroot.org>2025-04-30 10:47:54 +0200
commita2ef3f6ec4c830611fde1a2e935588ccbbc61c03 (patch)
treeddcc1cb501e6c7237edd491aa7136d02150d03d3 /ui
parent212a0f23bc894faf88e159560c113f504349cc05 (diff)
downloadjellything-a2ef3f6ec4c830611fde1a2e935588ccbbc61c03.tar
jellything-a2ef3f6ec4c830611fde1a2e935588ccbbc61c03.tar.bz2
jellything-a2ef3f6ec4c830611fde1a2e935588ccbbc61c03.tar.zst
config works
Diffstat (limited to 'ui')
-rw-r--r--ui/src/admin/mod.rs2
-rw-r--r--ui/src/lib.rs15
2 files changed, 12 insertions, 5 deletions
diff --git a/ui/src/admin/mod.rs b/ui/src/admin/mod.rs
index 74a5e1a..ade0d97 100644
--- a/ui/src/admin/mod.rs
+++ b/ui/src/admin/mod.rs
@@ -4,8 +4,8 @@
Copyright (C) 2025 metamuffin <metamuffin.org>
*/
-pub mod user;
pub mod log;
+pub mod user;
use crate::{Page, locale::Language, scaffold::FlashDisplay};
use jellycommon::routes::{
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 <metamuffin.org>
*/
+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<Config> = LazyLock::new(|| {
.take()
.expect("cache config not preloaded. logic error")
});
-static CONF_PRELOAD: Mutex<Option<Config>> = Mutex::new(None);
+pub static CONF_PRELOAD: Mutex<Option<Config>> = 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