feat: allow customizing option in frontend
This commit is contained in:
parent
18feb78757
commit
7c49476120
@ -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",
|
||||||
|
|||||||
1
frontend/src/types/settings.d.ts
vendored
1
frontend/src/types/settings.d.ts
vendored
@ -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;
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user