Added option to have an imprint

The environment Variable IMPRINT_URL simply adds a /imprint button in footer to the url
This commit is contained in:
Uli Roth
2024-09-23 15:44:21 +02:00
parent 847fc9677d
commit fca8761515
5 changed files with 12 additions and 0 deletions

View File

@@ -38,6 +38,10 @@ pub static ref ALLOW_FILES: bool = std::env::var("ALLOW_FILES")
.unwrap_or("true".to_string())
.parse()
.unwrap();
pub static ref IMPRINT_URL: String = std::env::var("IMPRINT_URL")
.unwrap_or("".to_string())
.parse()
.unwrap();
}
// THEME

View File

@@ -12,6 +12,7 @@ pub struct Status {
pub max_expiration: u32,
pub allow_advanced: bool,
pub allow_files: bool,
pub imprint_url: String,
// Theme
pub theme_image: String,
pub theme_text: String,
@@ -28,6 +29,7 @@ pub async fn get_status() -> (StatusCode, Json<Status>) {
max_expiration: *config::MAX_EXPIRATION,
allow_advanced: *config::ALLOW_ADVANCED,
allow_files: *config::ALLOW_FILES,
imprint_url: config::IMPRINT_URL.to_string(),
theme_new_note_notice: *config::THEME_NEW_NOTE_NOTICE,
theme_image: config::THEME_IMAGE.to_string(),
theme_text: config::THEME_TEXT.to_string(),