mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-02 03:54:59 +08:00
improve (admin): additional customisations on admin console
This commit is contained in:
@ -81,6 +81,8 @@ func NewConfiguration() Configuration {
|
||||
FormElement{Name: "auto_connect", Type: "boolean", Default: false, Description: "User don't have to click on the login button if an admin is prefilling a unique backend"},
|
||||
FormElement{Name: "upload_button", Type: "boolean", Default: false, Description: "Display the upload button on any device"},
|
||||
FormElement{Name: "upload_pool_size", Type: "number", Default: 15, Description: "Maximum number of files upload in parallel (Default: 15)"},
|
||||
FormElement{Name: "filepage_default_view", Type: "select", Default: "grid", Opts: []string{"list", "grid"}, Description: "Default layout for files and folder on the file page"},
|
||||
FormElement{Name: "filepage_default_sort", Type: "select", Default: "type", Opts: []string{"type", "date", "name"}, Description: "Default order for files and folder on the file page"},
|
||||
FormElement{Name: "custom_css", Type: "long_text", Default: "", Description: "Set custom css code for your instance"},
|
||||
},
|
||||
},
|
||||
@ -351,31 +353,35 @@ func (this Configuration) Save() Configuration {
|
||||
|
||||
func (this Configuration) Export() interface{} {
|
||||
return struct {
|
||||
Editor string `json:"editor"`
|
||||
ForkButton bool `json:"fork_button"`
|
||||
DisplayHidden bool `json:"display_hidden"`
|
||||
AutoConnect bool `json:"auto_connect"`
|
||||
Name string `json:"name"`
|
||||
UploadButton bool `json:"upload_button"`
|
||||
Connections interface{} `json:"connections"`
|
||||
EnableShare bool `json:"enable_share"`
|
||||
Logout string `json:"logout"`
|
||||
MimeTypes map[string]string `json:"mime"`
|
||||
UploadPoolSize int `json:"upload_pool_size"`
|
||||
RefreshAfterUpload bool `json:"refresh_after_upload"`
|
||||
Editor string `json:"editor"`
|
||||
ForkButton bool `json:"fork_button"`
|
||||
DisplayHidden bool `json:"display_hidden"`
|
||||
AutoConnect bool `json:"auto_connect"`
|
||||
Name string `json:"name"`
|
||||
UploadButton bool `json:"upload_button"`
|
||||
Connections interface{} `json:"connections"`
|
||||
EnableShare bool `json:"enable_share"`
|
||||
Logout string `json:"logout"`
|
||||
MimeTypes map[string]string `json:"mime"`
|
||||
UploadPoolSize int `json:"upload_pool_size"`
|
||||
RefreshAfterUpload bool `json:"refresh_after_upload"`
|
||||
FilePageDefaultSort string `json:"default_sort"`
|
||||
FilePageDefaultView string `json:"default_view"`
|
||||
}{
|
||||
Editor: this.Get("general.editor").String(),
|
||||
ForkButton: this.Get("general.fork_button").Bool(),
|
||||
DisplayHidden: this.Get("general.display_hidden").Bool(),
|
||||
AutoConnect: this.Get("general.auto_connect").Bool(),
|
||||
Name: this.Get("general.name").String(),
|
||||
UploadButton: this.Get("general.upload_button").Bool(),
|
||||
Connections: this.Conn,
|
||||
EnableShare: this.Get("features.share.enable").Bool(),
|
||||
Logout: this.Get("general.logout").String(),
|
||||
MimeTypes: AllMimeTypes(),
|
||||
UploadPoolSize: this.Get("general.upload_pool_size").Int(),
|
||||
RefreshAfterUpload: this.Get("general.refresh_after_upload").Bool(),
|
||||
Editor: this.Get("general.editor").String(),
|
||||
ForkButton: this.Get("general.fork_button").Bool(),
|
||||
DisplayHidden: this.Get("general.display_hidden").Bool(),
|
||||
AutoConnect: this.Get("general.auto_connect").Bool(),
|
||||
Name: this.Get("general.name").String(),
|
||||
UploadButton: this.Get("general.upload_button").Bool(),
|
||||
Connections: this.Conn,
|
||||
EnableShare: this.Get("features.share.enable").Bool(),
|
||||
Logout: this.Get("general.logout").String(),
|
||||
MimeTypes: AllMimeTypes(),
|
||||
UploadPoolSize: this.Get("general.upload_pool_size").Int(),
|
||||
RefreshAfterUpload: this.Get("general.refresh_after_upload").Bool(),
|
||||
FilePageDefaultSort: this.Get("general.filepage_default_sort").String(),
|
||||
FilePageDefaultView: this.Get("general.filepage_default_view").String(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user