cleanup status variable

This commit is contained in:
Niccolo Borgioli 2024-08-25 22:18:31 +02:00
parent c3794fa2b6
commit a0a99cd3cc
3 changed files with 6 additions and 5 deletions

View File

@ -38,10 +38,6 @@ pub static ref ALLOW_FILES: bool = std::env::var("ALLOW_FILES")
.unwrap_or("true".to_string()) .unwrap_or("true".to_string())
.parse() .parse()
.unwrap(); .unwrap();
pub static ref THEME_NEW_NOTE_NOTICE: bool = std::env::var("THEME_NEW_NOTE_NOTICE")
.unwrap_or("true".to_string())
.parse()
.unwrap();
} }
// THEME // THEME
@ -62,4 +58,8 @@ lazy_static! {
.unwrap_or("".to_string()) .unwrap_or("".to_string())
.parse() .parse()
.unwrap(); .unwrap();
pub static ref THEME_NEW_NOTE_NOTICE: bool = std::env::var("THEME_NEW_NOTE_NOTICE")
.unwrap_or("true".to_string())
.parse()
.unwrap();
} }

View File

@ -13,12 +13,12 @@ pub struct Status {
pub max_expiration: u32, pub max_expiration: u32,
pub allow_advanced: bool, pub allow_advanced: bool,
pub allow_files: bool, pub allow_files: bool,
pub theme_new_note_notice: bool,
// Theme // Theme
pub theme_image: String, pub theme_image: String,
pub theme_text: String, pub theme_text: String,
pub theme_page_title: String, pub theme_page_title: String,
pub theme_favicon: String, pub theme_favicon: String,
pub theme_new_note_notice: bool,
} }
pub async fn get_status() -> (StatusCode, Json<Status>) { pub async fn get_status() -> (StatusCode, Json<Status>) {

View File

@ -116,6 +116,7 @@ export type Status = {
theme_text: string theme_text: string
theme_favicon: string theme_favicon: string
theme_page_title: string theme_page_title: string
theme_new_note_notice: boolean
} }
export async function status() { export async function status() {