mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2024-04-21 12:32:08 +00:00
Merge branch 'master' of http://github.com/mickael-kerjean/filestash
This commit is contained in:
@@ -42,7 +42,7 @@ export class MobileFileUpload extends React.Component{
|
||||
this.props.emit("file.upload", this.props.path, e);
|
||||
}
|
||||
render(){
|
||||
if(/(Android|iPad|iPhone)/.test(navigator.userAgent) === false){
|
||||
if(!window.CONFIG["upload_button"] && /(Android|iPad|iPhone)/.test(navigator.userAgent) === false){
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ func NewConfiguration() Configuration {
|
||||
FormElement{Name: "display_hidden", Type: "boolean", Default: false, Description: "Should files starting with a dot be visible by default?"},
|
||||
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: "remember_me", Type: "boolean", Default: true, Description: "Visiblity of the remember me button on the login screen"},
|
||||
FormElement{Name: "upload_button", Type: "boolean", Default: false, Description: "Display the upload button on any device"},
|
||||
},
|
||||
},
|
||||
Form{
|
||||
@@ -350,6 +351,7 @@ func (this Configuration) Export() interface{} {
|
||||
AutoConnect bool `json:"auto_connect"`
|
||||
Name string `json:"name"`
|
||||
RememberMe bool `json:"remember_me"`
|
||||
UploadButton bool `json:"upload_button"`
|
||||
Connections interface{} `json:"connections"`
|
||||
EnableSearch bool `json:"enable_search"`
|
||||
EnableShare bool `json:"enable_share"`
|
||||
@@ -361,6 +363,7 @@ func (this Configuration) Export() interface{} {
|
||||
AutoConnect: this.Get("general.auto_connect").Bool(),
|
||||
Name: this.Get("general.name").String(),
|
||||
RememberMe: this.Get("general.remember_me").Bool(),
|
||||
UploadButton: this.Get("general.upload_button").Bool(),
|
||||
Connections: this.Conn,
|
||||
EnableSearch: this.Get("features.search.enable").Bool(),
|
||||
EnableShare: this.Get("features.share.enable").Bool(),
|
||||
|
||||
Reference in New Issue
Block a user