mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-01 02:43:35 +08:00
improve (admin): additional customisations on admin console
This commit is contained in:
@ -101,7 +101,7 @@
|
|||||||
transition-delay: 0.7s;
|
transition-delay: 0.7s;
|
||||||
h2{
|
h2{
|
||||||
font-family: 'Source Code Pro', monospace;
|
font-family: 'Source Code Pro', monospace;
|
||||||
color: var(--primary);
|
color: white;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
margin: 25px 0 40px 0;
|
margin: 25px 0 40px 0;
|
||||||
@ -116,7 +116,7 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
a.active, a:hover{
|
a.active, a:hover{
|
||||||
color: var(--primary);
|
color: white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,10 +36,10 @@ export class FilesPage extends React.Component {
|
|||||||
}
|
}
|
||||||
this.state = {
|
this.state = {
|
||||||
path: (decodeURIComponent(location.pathname).replace("/files", "") || "/" ),
|
path: (decodeURIComponent(location.pathname).replace("/files", "") || "/" ),
|
||||||
sort: settings_get("filespage_sort") || "type",
|
sort: settings_get("filespage_sort") || CONFIG["default_sort"] || "type",
|
||||||
sort_reverse: true,
|
sort_reverse: true,
|
||||||
show_hidden: settings_get("filespage_show_hidden") || CONFIG["display_hidden"],
|
show_hidden: settings_get("filespage_show_hidden") || CONFIG["display_hidden"],
|
||||||
view: settings_get("filespage_view") || "grid",
|
view: settings_get("filespage_view") || CONFIG["default_view"] || "grid",
|
||||||
is_search: false,
|
is_search: false,
|
||||||
files: [],
|
files: [],
|
||||||
selected: [],
|
selected: [],
|
||||||
|
|||||||
@ -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: "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_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: "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"},
|
FormElement{Name: "custom_css", Type: "long_text", Default: "", Description: "Set custom css code for your instance"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -363,6 +365,8 @@ func (this Configuration) Export() interface{} {
|
|||||||
MimeTypes map[string]string `json:"mime"`
|
MimeTypes map[string]string `json:"mime"`
|
||||||
UploadPoolSize int `json:"upload_pool_size"`
|
UploadPoolSize int `json:"upload_pool_size"`
|
||||||
RefreshAfterUpload bool `json:"refresh_after_upload"`
|
RefreshAfterUpload bool `json:"refresh_after_upload"`
|
||||||
|
FilePageDefaultSort string `json:"default_sort"`
|
||||||
|
FilePageDefaultView string `json:"default_view"`
|
||||||
}{
|
}{
|
||||||
Editor: this.Get("general.editor").String(),
|
Editor: this.Get("general.editor").String(),
|
||||||
ForkButton: this.Get("general.fork_button").Bool(),
|
ForkButton: this.Get("general.fork_button").Bool(),
|
||||||
@ -376,6 +380,8 @@ func (this Configuration) Export() interface{} {
|
|||||||
MimeTypes: AllMimeTypes(),
|
MimeTypes: AllMimeTypes(),
|
||||||
UploadPoolSize: this.Get("general.upload_pool_size").Int(),
|
UploadPoolSize: this.Get("general.upload_pool_size").Int(),
|
||||||
RefreshAfterUpload: this.Get("general.refresh_after_upload").Bool(),
|
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