feat: add legal page with configuration options (#724)
* Addconfig entries for legal notice * Add legal route handling to middleware * Make legal notice public * Add legal category to config sidebar * Add legal notice page * Add German translations for legal notice and configuration options * Replace legal page with separate imprint and privacy pages * Update middleware * Add footer component * Update legal text descriptions to indicate Markdown support again * Refactor footer layout * Add zIndex to footer component * improve mobile layout * run formatter --------- Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
@@ -349,6 +349,33 @@ const configVariables: ConfigVariables = {
|
||||
defaultValue: "",
|
||||
obscured: true,
|
||||
},
|
||||
},
|
||||
legal: {
|
||||
enabled: {
|
||||
type: "boolean",
|
||||
defaultValue: "false",
|
||||
secret: false,
|
||||
},
|
||||
imprintText: {
|
||||
type: "text",
|
||||
defaultValue: "",
|
||||
secret: false,
|
||||
},
|
||||
imprintUrl: {
|
||||
type: "string",
|
||||
defaultValue: "",
|
||||
secret: false,
|
||||
},
|
||||
privacyPolicyText: {
|
||||
type: "text",
|
||||
defaultValue: "",
|
||||
secret: false,
|
||||
},
|
||||
privacyPolicyUrl: {
|
||||
type: "string",
|
||||
defaultValue: "",
|
||||
secret: false,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -32,8 +32,7 @@ export class ConfigService extends EventEmitter {
|
||||
|
||||
if (configVariable.type == "number" || configVariable.type == "filesize")
|
||||
return parseInt(value);
|
||||
if (configVariable.type == "boolean")
|
||||
return value == "true";
|
||||
if (configVariable.type == "boolean") return value == "true";
|
||||
if (configVariable.type == "string" || configVariable.type == "text")
|
||||
return value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user