feat: allow customizing option in frontend

This commit is contained in:
Henrique Dias 2025-11-14 16:09:12 +01:00
parent 18feb78757
commit 7c49476120
No known key found for this signature in database
4 changed files with 8 additions and 0 deletions

View File

@ -166,6 +166,7 @@
"allowNew": "Create new files and directories", "allowNew": "Create new files and directories",
"allowPublish": "Publish new posts and pages", "allowPublish": "Publish new posts and pages",
"allowSignup": "Allow users to signup", "allowSignup": "Allow users to signup",
"hideLoginButton": "Hide the login button from public pages",
"avoidChanges": "(leave blank to avoid changes)", "avoidChanges": "(leave blank to avoid changes)",
"branding": "Branding", "branding": "Branding",
"brandingDirectoryPath": "Branding directory path", "brandingDirectoryPath": "Branding directory path",

View File

@ -1,6 +1,7 @@
interface ISettings { interface ISettings {
signup: boolean; signup: boolean;
createUserDir: boolean; createUserDir: boolean;
hideLoginButton: boolean;
minimumPasswordLength: number; minimumPasswordLength: number;
userHomeBasePath: string; userHomeBasePath: string;
defaults: SettingsDefaults; defaults: SettingsDefaults;

View File

@ -18,6 +18,11 @@
{{ t("settings.createUserDir") }} {{ t("settings.createUserDir") }}
</p> </p>
<p>
<input type="checkbox" v-model="settings.hideLoginButton" />
{{ t("settings.hideLoginButton") }}
</p>
<p> <p>
<label class="small">{{ t("settings.userHomeBasePath") }}</label> <label class="small">{{ t("settings.userHomeBasePath") }}</label>
<input <input

View File

@ -57,6 +57,7 @@ var settingsPutHandler = withAdmin(func(_ http.ResponseWriter, r *http.Request,
d.settings.Tus = req.Tus d.settings.Tus = req.Tus
d.settings.Shell = req.Shell d.settings.Shell = req.Shell
d.settings.Commands = req.Commands d.settings.Commands = req.Commands
d.settings.HideLoginButton = req.HideLoginButton
err = d.store.Settings.Save(d.settings) err = d.store.Settings.Save(d.settings)
return errToStatus(err), err return errToStatus(err), err