From 8b7c83539af6ee3a1dea35a32e8d2731e6702fde Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Thu, 23 Jun 2016 22:27:13 +0100 Subject: [PATCH] restructure page --- assets/public/js/application.js | 14 ++- assets/templates/base.tmpl | 18 +-- binary.go | 195 ++++++++++++-------------------- fileinfo.go | 59 +++++----- filemanager.go | 2 +- page.go | 60 +++++----- 6 files changed, 150 insertions(+), 198 deletions(-) diff --git a/assets/public/js/application.js b/assets/public/js/application.js index 179ece45..b17ca5af 100644 --- a/assets/public/js/application.js +++ b/assets/public/js/application.js @@ -349,6 +349,18 @@ var localizeDatetime = function (e, index, ar) { } document.addEventListener("DOMContentLoaded", function (event) { + + document.getElementById("logout").addEventListener("click", event => { + let request = new XMLHttpRequest(); + request.open('GET', window.location.pathname, true, "username", "password"); + request.send(); + request.onreadystatechange = function () { + if (request.readyState == 4) { + window.location = "/"; + } + } + }); + var timeList = Array.prototype.slice.call(document.getElementsByTagName("time")); timeList.forEach(localizeDatetime); @@ -375,7 +387,7 @@ document.addEventListener("DOMContentLoaded", function (event) { let rename = document.getElementById("rename"); if (rename) { - rename.addEventListener("click", renameEvent); + rename.addEventListener("click", renameEvent); } if (document.getElementById("listing")) { diff --git a/assets/templates/base.tmpl b/assets/templates/base.tmpl index 77b8e4e4..12c18e25 100644 --- a/assets/templates/base.tmpl +++ b/assets/templates/base.tmpl @@ -5,19 +5,17 @@ + + + + {{ if ne .Config.StyleSheet "" }} {{ end }} - {{ if .Config.HugoEnabled }} - - - - - {{ end }}
@@ -65,10 +63,11 @@ settings -
- exit_to_app -
+ {{ end }} +
+ exit_to_app +
@@ -87,6 +86,7 @@ {{ end }} +
{{ template "content" .Data }}
diff --git a/binary.go b/binary.go index bb8a5e53..437018ce 100644 --- a/binary.go +++ b/binary.go @@ -11,35 +11,20 @@ package filemanager import ( - "bytes" - "compress/gzip" "fmt" - "io" "io/ioutil" "os" "path/filepath" "strings" - "time" ) -func bindataRead(data []byte, name string) ([]byte, error) { - gz, err := gzip.NewReader(bytes.NewBuffer(data)) +// bindataRead reads the given file from disk. It returns an error on failure. +func bindataRead(path, name string) ([]byte, error) { + buf, err := ioutil.ReadFile(path) if err != nil { - return nil, fmt.Errorf("Read %q: %v", name, err) + err = fmt.Errorf("Error reading asset %s at %s: %v", name, path, err) } - - var buf bytes.Buffer - _, err = io.Copy(&buf, gz) - clErr := gz.Close() - - if err != nil { - return nil, fmt.Errorf("Read %q: %v", name, err) - } - if clErr != nil { - return nil, err - } - - return buf.Bytes(), nil + return buf, err } type asset struct { @@ -47,150 +32,112 @@ type asset struct { info os.FileInfo } -type bindataFileInfo struct { - name string - size int64 - mode os.FileMode - modTime time.Time -} - -func (fi bindataFileInfo) Name() string { - return fi.name -} -func (fi bindataFileInfo) Size() int64 { - return fi.size -} -func (fi bindataFileInfo) Mode() os.FileMode { - return fi.mode -} -func (fi bindataFileInfo) ModTime() time.Time { - return fi.modTime -} -func (fi bindataFileInfo) IsDir() bool { - return false -} -func (fi bindataFileInfo) Sys() interface{} { - return nil -} - -var _publicCssStylesCss = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xbc\x5b\x79\x6f\xdb\x48\x96\xff\x7f\x80\xf9\x0e\x35\x31\x1a\x89\x33\x22\x2d\xca\x47\x62\x79\x07\x18\x6f\xb7\x7b\xda\x98\x24\xbd\x48\xb2\xd8\x6d\x04\x01\x58\x22\x8b\x52\xad\x49\x16\xc1\x22\x6d\x29\xd9\x7c\xf7\x7d\xaf\x2e\x16\x0f\xc9\xce\xee\x76\x47\xdd\xd1\x51\xc7\x7b\xf5\x8e\xdf\x3b\x8a\x39\x79\xf9\x17\x52\x8a\xba\xa0\x39\xff\xc2\xc2\x44\x4a\x72\x7f\x1a\xce\xc3\x53\xf2\xdf\xe4\xed\xed\x47\xf2\x86\x27\xac\x94\x0c\xbe\xad\x79\xb3\x69\x57\x61\x22\x8a\x93\x92\x25\x22\xa7\xf2\xa4\xbf\xee\xe5\xc9\x9f\xff\x84\xaf\x93\x97\x2f\xff\xfc\x27\xf2\x92\x44\x21\xf9\xc0\x1a\x92\xb2\x8c\xb6\x79\x43\x32\x51\xc2\x5f\xb4\xe0\xf9\x8e\x34\x82\x48\x5a\xca\x40\xb2\x9a\x67\xa1\x9a\xbd\x08\xc9\xbf\xd5\xec\x9e\xc1\x24\xfe\xeb\x07\x42\xcb\x94\xdc\xde\x90\x86\x6d\x1b\x22\x81\x02\xa1\xe9\x7f\xb5\xb2\x21\x34\x6b\x58\x0d\x7b\xde\x03\x5f\x44\xd4\x1c\xe6\xd3\x86\x8b\x92\x24\x1b\x5a\xae\xd9\x4c\xed\x05\x7f\x1e\x80\x5b\xd1\x02\x75\x2e\xe9\x2a\xe7\xe5\x9a\xb4\x40\x8c\x7c\x11\xa2\x50\xf4\x14\xaf\x9b\xa6\xc8\xc9\x57\xf8\x0a\x7f\x90\xbd\x40\xb3\xb7\xf4\x98\xbb\xd2\xa3\x27\x70\x1c\xb5\x08\xbf\x04\x85\x0c\x90\xb1\x00\x19\x0b\x34\x63\x4b\x12\xcd\xe7\x3f\x74\xb3\x17\xdd\xec\x07\xb6\xba\xe3\xcd\x13\x57\x7c\xf3\x25\xf8\x9e\x15\xe2\x9e\x39\x09\x16\xb4\x5e\xf3\xb2\x63\x7f\x25\xd2\x9d\x65\x5f\x8f\x2d\xc9\xfc\xca\xed\x41\x7e\xf9\xf8\xf6\xcd\x39\x4a\xa0\xca\xe9\x0e\x77\xe1\x25\x47\x59\x49\xb5\xe4\x6f\xff\x6f\x7f\x46\x9a\xff\x51\xd4\x35\x4b\x1a\x12\xaf\x72\x91\xdc\xc5\x8e\x85\x52\x34\x9a\x0d\x96\x82\xbc\x6b\x50\xf2\xce\x30\xc9\x72\x56\x28\xd5\x97\xa8\xf5\xd7\x27\x97\xe1\x77\x6d\x14\xa7\xac\xa1\x3c\x97\x31\xc1\x2f\xb2\x2d\x40\x1c\xbb\xd8\xec\x16\xcd\x4f\xa2\x48\x6d\x87\x46\xf5\x33\xaf\x59\x26\xb6\xdf\xb9\x7f\x41\x79\xe9\xf6\x8b\x3a\x15\xd0\xba\xe1\x49\xce\x66\x84\x4a\x9e\xc2\x9b\xe1\x63\x46\x32\xbe\x4e\x68\x85\xd2\x56\x9f\xdb\x1a\x06\x33\x21\xc0\x78\x67\x64\xc3\x68\xaa\xde\xd7\xb5\x68\xab\x19\xc1\xcd\xe1\x6f\x56\xb6\x33\x52\xd2\xfb\x19\x91\xc0\x93\x5a\x69\x4e\x62\x95\x6c\xd8\x5b\x12\xc5\xee\xd5\xc0\x5a\xc0\xdf\xdc\x79\x78\x09\x36\xcf\x82\x03\xc7\x1a\x48\x1a\xdc\xef\x9d\xf5\x66\x72\xcf\xf0\x58\x34\x27\xf0\x75\x5d\x2a\xc5\x88\x8c\xc4\x55\x2d\xd6\x35\x93\x52\x09\xe2\xc7\x4d\x2d\x0a\x38\x94\x91\xe7\x4c\x09\xf7\xd7\x8a\xd5\xd4\x93\x4e\x9b\x72\x31\x23\x09\x2d\xef\x29\xc8\xc4\xae\x9f\x91\x7b\x10\x96\x18\x9d\xca\x67\x7a\xca\xef\x2c\x5b\x81\x62\x0b\xa4\x40\x25\xc3\x15\x07\x7d\xc8\x82\x4a\x21\x40\xe6\x25\x59\xd5\xe2\x01\x1c\x5b\x92\x0c\xd8\xb7\xa4\x11\x1e\x62\xc5\x6c\xec\x80\x23\x01\x3c\xa8\x45\x2e\x43\xdf\x13\xd9\x36\x01\xfe\x41\x81\x7c\xbd\x51\xc6\x8a\x50\x75\x6e\xe0\x48\x0e\x0e\xbe\x04\x71\xbf\xf8\x64\xf7\xf9\x7c\x3c\x3a\x6f\x29\x1c\xef\x7a\xc7\x9e\xfb\x6a\xf6\xaf\xd3\x14\x45\x46\xe2\x4f\x1b\x9e\xa6\xac\xfc\x1c\x13\xd9\xec\x14\xa0\xa1\x36\x2b\x18\xec\xf9\xcd\x49\x34\xd7\x1c\xff\x02\x22\x26\xcd\x86\x91\xb8\x61\x05\xd0\x6b\x58\x3c\xf6\xb2\x13\xe5\x1b\x33\xf2\x81\x66\xb4\xe6\x33\xdf\x41\xc8\xbf\x90\xc5\xa2\x3b\x91\x25\x3f\x23\x76\xbb\x7d\xc7\xb1\xe8\xf3\x86\x97\x77\xbf\x3b\xd2\x18\xbd\xe0\x39\xd7\x35\x58\xf8\x8a\x26\x77\xe8\x55\x70\x0e\x08\x51\xe0\xb9\x4a\xcd\x14\xdc\x09\x66\xe5\xc8\x91\x03\x05\x4f\x5b\xf6\x28\xdd\xea\x40\xad\x5e\x92\xa6\x86\x48\x50\xd1\x1a\xa4\x36\xd4\xcc\x6d\x01\xf6\x0c\xbb\xd6\xe0\xcd\x74\xc5\x73\xde\xec\xd0\x4b\x32\x91\x40\xa4\x49\xad\xac\x25\x79\xd8\xb0\x12\x19\xdc\x11\xd8\x06\x3c\x4a\x0a\x64\x81\x96\x1a\x91\x14\x67\x27\x1b\xd8\xa8\x06\xc5\x82\x58\x3d\xb6\x96\x7a\x14\xd4\xb2\xd4\x13\x0c\x9b\x60\x9e\x68\xf6\x7d\xb0\xff\x88\xe1\x25\x07\x5b\xcf\x01\x3e\x0a\x5a\x82\xa7\xfc\xee\xd2\xb7\xc6\xf9\x98\x45\x8e\x6c\x4c\x83\x87\x77\xd4\xd5\xaa\xfe\xd4\xf0\x26\x67\x9f\x9d\x2e\x44\x0d\x0e\x1b\xac\x44\xd3\x88\x02\x62\x65\xb5\x25\x29\x7c\x66\xe9\x3e\x0f\x41\x26\x18\x9c\xbd\xc1\xec\x22\x5e\x89\x1c\x96\x2b\xa4\xb2\x06\x7d\xf6\xd7\xc3\x4c\xac\x00\x6f\xc1\x55\xe1\x1c\x7e\x4a\xf0\x60\x3c\xf3\x7c\xbe\xd7\x37\xf7\x1c\x5f\xd3\x9a\x24\x95\x66\x65\x8f\x88\xe2\x1d\x00\xb0\x01\x64\x4b\xf6\x91\xb9\x87\xdd\x20\x97\x01\x8f\xde\x44\xb1\x59\xa7\x32\x23\x20\xa0\xc3\xbf\x02\x2f\x78\x8b\x4d\x00\x89\xd5\x58\x6c\x82\x54\xac\x76\x43\x3c\x02\x53\x91\xdf\x23\x99\x4d\xd4\xe7\x16\xa8\x2e\xc9\x82\x15\x57\x83\xdc\x23\xbc\x78\xc5\x8a\xfd\x18\x76\xd0\x4c\x3a\x6a\xb0\xdd\xdd\xd8\x23\x97\xe4\x28\xcb\xe6\x86\xa2\xf1\xce\xa3\xf9\x7e\xa5\xf0\x12\x4e\x2a\xb9\x6c\x90\x0a\x1e\xca\x89\x4f\x25\xa2\x4a\x72\xe8\x87\x79\xee\x62\x42\xc7\x82\x2c\xf0\xf7\xf1\x99\x5f\xab\x84\x6d\x32\xbe\x40\xd6\xb1\x32\xf2\x96\x6d\x05\x9f\xb2\x0c\x95\x80\x91\x45\x45\x35\x8d\xf0\xf1\x01\x9a\x2d\x1a\x60\x5b\x4d\x90\x7d\x75\x6e\xf3\x44\x6f\x2b\xed\xfe\xf8\x63\x25\xa4\xca\xeb\x96\x80\x45\x80\xcc\x00\x19\x57\x8f\x06\xcc\x6f\x48\xd0\xd1\x6a\x44\xb5\x24\xc1\x3c\x3c\x57\x3a\x55\x63\xab\xce\x11\xb5\x07\xc2\xf0\xc2\x8d\x2b\xc8\xb9\x29\x56\x0c\x82\x42\xaa\x6d\xaa\x6c\xfe\x20\xb0\xd7\xc8\xa0\x71\x95\x97\x98\x77\x81\x89\x4f\x07\xb7\x4e\xba\xbc\x58\xf7\x91\xa5\x13\x5f\x41\xb7\xc1\x03\x4f\x9b\x8d\xcb\xc8\xbf\x4d\x25\xb3\x88\xc0\x59\x2e\x1e\x94\xf9\xea\x68\x68\x68\x19\x88\xf3\x54\x79\xbf\x56\xc1\x7f\x59\x43\xc6\xe7\xe2\xbe\xdd\x60\x69\x56\x7b\x92\xfc\x07\x26\x82\x68\x2b\x7f\x90\x24\xad\x93\x18\xd8\x98\x74\x48\x65\xcb\x1a\x15\xba\x93\xe9\x54\x76\x58\x74\x44\xe0\xf5\x67\xf3\x6a\xbb\xcf\x17\x53\x0e\xce\x00\x31\x14\x72\x24\xb2\x62\xcd\x03\x63\x1d\xf6\x20\x15\x01\xe1\xb1\x9e\x70\x89\x4d\xdd\xe9\x6c\x8b\xbe\x00\x22\x5a\x5a\x19\x41\x68\xd8\x3e\x96\x3d\xfd\x08\x53\x21\xb9\xee\x74\xb7\xd7\xfb\xaa\xee\x54\x9d\x9e\x68\xdb\x88\x7d\x67\x12\x29\x78\x3a\x2b\xe2\xa0\x85\xa2\xca\xc3\x14\x38\x26\x58\x17\xea\x72\x2f\xad\x44\x60\xa9\x70\xb7\x4a\x31\x25\x86\x4f\x92\x16\xd5\x64\x19\x5a\x88\x52\x40\xf6\x91\xc0\x1c\xf7\xf1\x6a\x84\x0e\x51\xcf\x29\x7f\x86\x2c\xfe\x77\x0f\xfc\xff\x2c\xc5\x43\x09\x60\x54\x70\x5d\x7d\x03\xb4\xec\x6c\x99\x3a\x33\xe1\xc3\xb3\x1f\x02\xf5\x39\x24\xca\xff\x89\xf2\x00\x25\x80\x7c\x77\x7a\x31\x4b\xd5\x76\x36\x30\x60\x91\x01\x08\x05\xde\x16\xcf\x48\x5b\xe6\x28\x67\x8a\xb1\xbc\x56\xb1\x1c\xf2\x2d\xa8\x2f\x20\xcd\xe2\x12\xe3\x7c\x27\xd0\xc9\x1a\x48\xe7\x7f\x68\xda\x2b\xa6\xd5\x01\x46\x86\x24\x43\xdb\x23\xd0\xa7\xe0\x52\xb6\x20\x45\x8d\xd7\xd2\x2c\x03\x4e\x74\xe7\xc0\xcb\xe4\x5c\xa1\x64\x29\x28\xa5\x1b\xa6\x38\x98\xf6\x5e\x5a\xa7\xe1\xc0\xe3\x14\xff\xce\x2d\x9a\x7c\xf7\x5d\x79\x4a\x0b\x80\x0c\xc5\x21\x2f\xab\x16\xa4\x2d\xaa\xc6\xd4\x91\x5a\x74\x33\xd5\x34\x81\x5c\xd3\xa5\xb5\x26\x5a\x1a\xa6\xa6\x2a\x2b\x3c\xc9\xc4\x84\xae\x89\xe1\xb7\x17\xcc\xe0\xe9\xb8\xd6\x72\xc5\x8a\x75\xa1\xd8\xe5\x63\x1a\xf2\xe2\x61\x5a\x38\x3c\xd5\xd8\x07\xef\xb9\xe4\xa0\x86\x27\x85\xf9\x58\xf5\x58\x54\xce\x0e\x55\x7b\x11\xdb\x13\x51\x40\x1e\x5d\xc7\x6b\x2a\x36\x4e\x6b\x53\xd3\x3a\xba\x06\x57\xd5\x38\x84\x4b\x6d\xf9\xd7\xa5\xf1\xa9\x50\xfa\x35\x3b\x8e\x49\xdd\xd3\xbc\x35\x25\xa0\xd7\x56\x30\xe4\x74\x6e\xea\x73\xd3\xe9\x7b\x36\xc8\x93\xfb\x75\x74\xb7\x97\xe1\xf6\xe0\x5e\x63\x23\xd1\xab\x5c\x9c\xef\x31\x3d\x2c\xd9\x9c\x0b\x5d\xdf\x0b\x9e\xaa\xa2\xea\x3f\xd8\xea\x9f\x70\xda\x55\xab\xe0\xec\xba\x4c\x6b\x1c\x39\x0b\xe7\xe1\x4b\x0c\xc0\x00\x9a\x2f\x16\xc7\xe0\xf9\x98\x38\xef\xc0\x03\x54\xf6\x61\x6b\x69\xeb\x67\x4a\xd8\xaa\xe4\x8f\x07\x65\xb5\xe7\x4c\xbc\xb4\x45\x14\x36\x07\xd5\x19\x13\x48\x86\xef\x74\xc6\xab\x6c\x3d\x26\xcd\xae\x62\xd2\xd4\xdd\xce\xb5\x6c\x21\xd6\x4a\xbb\x03\x55\xe5\x9f\x31\x8b\x44\x95\x65\x49\x5b\x4b\x51\x9b\x8d\x6d\x0c\xe2\x05\x5d\xb3\x00\x37\xb5\xac\x5a\x42\x2e\x2a\xc9\xb1\x48\x55\xd7\x50\xcd\xfb\x84\x4b\xff\xf6\x4c\x0f\x3c\xfb\x3c\x53\x00\x1c\xd9\x8c\xc3\x9b\x81\xb1\xb5\x81\x09\xbd\x65\x90\x63\x01\x04\x3e\x73\x15\x8f\x6d\x14\xd2\xaa\x62\xb4\x46\xcd\x02\xac\xaa\xad\xa7\x3c\x52\x1f\x68\x09\xc9\x1f\x87\x70\x58\x1f\xf4\xcb\xf7\x2c\x90\x5e\x27\xd6\xc8\x02\x1d\x62\x1a\xe4\xbc\xe3\x7e\xb2\x33\x3e\xf7\x0e\xee\x7e\x75\x18\x63\xd8\x31\x34\x86\x46\x65\x52\x37\x5e\x96\xe0\x60\x15\x4d\x53\x44\x49\x14\xb2\x49\xe6\x7a\xf0\x37\xe4\x61\xb9\x0c\x0a\xf1\x25\x50\x95\x75\xa0\xb6\x30\x82\x1c\x0f\xec\xcb\xf1\x0c\xc9\x03\x0d\x96\x8e\x3c\x62\xd6\x44\xe2\x0e\xe0\x64\xad\xa3\x95\x6a\xf8\x2f\xbc\xa8\x44\x0d\x3e\xa8\xd2\x7a\xb5\x1b\xfa\xcc\xbf\x5f\x6b\x33\x93\x1b\xe6\x07\x29\xb5\xd6\xf2\xd7\xcb\xe3\x75\x1b\x7d\xd4\x5f\x68\x9e\x4b\xc8\x26\x12\x51\x14\x98\x52\xa0\x3f\xd2\x86\xec\x44\x0b\x50\x54\x3e\x87\x9a\xa6\xc1\x4e\x4c\xd3\xb9\x0b\xd0\x96\x6c\x10\xad\xcc\xa9\x60\x27\xe0\x55\x8f\xe8\x76\x79\x2a\x98\xc4\x5d\xe0\xec\x15\xba\x5f\x97\x60\xcd\xac\xb0\x66\xd8\x4c\x55\x89\xb1\xda\xcb\x81\x83\x11\x18\xac\x20\x7a\x85\x03\x79\x2f\x33\x8b\x27\x5a\x52\xe0\xed\xfd\x3e\x9a\x35\x84\x3d\x29\xbb\xe7\x2b\xc9\x86\x25\x77\xb0\xed\xd0\x87\x6a\x0a\x40\xf3\xec\xf3\x54\x9a\xe8\x1a\x08\xdb\xa9\x88\xd7\x33\x88\xfd\xdd\xc3\x9f\xf9\x56\xe9\xb4\x07\x1f\xe8\x38\x3a\x28\x3f\x57\x01\xa8\x56\x72\x3d\x49\x99\xf9\x64\xbc\x56\x86\x98\x8c\x91\x04\xb2\x03\x6a\xcc\x23\x76\x69\x9b\x0d\x18\x88\x4d\xaa\x4b\xa7\x4d\x0b\x4e\x07\xfe\x49\x5b\x09\x23\x23\xba\x7a\xaa\xda\x68\x48\x0b\xc5\xaf\x6f\x40\x74\xc7\x2b\x36\x7e\x18\x2b\xbd\x20\xec\xc7\xd3\x82\x2d\x5b\x28\xe2\xea\x67\x9f\xc1\x95\x0c\xfc\x28\x3f\x0a\x24\x94\x23\x41\x2f\xd3\xd8\xbb\x40\xb4\x4d\x7f\x81\xd5\x86\xb5\xef\xa9\x34\xda\x33\xa4\xb8\x03\xbc\x2e\x5f\x90\xf0\x4b\xb2\xc9\x38\xcb\xd3\x78\x7f\x33\x05\x4d\xca\x6d\xd3\x29\x3f\xf6\xda\x40\xd6\x08\x0e\xec\x32\x12\x8a\x26\x7e\x18\x99\x51\xa6\x8a\xbd\x29\xeb\x3a\x5c\xae\x1c\xbc\xec\x19\x43\xa4\xe6\x06\xbb\xe8\x09\xcb\xad\xbe\xa7\x0e\x63\xd3\x6c\x2d\x1a\x33\xfc\x02\x16\xa8\xcc\x45\xcf\x39\xc6\xa8\x5a\x19\xe3\xea\xed\x68\xfb\x94\x96\x9e\xc6\xab\x0d\x95\x6a\x37\xcb\xd0\x0b\x15\xcc\xdd\xe1\x21\x52\x3a\x99\x1c\x1f\x16\x66\x67\x30\xfa\x97\x40\x93\x9f\x34\xb2\xbd\x6b\xc0\xee\x45\xad\x11\xec\x80\x6e\xa6\xd2\x9a\x9f\xd4\xbd\x07\xf1\xb2\x45\x6d\x1b\x33\x93\xdb\xea\xc4\xcb\x1c\xd3\x2f\x78\xe1\x94\x68\x4d\x83\xc0\x82\xfd\x48\x29\x72\x48\x86\x8e\x92\x39\xbe\x86\xbd\x30\xb2\xa8\xb6\xa3\xe0\x13\x9e\x9e\x63\x83\x2c\xbc\x58\xe8\xf7\x57\xbd\x86\xca\xf8\x1a\x47\x65\xee\xf1\x54\x61\x31\x99\x48\x7b\x08\x6b\xf5\x25\x05\xa9\x98\x00\xe8\xc7\xee\x33\x02\x3e\x80\x0b\xde\x5d\xe0\x15\x07\xcf\x74\x5f\xfa\x0b\xab\x85\xfa\xc1\x1e\xd6\xcb\x02\x72\xb6\x86\xe8\xb3\x2f\xac\xfe\x6f\x20\x75\x70\xa9\xe9\xee\x9a\x64\x02\x79\x61\xbe\xa2\xf5\xfe\x1a\x61\x58\xd8\x1c\xae\xd4\x7f\x52\x61\xd2\x26\xec\x0a\x64\xbd\x8e\x6e\x0c\xa6\x5c\x55\x39\x07\x51\x42\xed\x4a\x49\xdd\xa2\x8c\x56\xb0\xa5\xb6\x63\xf2\xee\xd7\x8f\x37\x4b\xb5\xcc\xe5\x4d\xb4\x44\x4d\x48\x9a\x31\xa8\xd8\x56\xcc\x20\x6e\xda\x5d\x87\x4d\xd4\xbc\x1d\xf7\xb6\x50\x9b\x6c\x2f\x63\xbf\xda\xef\xe6\x63\x76\xf5\x47\xdd\x9e\x14\x42\xc2\xa9\x2a\x9a\xa0\xc1\xd8\xdc\xb8\x51\x89\x37\x38\x68\xee\x59\x83\xfe\xb1\xdf\xa1\x07\x1b\xcd\x69\x25\x19\x22\x9d\xfe\x74\xd5\x1b\x37\x1b\xbb\xd4\xab\x49\xa1\x42\xdd\xd8\x4d\xa6\x12\x33\xf2\xf1\xfa\x9d\x7a\x4d\xdc\x73\xf7\xfa\x23\xcf\xdf\x8b\x95\x68\xc4\xf3\xd9\xf8\xc2\x5e\x55\x3a\xae\x17\xb3\xc4\x2a\x99\x17\x10\x77\x21\xdb\x61\x69\xdf\x2f\x03\xd5\xfd\x3c\x77\xed\xec\xf1\x2d\xd0\x51\x96\xe0\x4b\x73\x38\x2c\xab\x8f\xe6\xf3\x0b\x96\x9e\xfa\x74\x3b\x94\xf2\xb1\xc8\xdc\xe2\x40\x1e\x1d\x0d\x6f\x74\xec\x56\xa7\xd1\x65\x92\x65\x7a\xba\xbd\x25\x3e\x1a\x5c\x02\x5b\xae\x73\x96\x81\xdd\xbc\xfa\x61\x70\x98\x5a\xdb\xd3\x2b\xd3\xc7\x6c\x36\xcb\x8c\xd7\xb2\x09\x92\x0d\xcf\x51\xf2\xa9\xff\x7d\x7a\x4f\xd7\x50\x82\xc5\x39\xed\xad\xed\xbe\x0e\x97\x1a\xba\x6e\xed\xe4\x9d\x41\x14\x76\x62\xee\x99\xbf\x4b\x81\x71\xe4\x61\x03\x08\xa7\xec\x46\x61\xf9\x43\x4d\xab\xab\xbe\xc3\x07\x5b\xaf\x89\xea\xc4\xde\xc1\x01\x58\x2d\x04\x39\x2e\x1d\x2b\xfb\x7b\x21\x66\xbc\xaf\x8f\x91\x16\x5b\x34\xa4\xae\x75\x8e\x37\xf6\x87\x2e\xe5\xc3\x82\x35\x34\x80\x53\x14\xfd\x56\xe9\x48\x4a\x3d\x87\xea\x37\xa1\x1f\x73\x31\x5c\x5d\x1f\xba\x2d\xa3\x50\x80\x40\x78\x4a\x29\xbe\xac\x9c\xb0\xf6\x37\x97\x05\x61\x24\x09\xa3\x12\xef\x24\xad\xe4\xc7\x45\xa5\xa2\x12\xea\x2e\x02\x4b\xf7\x5f\x94\x1e\x25\x49\x62\x8d\x06\x2d\xa5\x27\x49\x73\xfd\x80\xd6\x35\x0c\x89\x51\x77\x61\x34\x02\x05\xed\x98\xd1\xf9\x30\x90\x76\xc7\xec\x86\x7c\x23\xbb\x70\xbf\x4e\x5b\x92\xa6\x35\x34\x89\x55\x4e\xad\xfa\x60\x54\xde\xbb\xfb\x82\xe1\x2d\x4a\x01\x86\x67\x1b\x52\xdd\x41\x7d\x06\xce\x6c\x2b\x7c\xda\xdb\x8c\x9e\xcf\xe7\x3f\x3c\xdd\xcd\x7c\x39\x2a\x23\x9a\x24\xe0\x71\xdd\x5d\x0a\xd1\x15\x24\x2a\x90\xa3\x3b\x8e\xc3\x92\xe2\x93\x1b\xf8\x69\xed\xc5\x23\x63\xa2\x06\x03\xc2\xc8\x79\xea\x03\x18\x57\xb0\x82\xb8\x7b\x07\x52\xc2\xb7\xa0\xb3\x18\xe7\x91\x28\x5b\x3b\x8c\x0b\xa6\x34\x50\xd5\x2c\xf0\xbc\xd9\x9a\xce\xd9\x02\x5f\x57\x8f\x4b\x5b\x3f\x40\x33\x21\xf1\xf0\xc2\x31\xeb\x0b\x2a\x61\x5e\x6b\xc4\x50\x5b\xd7\x6c\x37\xc8\xd5\x3c\x1b\x34\x14\xe8\xac\xfb\x38\x89\xd4\x3d\xfc\x08\x13\x7d\xcd\xd0\xcd\xea\xb2\x40\x93\x98\x78\x6a\xbf\x74\x97\x79\xde\xc5\xd3\xe5\x85\xbb\x3e\xf1\x6e\x22\x26\x92\x4d\x76\x81\xaf\x03\x91\xea\x1c\x5f\x7d\xf8\xc0\x22\xb9\x95\x20\xa5\x0e\x7c\x7d\xff\xd3\x64\xff\x5e\xb0\x94\x53\xf2\xc2\x63\xea\x62\x0e\x4c\xb9\xeb\xab\x10\x00\x97\xf9\x70\xd5\x03\x3f\xef\x59\x96\x6f\x46\x11\x93\xb6\xef\x09\xc2\x13\x8d\x5d\xb2\x59\x96\xcd\x46\x2f\x78\xb1\x38\x56\xae\xe0\xff\xe0\x6f\x32\x88\x3b\x4e\xa8\xfb\x9c\xc5\x90\xb1\x29\xc6\xdb\xdf\xc8\x87\x8f\xbf\xbd\xb9\xf9\x60\x72\x8c\x97\x8f\xb6\x10\xdc\xca\xeb\x8f\x37\xef\x6f\xaf\xdf\x90\xdb\x1f\x7f\x7d\x67\x97\x87\x05\x05\x63\xe1\x60\xb6\x1c\x2b\x8c\xe9\x6c\xe5\xad\x99\x43\x6e\x71\xce\xf3\x47\xe3\xa0\xff\x68\xc0\xc4\xc0\x28\xa2\x9e\xa8\xdb\xe8\x8c\x41\xf1\x00\x39\x29\xd0\xd0\x37\x52\x36\x3f\x3f\xf4\x9c\x55\xaf\x1f\x15\xf9\xae\x34\xee\x16\xab\xf9\xac\x69\xfc\xdc\xae\x1f\xbf\x11\x2f\x34\x1e\x3c\x31\xae\xa7\xbc\xd6\x4f\x2c\x40\x90\x68\xbc\x5e\xe6\x87\xb6\xc2\x0e\x9b\x7e\x58\x30\xcf\x5d\x3b\xda\x5e\xa9\x8d\x1e\xb2\xd4\x92\x29\xc0\x75\x37\x8a\x2f\x7c\x0e\x06\x0c\x01\xa2\x5c\x3a\xbd\xeb\xb8\x23\xe0\xf6\xdc\x97\x42\xbe\x61\x6b\xae\x1b\xcd\xd3\x5b\xda\x5e\xbc\xf7\xbc\xa8\xf8\x12\x08\xb9\x1d\x71\x87\x8f\x2c\x49\xc0\x3a\x36\xbd\xd1\xed\x4d\xd8\xbb\xa1\x09\x32\x46\x9b\xb6\x56\xcd\x5c\x6c\x50\x82\x4b\x3f\x07\x23\xa7\xcf\x3d\xeb\xfc\xe5\xe6\xfa\xa7\x9b\xf7\xf6\xfe\x54\xa5\x90\x07\x82\xf6\x22\xba\xbc\xc8\x4e\x47\x98\x10\xda\xc7\x38\xf0\xe7\x2f\x01\x07\x11\x40\xc2\x75\x79\x79\xe9\x67\xa6\xa4\xcb\xf0\x86\xb7\x43\xa3\xa7\x44\xba\x45\x88\xac\xf6\xe3\xe3\xc8\x6a\x66\x4e\x3d\x13\x11\x75\x0f\x2b\xb8\x59\x7c\x6a\x1e\x1c\xa5\x6b\xd4\xf6\x63\x41\xbd\x5e\xd1\x17\x8b\xf3\xf3\x19\xe9\xfe\x82\x1a\x3d\x3a\xde\xb7\xef\xa1\xe0\x64\x66\xab\xdb\xa3\x61\x6a\x38\xe1\x71\x13\xda\x88\x6e\x5e\xbf\xbe\x39\x1f\x6a\xc3\x36\x09\x3c\xbe\x8f\xb2\x2c\xdb\x03\xf1\xa7\x6e\xae\xf3\xe6\x2e\x9d\x7c\x2a\xfb\xe6\x66\xb1\xf7\xd3\xf7\x8a\x80\x4f\x67\xbe\x1e\x83\x43\x25\xd8\xff\x41\x05\xe7\xc7\xd3\x3c\xed\xeb\x43\xf4\x9e\x88\x9b\x96\x6e\xff\x49\x3e\xc5\x18\x70\x65\x42\xd1\x62\x6e\x6d\xc9\xef\x83\x02\xc1\x00\xf4\x97\xb0\x8d\x7a\x98\xcc\x12\x07\x2f\xd3\x38\x34\x23\xff\x8a\x8f\x14\xce\xc8\x4d\xba\xee\x60\xf6\xe0\xb1\x0c\x11\x85\x08\xd3\x5b\xbf\x15\x5f\x38\xe4\xf8\xdd\x7d\x04\xf6\x31\xa3\xd7\x4f\xde\x5e\x89\x03\x61\xb9\xd9\x69\x24\xd7\x87\x7a\x3a\xc1\xe8\xf2\xaf\xff\x37\x62\xf8\x78\xfc\x21\xe1\xdd\x62\x52\x56\xb2\x86\xdc\x6c\x2b\xd8\x1e\xc6\xa2\x79\x10\x45\xdf\x23\x40\x57\x1b\x37\x42\xa8\x96\xd1\x28\xe9\xcd\xf8\xd6\x41\xfe\xb8\xae\x52\x85\xc5\xdc\xc5\xb2\xac\x99\xb8\x29\xf2\x02\xab\xf3\xe3\x2c\x67\xdb\x49\x57\x04\x9e\x1c\x2f\x29\xbf\x77\xbe\x03\x9f\x1d\x26\xc1\xda\x00\x6c\xf2\xa1\x0b\xb0\x87\x7c\xc9\x6d\x57\xb9\xcd\xaa\xa7\xe0\xca\x10\x8b\x9f\x46\x03\x70\xb9\xa3\x82\x18\xed\x0f\xb9\xbe\x85\x9b\xf0\x38\x72\x0f\x35\x33\x01\x77\x17\x19\xbe\xf6\x22\x9b\x7e\x26\xed\xcc\x29\xc1\xd9\x99\x3d\x59\xaf\x96\x5d\xe8\x5a\x16\x0c\x0f\xef\x23\xbc\x92\xd6\x85\xaf\xc8\x3d\x2c\x68\x79\x0b\x59\xa9\x2f\x3f\xbf\x4e\x58\xc5\xd0\xac\x7d\xf5\x0e\xb2\xd4\x4e\xd7\x93\xd9\xea\x9e\xd2\x2d\xa4\x89\xdf\xc7\x1e\x42\xda\x00\xd8\xcf\xe7\x3f\x0c\x15\x0c\x87\x1e\x5b\xe8\x84\x45\x4c\xdf\x14\x4f\x49\xcf\x88\xad\x63\x2e\x74\xf7\xc3\x5f\x07\x52\x09\x17\xfd\x53\xf0\x51\x43\xcf\xf3\x9f\xbd\x67\x79\x5c\x85\x1d\x09\x63\x73\x7c\xbf\x45\x29\xc4\x98\x03\x4e\xe8\xff\x42\x1b\xc7\xf5\xe3\xe8\xb7\x1f\x3e\xde\xbe\xfb\x87\xc9\x8c\x8e\x72\x2e\xd5\x1d\xef\xd0\xa3\x3c\x0f\x57\x0e\xab\xd3\x58\x2f\x55\xc5\x7f\xba\xc3\xb3\x5d\x60\xae\x75\x96\xaa\x71\x0a\x02\xd7\x6d\xd3\x21\x88\xcc\x49\x97\xa6\x58\x9a\x21\xbe\x6b\xc2\x8a\x84\x97\xfc\xc2\x41\xda\xa2\xec\x4f\x27\xa1\xdf\x47\x9a\x2a\xf9\xf6\x26\x03\x8b\x71\xbd\xe7\x69\xc5\x33\x24\xbc\x8d\x88\x06\xea\xd2\xeb\x6d\xdd\xd9\x11\x99\x36\x27\x55\x36\x6d\x68\x8a\xf0\x36\x57\x05\xeb\x29\xfc\x3f\xd4\xc8\xfc\x02\xdc\x45\x0f\x2f\x26\x86\xa3\xc5\xf1\xe3\xd6\x39\x81\xa5\x68\x24\x28\xa4\x3e\x2c\x3d\x8d\xa5\x68\x71\x90\xa5\xc5\xd9\x71\x3f\x7d\xb4\xb4\xc6\x3d\x31\xd7\xab\xf3\xd0\x6d\x7a\xad\x1f\x16\x0e\x79\xee\x21\xec\xd6\x1b\x55\x4f\x48\xc1\xc3\xcb\x51\xfe\x78\xc6\xf0\xe5\x6f\x04\x56\x5c\x3e\x72\x31\xa1\x27\x4e\xe5\xd8\x67\x03\x9b\x72\xc9\x9e\xeb\x2e\xe8\xb5\x36\x92\xb8\xef\xc3\xfe\xb7\x0b\x09\xdf\x94\xcf\x5e\xbf\xbb\x85\x6a\xfb\xd6\x96\xd9\x3c\xc4\x4b\x66\xbb\x86\x96\xbc\x30\xdd\xd9\x48\x12\x35\x82\x02\x54\xf7\x47\xea\x5f\xba\x99\xf3\xfd\xfd\x8e\xed\xb2\x9a\x16\xcc\x4c\xfa\xaa\x12\x01\x78\x73\xff\x30\xaf\xab\x70\x6b\x81\xff\x04\xe3\x45\x70\x7a\x31\x4f\xd9\xfa\xf8\x8a\x74\x63\xa3\xa1\x6f\xd8\x4e\xf8\x9f\x00\x00\x00\xff\xff\xb3\xa0\xd2\x4d\x3e\x39\x00\x00") - -func publicCssStylesCssBytes() ([]byte, error) { - return bindataRead( - _publicCssStylesCss, - "public/css/styles.css", - ) -} - +// publicCssStylesCss reads file data from disk. It returns an error on failure. func publicCssStylesCss() (*asset, error) { - bytes, err := publicCssStylesCssBytes() + path := "D:\\Code\\Go\\src\\github.com\\hacdias\\caddy-filemanager\\assets\\public\\css\\styles.css" + name := "public/css/styles.css" + bytes, err := bindataRead(path, name) if err != nil { return nil, err } - info := bindataFileInfo{name: "public/css/styles.css", size: 14654, mode: os.FileMode(438), modTime: time.Unix(1466709454, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _publicJsApplicationJs = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\x1a\x6b\x6f\xdb\xc8\xf1\xbb\x01\xff\x87\x0d\x71\x00\xa9\x44\x66\xec\x6b\x8b\x02\x75\xe4\x20\x67\xeb\xe0\x43\x1d\x27\x48\xd4\xa2\x80\xe3\x14\xb4\xb8\x92\xb6\xa6\x48\x76\xb9\xb4\xe3\x36\xfa\xef\x9d\xd9\x17\x97\x4f\xc9\x4e\x9a\x0b\x02\x4b\xe2\xce\xcc\xce\x6b\xe7\xb5\xf4\xca\x82\x92\x42\x70\x36\x17\xde\xf1\xfe\xde\xfe\xde\x5d\xc4\x49\x41\x13\x3a\x17\x34\xfe\x4d\xd0\x75\x41\x26\xe4\xea\x5a\x2e\xbd\x7c\x49\xde\x70\x1e\x3d\x90\x9c\x67\x22\x13\x0f\x39\x25\x8b\x32\x9d\x0b\x96\xa5\x44\x64\x84\xd3\x75\x76\x47\x49\x94\x12\x40\x5f\xd3\x54\xec\xef\x49\xf0\xd0\x82\x87\x0a\x64\xaa\x96\x81\xb0\x45\x0f\x34\xca\x88\xfc\x77\x7f\x8f\x20\x0f\x0c\x96\xc5\x8a\x15\x21\x4b\x63\xfa\xe5\xdd\xc2\x42\x00\x2b\x84\x2d\x48\xc0\xc8\xb3\x09\x39\x38\x52\x18\x0a\xb4\xc8\x13\x36\xa7\x01\x1b\x93\x23\x09\xb6\xd9\xdf\xdb\xec\xc4\x78\x9e\x44\xf3\x6d\x9c\x4b\x98\x2e\xd6\xb3\x24\x9e\x26\x63\x92\xd2\xfb\x69\x32\xc0\xbf\x04\x1b\xe0\xfe\x8a\x5d\x03\x8a\xa4\xd2\xe0\xfd\x2c\x9b\x97\x72\xd7\x6e\xf6\x0b\x9a\xc6\x24\x22\xf3\xac\x10\xe5\x9a\xd0\x3b\x84\x84\xc7\x4c\x80\x19\x17\xfb\x7b\x06\xdb\x11\x06\x31\x4e\x25\xf8\xf4\xae\x29\x8d\xa0\x5f\xb4\x15\x62\x83\x18\xb3\x22\x8f\xc4\x7c\x25\x81\x03\xe0\x90\x9c\x96\x85\xc8\x14\xb2\x42\x40\xb9\x06\xd8\x05\x76\x96\x54\x48\x26\xb3\x5b\x46\xe1\x23\x15\x52\xcd\x1d\xcc\x01\xe0\xa9\x82\x72\xd9\x4a\xa3\x35\xad\x94\xcb\xa9\x52\x15\xf9\x40\x97\xd3\x2f\x79\xe0\x05\xaf\xff\x02\xff\x3f\x7f\x0d\x9f\x1f\x7f\xfa\x54\x3c\x1f\x79\xe4\x05\x41\x14\xf8\xf0\xf0\xc1\xa7\x4f\x13\xfc\x08\xae\x3e\x1f\x5f\x3f\x1f\x85\xcf\x7f\x1a\x7d\xfd\x0c\x7f\x3d\x69\x0f\x4e\x45\xc9\xd3\x4a\x5e\xc5\xa4\x31\x79\xc0\xe9\x98\x78\x3f\x1d\x79\xae\x8c\xa7\xab\x28\x5d\xd2\x02\x24\xba\x29\x85\x50\x76\x10\x2b\x4a\x92\x2c\x8a\x59\xba\x04\x57\x62\xeb\x08\x39\xdf\xdf\xd3\x2e\xe3\x48\x38\x97\xc8\xb3\xec\x42\x03\xbb\x72\x2a\x19\x13\x50\x16\xb5\xae\x86\xde\x71\xac\x9f\x66\x9c\x2d\x59\x1a\x25\x33\xd0\x3a\x2c\x69\x20\x70\xb2\x94\xf2\xf3\xd9\xdb\x0b\x79\x50\xed\xe3\x42\x3c\x24\x34\xcc\xf2\x68\xce\xc4\x03\x80\x1f\xaa\xe5\x82\x8a\x19\x5b\xd3\xac\x14\x41\x73\xe7\x36\x45\x40\xf3\x5f\x31\x32\x4f\xa2\xa2\x98\x78\x20\x15\xe5\x2c\x4a\x0e\x18\xd8\xb0\x20\x45\xce\x52\xef\x24\x2a\x45\xc6\x29\xd8\xe3\xd5\x4b\x76\xe2\x1f\xbb\x64\x9a\x1c\x1c\x49\xdf\x1e\x93\x9f\x0f\x0f\x47\x8a\x19\xad\x7d\x57\xb0\x2e\x45\xdb\xb3\x89\xaa\x8e\xb3\x94\xee\xa6\xe3\x33\x84\xac\x05\x1a\xce\x33\x3e\x26\x2b\xb1\xd6\x87\x55\x45\x8e\x6e\x45\xa1\xc6\x61\x9d\xc7\x1f\x05\xcd\xe1\x31\x28\x69\x72\xe2\x04\x1c\x57\x49\x48\xf1\xb8\x0a\x45\x1d\x72\xe3\x22\x9e\xfd\x5a\x78\x0d\x13\x9a\x2e\xc5\x8a\x4c\x60\x53\x6d\x82\xca\x13\x1b\x07\x35\xf0\x95\x58\xf1\x81\x21\xe1\x4b\x07\xc6\x60\x41\x36\x96\xe3\x82\x82\x6d\xfa\x58\xee\x92\x94\xb8\x1e\x61\xe5\xb5\x46\x72\x48\x2f\x18\x2f\x44\x9b\x32\x4a\x25\x15\x6b\x24\x68\x69\xa7\xd7\x85\xbc\x93\x79\x92\x15\xb4\xf2\x9c\x0d\x18\x1a\x72\xd2\xe3\xe9\xa0\x53\x38\x64\x94\xbe\x07\x8d\xe1\x48\x5d\xe9\x0c\x92\xc7\x61\x4d\x6e\xf7\xb4\x18\xf1\x2b\xdd\x68\xf7\x5d\x44\xc0\xb4\xe3\xb7\x2a\xb0\x2e\x32\x0e\xee\xba\x5c\x26\x78\xcc\x31\x3e\xac\xb3\x98\x92\x6c\x41\xee\x18\xbd\x57\xb9\x16\xbf\xb5\xa3\xb0\x8c\xe2\x55\x2c\x98\x9b\x80\x68\x3d\xc3\x46\xc9\xc0\x47\x0a\x07\x09\x2b\x84\x72\x06\x84\xc7\x5f\x2a\xb2\xb8\x08\xfa\x94\xfc\xf2\xf0\x5b\x1c\xf8\x1a\xc4\xd7\xa7\x10\x2d\xa8\x77\x81\xc4\xe4\x0b\x5e\x52\x5f\x1b\xb3\x11\x17\xd1\x08\x76\xcb\x89\x04\x94\xba\x72\xcc\x36\x88\x21\x35\xe5\x57\xea\x05\x8f\x8e\x13\xfa\x77\x58\x9f\xc1\xc1\x0d\xb6\x48\x38\xa4\xf3\x73\x49\xa9\x90\x8a\x46\x14\x22\x73\x8f\x3a\x32\x4a\xd9\xf5\xbd\x6a\x1a\x47\x84\x0b\xd8\xa2\x52\xfa\x23\x95\x28\x71\x74\x36\x18\x40\xc1\x7d\x5c\xa5\x9b\x7d\x31\x00\x78\xa8\x4d\x4f\xab\x5d\xd3\x0e\xa5\xb7\x23\x44\x18\xc5\x7a\x4b\x7d\xea\xd5\x66\xbb\x1e\x0f\xdc\xe8\x9f\xe0\x7f\x65\xe2\x9c\x92\x86\x26\xb5\x49\x9e\x40\x18\xd9\xb2\x64\xdb\xac\xab\xc2\xcf\xe5\x7e\x07\x1b\x66\x39\x05\x00\x96\x50\xa3\x56\x79\x2a\x94\x25\x71\x6d\xf0\xd8\xf4\x05\x5a\xad\xdd\x7b\x28\xcb\xb2\xfb\x10\xc9\xd4\xc1\xae\x0e\xaf\xa1\x68\xf0\x5f\xf3\xe8\x5e\x39\xf7\x68\x40\x51\x2e\x15\xfd\x3d\xc9\xe6\x32\x29\x75\x10\xd9\x41\xe4\x9b\x68\x7e\xdb\x21\x2d\x3e\x1e\x94\x56\x56\x9c\xba\x5a\xef\x70\xbd\xe2\x97\x87\x53\xb4\xc5\x25\x94\x44\x81\x8f\x80\x8a\x23\x55\xe5\x2e\x78\xb6\x0e\x24\xf6\x28\x84\x88\x35\x8d\xe6\xab\x00\x22\xd6\xad\x0d\xef\xf8\xa3\xc3\x98\xf5\x24\xb4\x91\x7f\x7b\x5a\x07\xc9\x20\xd5\x12\x34\x2b\xc8\x9e\xac\xd6\x53\x7f\x2a\xa9\x77\xd4\x67\x0c\x14\x45\x97\xff\xa8\x85\x6f\xf1\x20\x47\x77\x35\xa8\x1e\x1d\xca\xf0\x80\x35\xc2\x40\x70\xf0\x14\x57\xde\xa8\x59\x22\x06\xca\x09\x25\x0d\x4e\xff\x5d\xd2\xc2\xe8\xf1\x1f\x6f\x2f\xce\x85\xc8\x3f\xa8\x87\x81\x0e\x2c\xc4\x40\x29\xd7\xf4\xcf\xa6\x17\xd3\xd9\xd4\x1f\x4b\x4b\x6a\x5a\x06\x02\x6b\x8c\xa0\xf1\x2c\x4b\x39\x8d\xe2\x87\x42\xc0\x51\x57\xac\x74\x14\xa9\x44\xe5\x7d\x83\x23\x31\x3e\x22\x06\x86\xb2\x3f\x5a\x98\x1a\x10\x52\x2c\x0b\x04\xc0\xfc\x69\x41\x7a\x35\x22\xf9\x35\x0e\xa7\x99\x84\x7f\x18\x78\x32\x48\xe9\x49\xb6\x6c\x28\xdf\x82\xd4\x2d\x57\x6b\x3c\x03\x47\x0b\xb6\x50\x18\x60\xc2\x57\x66\xf1\x47\xb5\xaa\x32\x68\x0a\xf5\x4c\x09\xa5\x6b\x4b\x4d\x7e\x23\x3f\xe4\xdf\x8d\x31\x4e\x77\x2c\xd9\xc9\xb6\x7d\x76\x6d\x04\x9f\x1a\x68\x65\xe0\xc7\x99\x77\x07\xe3\x6e\x37\x6d\x83\xb1\x10\x0e\xf2\x4a\x36\x66\x13\xe8\xdd\xd0\x26\x17\x51\x21\xce\x18\x07\x5b\x65\xfc\xe1\x7d\xc4\x05\xb4\xca\x7d\x48\x5a\xa9\xc6\x62\xdf\xdf\x5e\x55\x1d\xdd\x13\x5b\xde\x73\x15\xc4\xce\xe8\x22\x2a\x13\xe1\x46\x94\x5c\x2d\x99\x95\x9e\xa0\x22\xbf\x86\x75\xd8\xc0\xed\x2c\x3f\x50\xa9\x1e\x99\xf6\x1c\xea\x5c\x3e\xfe\xd1\xf1\x0a\x93\xc2\x40\xbc\x72\xce\x91\xec\x3b\xf2\x08\x4b\x1f\x44\xaa\xe7\x9e\x59\xb4\x54\x99\x07\x21\xfc\x11\xa4\xd8\x0a\x49\x3b\x03\xae\x34\xbb\x58\xa2\x48\x41\xd9\x23\xe5\xc6\xdc\x03\x4d\x26\x87\x7c\x91\xb0\xf9\x2d\x78\x7d\x5d\x8d\x9a\x13\x89\xa3\xcf\x7b\x37\x1a\x42\x9c\xe2\xf7\xa9\x4d\x25\x44\x31\x00\xa5\xfe\x1b\x21\x38\x83\x7c\x01\xdc\xea\x29\x05\x8d\x99\x88\x6e\x12\x0a\x98\xbe\x53\x11\x28\x8c\x05\xa8\xa6\xa8\xc2\x2e\x4a\x74\x4b\x1f\xce\xb2\x7b\x5b\x9d\x18\x13\x59\xc5\xaa\x6e\x49\xfa\x01\x80\x9e\x62\x47\x00\x87\xe6\xe8\x0f\x55\x38\x94\x7a\xa1\xf7\x97\x3d\xaa\xb1\x30\x5b\xd2\x89\xaf\x9c\xc6\xef\x4d\x27\x3b\x26\x14\x09\x59\x0f\x3c\xef\xdf\xcc\x4e\xcf\xeb\xf9\xc4\xcd\x28\x42\xa3\x9f\x43\xd8\x40\xcd\x2b\xa7\x3e\x98\x65\xfe\xd8\x08\xd6\x81\x55\xe5\xa1\xc7\x67\xa2\x1d\x73\x51\x67\xc8\x7a\xd6\xcc\x46\xa4\xa1\x73\x54\x0d\xb0\x6c\x73\x4b\xbd\x47\x75\x4d\x76\x21\x8f\x90\x2a\x98\xcc\xfc\x08\x51\xdb\x62\x1b\x4f\x65\xb1\x52\x3c\x62\x3a\x6b\xcd\xf4\xe5\x4e\x1f\xe5\xb9\x1b\x1b\x24\x97\x62\x9b\x6d\xb5\xab\xc3\xb9\xcd\x76\x03\xf1\xb3\xe5\x37\xbb\xe7\x3b\x93\xf1\xec\xa7\xdd\xb0\xf2\xfa\xbf\x56\x5e\xff\xf3\x9f\x2b\xb5\x0f\xe9\xbc\x83\x4a\xed\xec\x90\xaf\x5f\x49\xeb\x71\x8b\xf8\xd6\xe3\xad\x7a\x53\x2b\x8b\x44\xea\x0c\x25\xb0\x0b\x64\xa8\x14\x70\xdc\xd3\x6e\x11\xb7\xc7\xa0\xce\xd0\xb5\x35\xe0\x75\x46\x2e\xd2\x9f\x54\x6a\xaa\x6b\x96\x1d\xd5\x92\x94\xb3\xbd\xeb\xa0\x90\x3d\x38\x37\x49\xc9\x01\xa1\x1d\xf4\x86\xac\xfb\x14\xe3\x3c\xd5\x36\x4f\x34\xcd\x46\x17\x08\xc3\x35\x5c\x4f\xd5\x80\x4c\xe0\x64\xb8\x95\xd5\x63\xbd\xf0\xff\xcd\xeb\x2a\x8b\x1b\x4b\xb8\x3d\xab\x5c\x79\x41\xbc\xd7\x86\x91\x89\x9a\x40\x54\xb2\x3e\xad\xf3\xed\x24\xd8\xa5\x9c\x6a\x28\xf3\x2b\xc3\x9e\xcd\x55\x01\x2a\xab\xa8\xc6\x31\x5b\x47\x2b\x5e\x99\xe3\x8e\x9e\x1d\xc6\xe8\xf4\xa8\xa7\x19\x9d\x39\x10\xc1\xe2\x48\x44\x3a\xf9\xfd\x9a\xf1\xf5\x19\xfc\x34\x09\x1d\xe7\x77\x81\x2c\x84\xe4\xa4\x14\x3e\x5e\x49\x1b\x1a\x13\xc0\x93\x17\x2f\xcc\x98\x0c\xf0\xc2\x28\xcf\x31\x8d\x49\x98\x2b\x76\x1d\xaa\xd8\x6f\x7e\x8e\xbe\xad\xda\x7f\xff\xee\xe3\xac\x5d\xeb\xd7\xab\xe3\xde\x1c\xec\xfd\x4d\x69\x67\x6c\xa6\x4c\xad\x16\x01\x05\xf8\xbd\xda\x04\x2b\x0c\xa7\xc8\x65\xd0\xa8\xf4\x1b\x26\xfc\x3e\xe5\x3c\xfa\x5e\x6f\x0f\x52\x93\xb4\xe4\xce\xc5\x5e\xc4\x39\x2c\xc2\x23\x79\xdd\x28\x02\xff\xa5\x8a\x49\xf0\x3c\xcc\xb3\x3c\x70\x7d\x3d\xc0\x87\xff\xca\x58\x2a\xa1\x6c\x99\x6f\x3d\xb8\x15\x3f\xbd\xe6\x28\x04\xec\xd5\x3b\xf0\x11\x59\x96\xdc\x44\x7c\xe8\x48\x68\x10\x65\x6d\xf7\x6a\xf7\xb2\x5c\xdf\x50\x44\xed\x8a\x2c\xca\xf9\x7b\x89\x1a\x94\x83\x54\x12\xf1\x46\xb5\xb8\x5e\xdf\xa1\x1a\x74\xd6\x9f\x9b\x8b\x4f\xc5\x5f\x63\xc8\xe9\x41\xfd\x01\x41\x5f\x1d\xe5\xfd\xc6\xad\x89\xe6\xfc\x84\x1c\xb5\xae\x4b\x9a\x8c\xe2\xb1\xc1\x61\x4a\x9d\x78\xcc\x8a\x8a\xfa\x10\xba\x2a\x83\xb6\x12\xd8\xf4\xf2\x88\xa5\xc9\xe3\x99\xd4\xd3\x8e\x6f\xe2\xb3\x87\xc6\x66\x28\x79\xb5\x6d\x61\xa8\xb8\xe6\x68\x1d\x25\x65\x23\x33\x80\xac\xaa\x93\xa1\x51\x25\x9c\x1e\x73\x3d\xde\xdd\x28\x46\xb2\x4b\xc4\x45\xa7\x26\x58\x71\xba\x70\x47\xe7\x9d\xf7\x68\xcf\xe4\x3d\x5a\x7f\x45\xd4\x46\x34\x17\xf4\xf2\x94\x4f\x9a\xef\x14\x34\xc6\xef\x8d\x8b\xb7\x3a\xa5\xbc\x2c\x56\x92\x8c\x54\xaa\xd3\x23\x34\x28\x75\x0f\x50\x07\x47\x56\x96\xea\x0f\x9d\xa6\xe2\x3e\x18\x9a\x13\xf6\x1f\x0a\x79\x91\x0a\xb6\x6e\xdc\xa6\x42\x4d\x8a\xea\x1b\x43\xf8\xab\xaa\x15\x1a\xe2\x4b\x01\xa7\xaa\x84\x03\x95\x42\xb8\x04\xa0\x05\x4b\x69\xac\x55\xab\x36\xd3\x02\x49\x71\x74\x1b\x44\x70\x9b\x80\x36\x2c\x1f\xeb\xbd\xf5\xfd\x8f\x7c\x81\xa2\xb8\x8c\x2e\x83\x78\x64\xb2\x6f\x1d\xdd\xd9\x5f\xe9\xb6\x03\xc5\x61\xc2\x64\x0a\xd2\xe0\x9c\xc4\xa1\x80\x82\x01\x14\x40\x3f\x02\x33\xba\x6a\xd8\x16\xc3\xcf\xde\xbd\xd5\x14\xb0\xd6\xd8\x12\xc3\x41\x2a\x75\xfd\x43\x9a\xaf\x9c\x14\xf8\x32\x4b\x08\x7b\x27\x41\xf7\x48\xdf\x9c\x16\x0f\x89\x78\x4a\x35\x86\x5e\x35\xd4\x69\x98\x4f\x9f\x9f\x1f\x70\x61\xf0\xa8\x36\xc6\x14\xd6\xdb\xc2\x64\x47\xc6\x44\x42\xa0\x62\x7b\x23\x64\x5d\xa4\x97\x16\x5e\xa7\x78\xa3\xe6\xf5\x66\x37\xd4\xc0\x8e\xf6\x56\x66\x84\x02\x6c\xdd\x15\xef\xc9\xec\xae\xdb\x6f\x3d\x3d\x7b\xeb\xa9\x4d\xdb\xcf\xa9\xa2\x3c\xc0\xa9\xbd\x64\xde\x8d\x53\x53\x48\x6f\xd3\x90\x81\x1b\xd8\xb9\xd5\x08\x6e\x21\x76\xc0\xd2\xbc\x14\x32\x97\x01\x81\xc0\xed\x44\x36\x43\xee\x61\x6f\x4e\xfa\x59\x71\xae\x7c\xea\x11\xb1\x45\x4b\xf7\x2e\xc3\xd4\xdc\xd6\x4d\x3b\xaf\x2a\xea\xf5\x44\x73\x6b\xba\x36\x66\x50\xbf\xab\x51\x85\xfa\x3d\xb0\xb5\x33\x0b\x76\x72\xc2\xa0\x45\xf5\x8d\x6c\xdb\xa4\xed\x5d\x62\x1e\x2d\x21\xf1\xf0\xbe\xa8\x35\x38\x6e\xd8\x8c\x55\x02\x31\x85\xdb\x6e\xfb\xb4\x9c\xa4\x3f\xcc\xc8\x0e\xba\x9a\x2a\xe0\xcf\xf6\x2b\x2d\xe1\x9f\xea\x4d\xfb\xe3\x98\x4a\x68\x74\x47\xbf\x3f\x57\x47\x4f\xe7\x29\xcb\x9f\x64\x0c\x95\x57\xe5\x6b\x62\x12\x08\x1b\xbc\x19\x8f\xd2\x62\x21\xeb\x72\x0d\xb0\xd0\x8d\x77\x0c\x39\x03\xbf\x6a\x86\xdc\xb6\x5c\xb7\xe2\x2d\xc6\x7b\x9a\x2b\x5c\xfa\x5f\x00\x00\x00\xff\xff\xf6\xda\xeb\x14\x58\x2a\x00\x00") - -func publicJsApplicationJsBytes() ([]byte, error) { - return bindataRead( - _publicJsApplicationJs, - "public/js/application.js", - ) + fi, err := os.Stat(path) + if err != nil { + err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err) + } + + a := &asset{bytes: bytes, info: fi} + return a, err } +// publicJsApplicationJs reads file data from disk. It returns an error on failure. func publicJsApplicationJs() (*asset, error) { - bytes, err := publicJsApplicationJsBytes() + path := "D:\\Code\\Go\\src\\github.com\\hacdias\\caddy-filemanager\\assets\\public\\js\\application.js" + name := "public/js/application.js" + bytes, err := bindataRead(path, name) if err != nil { return nil, err } - info := bindataFileInfo{name: "public/js/application.js", size: 10840, mode: os.FileMode(438), modTime: time.Unix(1466691163, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _templatesActionsTmpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x84\x8f\x31\x6e\x85\x30\x10\x44\x7b\x4e\xb1\x72\x9f\x70\x01\x43\x95\x26\xa7\xb0\x2c\x76\x90\x56\x32\xeb\x08\x5b\xa1\x40\xdc\x3d\x06\x82\xfe\xa7\x00\x2a\x17\x33\x7e\x6f\x67\x9e\x89\xd1\x8b\x82\x8c\xef\xb2\x44\x4d\x86\x96\xa5\x22\xcb\xf2\x4b\x5d\xf0\x29\x35\xff\x81\x21\xe1\xc6\xc4\x1f\xa8\x69\x2b\x22\x2b\x47\x3c\xf8\x8c\x51\x7c\xf8\x90\x6e\xfd\xde\xae\x15\x27\xea\x14\x93\xad\xa5\x74\x6d\x5d\x60\xe5\x2d\x2e\xe9\xe9\xf3\x3b\x7d\xc9\xb8\x49\x2e\x2d\x23\xd4\x0f\xd8\x3c\x37\xa2\x21\x32\x1c\x58\xf2\xae\x79\xf7\x40\xf9\x76\x06\xc7\x49\x43\xf4\xfc\x30\xa5\x97\x00\x77\x74\xcf\x63\x2e\xc9\x08\xc8\x78\xe0\xee\xa5\x13\xf0\x75\xf4\x5f\x00\x00\x00\xff\xff\x48\xd7\xb4\x16\x93\x01\x00\x00") - -func templatesActionsTmplBytes() ([]byte, error) { - return bindataRead( - _templatesActionsTmpl, - "templates/actions.tmpl", - ) + fi, err := os.Stat(path) + if err != nil { + err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err) + } + + a := &asset{bytes: bytes, info: fi} + return a, err } +// templatesActionsTmpl reads file data from disk. It returns an error on failure. func templatesActionsTmpl() (*asset, error) { - bytes, err := templatesActionsTmplBytes() + path := "D:\\Code\\Go\\src\\github.com\\hacdias\\caddy-filemanager\\assets\\templates\\actions.tmpl" + name := "templates/actions.tmpl" + bytes, err := bindataRead(path, name) if err != nil { return nil, err } - info := bindataFileInfo{name: "templates/actions.tmpl", size: 403, mode: os.FileMode(438), modTime: time.Unix(1466630275, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _templatesBaseTmpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x57\x5d\x6f\xdb\x36\x14\x7d\xf7\xaf\x60\x89\x01\x7e\x58\x2d\xba\xfb\x78\x09\x24\x0f\x58\xd2\x61\x05\xda\xad\x68\x36\x0c\x7b\x32\x68\xe9\xca\x62\x4a\x91\x1a\x49\x39\x31\x0c\xff\xf7\x5d\x8a\x92\x2c\x25\xfe\xea\x86\x02\x01\x2c\x51\x97\xe7\x5e\x9e\x7b\x78\xc8\xc4\xaf\xee\x7e\xbf\xfd\xe3\xef\x8f\x6f\x49\xe1\x4a\xb9\x98\xc4\xe1\x87\xc4\x05\xf0\x0c\x7f\x49\xec\x84\x93\xb0\xd8\xed\xa2\xdf\x78\x09\xfb\x7d\xcc\xc2\x80\xff\x54\x82\xe3\x44\xe1\x70\x42\x37\x02\x1e\x2b\x6d\x1c\x25\xa9\x56\x0e\x94\x4b\xe8\xa3\xc8\x5c\x91\x64\xb0\x11\x29\xcc\x9a\x97\xd7\x44\x28\xe1\x04\x97\x33\x9b\x72\x09\xc9\x9b\x68\x4e\x1b\x20\x29\xd4\x67\x52\x18\xc8\x13\x5a\x38\x57\xd9\x1b\xc6\x72\x84\xb1\xd1\x5a\xeb\xb5\x04\x5e\x09\x1b\xa5\xba\x64\x02\xc1\x7f\xca\x79\x29\xe4\x36\xf9\xc0\x1d\x18\xc4\xfa\xf6\x1d\x0e\x5a\x4a\x0c\xc8\x84\x5a\xb7\x95\x60\x0b\x00\xf7\x1c\x78\x7a\x16\x38\xb5\xb6\xc3\xfd\xa4\x57\xda\xe9\x9b\x1f\xe6\xf3\xd7\x3f\xce\xe7\xd3\x06\x77\x7a\xc0\x9d\x12\xb7\xad\x20\x99\x3a\x78\x72\x7e\xda\xf4\x90\xe7\x79\x05\xed\x8a\x76\x3b\x12\xdd\x6a\x95\x8b\x75\xf4\x33\xb7\xf0\xe7\xa7\xf7\x64\xbf\x67\xcb\x5c\x48\x28\xb9\xe2\x6b\x5c\x05\x32\x66\x14\x97\x1e\x8f\x05\x80\x08\x1f\xc3\x12\x6c\x6a\x44\xe5\x88\x35\xe9\x17\x41\x3d\x58\xc6\xab\x4a\x8a\x94\x3b\xa1\x55\xf4\x80\x68\x31\x0b\x58\x1e\x16\x91\x44\x4e\x14\xf4\x78\xf7\x3e\xed\xbd\xaf\x9b\x50\x8a\xa8\x18\x83\xb9\xfd\xa0\x0f\xf7\x13\x5e\x46\xb6\x51\xac\x0f\x43\x54\x50\x59\x98\x1d\x32\x74\x93\x7e\xad\xd7\xfa\xad\xe2\x2b\x09\x59\x07\xfe\x6a\x36\x23\x7e\x98\x54\xb2\x5e\x0b\x45\xac\xab\xf3\x9c\xcc\x66\x4d\xbe\xff\xc2\x68\x81\x60\xe7\xa8\x1c\x73\xd9\xe9\x21\xcd\xd4\x03\xc6\x48\x5d\x67\xb9\xe4\x06\x1a\x3d\xf0\x07\xfe\xc4\xa4\x58\x21\x89\x29\xb0\x37\xd1\x77\xd1\xf7\xfe\xe9\x05\x8d\x57\xb5\x67\x54\xd7\xe5\xbe\x74\x0c\xc6\xac\xdd\x83\xf1\x4a\x67\xdb\x46\x0b\x7e\x00\x4c\x48\x9c\x89\x4d\xd7\x19\xf2\x8d\x44\xb2\x6e\x12\x12\x7d\x34\xb8\xdd\x74\x6d\xdf\x7b\xf6\x02\xcf\x87\x56\x37\x51\x94\xb6\xc3\x24\xe6\x07\x3a\x31\x00\xfe\x69\x03\x08\xf3\xfd\x67\xbb\x1d\x48\x0b\xf8\x14\x45\x0c\xff\xb0\xff\x43\xf0\xfd\xbe\xaf\x34\x70\xdb\x96\x44\x52\xc9\xad\x4d\x28\x4f\xfd\xf2\x28\x11\x59\x42\x2b\x9c\xd7\x07\x91\x58\x74\x31\x65\xbb\x83\x67\xa2\xd9\xc1\x0b\x5b\xaf\x32\x61\x20\x75\xda\x6c\x97\xdc\x18\xfd\xb8\x94\x90\xbb\x98\x89\x3e\x03\xeb\x57\x8d\xcf\x7c\xe1\x6b\x08\x45\x4e\x4e\x54\x40\x32\x61\x1b\xd5\x1d\x29\xe5\x7f\x54\x32\x28\x64\xa8\x79\xfc\x50\x2d\x4e\xb1\xfb\x5c\x1a\x94\xb4\x3c\x77\x6b\x38\x2a\x9f\x97\x34\x9f\xdb\x58\xfe\xed\x00\xf8\x0b\xfa\x02\xf9\x10\x8c\x61\x5c\x66\xc3\xde\x84\x8c\xe4\xd1\x18\x3c\xa1\xac\x17\xc8\x19\x82\xd2\x02\x36\x46\xab\xa5\x11\xeb\x62\xd8\x20\xbf\x84\x06\xc6\x1f\x14\xd5\x11\x82\x0e\xc4\x8d\x04\xec\x17\xf4\xce\xde\x09\xd3\xd7\xe7\xdd\x21\xce\xb5\x29\xaf\xe8\x16\x70\x93\x16\x43\x99\x08\x55\xd5\x2e\x18\x35\xf5\x46\x4d\xd1\x63\x70\xfb\x16\x5a\xe2\xf6\x49\xe8\x7d\x33\x21\xd8\x2b\x6b\x72\x74\xb6\x73\x5a\xc4\xfe\x80\xbb\x42\x39\x3e\x6c\xe9\xb7\x29\xfa\x17\x1c\xd5\xcb\xc9\x0c\x75\x25\x35\xcf\xae\xc8\xe1\xed\x7e\x19\xa2\x8f\x67\x78\xbe\x2d\xf0\xdd\x41\x89\x14\x38\xec\x6f\x48\x89\x07\x66\x34\x30\x88\xb6\x41\x93\x4b\xfa\x1a\x34\xe7\xa4\x75\x8f\xb5\x7f\xc4\x10\x2d\x38\x27\xd4\xda\x9e\x33\x8e\x6b\xec\xa2\x85\x39\xe3\x0f\xe7\x09\x97\x7a\xad\x6b\x77\x05\xe1\xf0\x24\xdc\xd2\xe9\x25\x1a\xf7\x65\x0b\xe8\xc7\x83\x7f\x7b\xbb\x9e\x8c\x35\xde\x05\xfa\xb2\x7c\x1d\x4e\x6b\xb9\xe2\xa6\x2d\x24\xbe\xac\x94\x15\x4f\x3f\x5f\x51\x76\x30\x2e\x1f\x7c\x42\x88\x55\x8f\x61\x2b\xae\x1a\x68\x0b\x12\x6d\x0f\xb2\x99\xaa\xcb\x15\x60\x4d\x73\x3c\x9d\xf0\x63\x17\xd9\x7d\x8f\xfa\xed\x3d\x40\x8c\x47\x12\x3c\x27\xb9\x81\x0d\x74\x4f\x43\x12\xe3\x92\x8b\x90\x72\x84\xd3\x5e\x2d\x11\xe7\x8e\xe3\xcd\x33\x84\xb2\x2e\x16\xdd\x42\xbb\xf6\x74\xbc\x07\xb3\x41\xc1\x3e\x0a\x57\x4c\x82\x20\x9b\xab\x84\xd2\xba\x02\x05\x86\x28\x8d\xfa\x04\x63\x70\x85\xcf\xee\x9d\x29\xcf\xb2\xad\xf5\xd3\x8d\xbf\x09\xd0\xc5\xad\x1f\xe8\xc4\xc4\x55\xf6\x85\x78\x6b\x2c\xa1\x5e\x35\x97\x8a\x82\xa7\x99\xe0\x36\xa4\x98\x0d\x2e\x6d\x74\x31\x74\x6a\x9f\x2b\x9a\x5c\xd8\x88\x7f\x21\x2c\xe1\x04\x6f\x2c\x1b\x5d\x1b\xa2\xf3\x09\xf9\x1a\x75\xf9\xa4\x4d\x3d\xa3\xee\xb0\x9e\xe9\x98\x85\xbb\x09\x6a\xbd\xf9\xbf\xe1\xdf\x00\x00\x00\xff\xff\x85\x0c\x0d\x9e\x4f\x0c\x00\x00") - -func templatesBaseTmplBytes() ([]byte, error) { - return bindataRead( - _templatesBaseTmpl, - "templates/base.tmpl", - ) + fi, err := os.Stat(path) + if err != nil { + err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err) + } + + a := &asset{bytes: bytes, info: fi} + return a, err } +// templatesBaseTmpl reads file data from disk. It returns an error on failure. func templatesBaseTmpl() (*asset, error) { - bytes, err := templatesBaseTmplBytes() + path := "D:\\Code\\Go\\src\\github.com\\hacdias\\caddy-filemanager\\assets\\templates\\base.tmpl" + name := "templates/base.tmpl" + bytes, err := bindataRead(path, name) if err != nil { return nil, err } - info := bindataFileInfo{name: "templates/base.tmpl", size: 3151, mode: os.FileMode(438), modTime: time.Unix(1466709475, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _templatesListingTmpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8c\x53\xc1\x8e\xd3\x30\x10\xbd\xf7\x2b\x46\x3e\x20\x38\xa4\x71\x0b\x0b\x52\x49\x7b\x42\x08\x24\x16\x21\xd8\xbd\x70\x59\x0d\xf5\x64\x3b\x92\xe3\x44\xb6\x53\xa9\x44\xf9\x77\xc6\x49\x9b\x6d\x17\xd0\xee\x29\x33\xe3\xf7\xde\xbc\x97\xc4\x5d\x07\x86\x4a\x76\x04\x6a\x5b\xbb\x48\x2e\x2a\xe8\xfb\x19\x14\x86\xf7\xb0\xb5\x18\xc2\x5a\x59\x0e\x91\xdd\xbd\xda\xcc\xe0\x62\x9e\x08\x28\x54\xaf\x80\xcd\x25\x0c\xba\x2e\x03\x8f\xee\x9e\x60\xfe\x39\x52\x15\x92\xe6\x25\x9b\x65\xac\xc0\x60\xc4\xcc\xb0\x5f\xab\xc4\xe0\x52\xe0\xe1\x03\xfb\xbe\x8f\xbe\x25\x31\x47\x36\x90\x18\x2a\x51\x9e\xa9\x75\x46\xba\x71\x5f\xd7\xcd\x6f\xbf\x7f\x91\x6e\x58\x38\x68\x8f\x15\x14\x08\x3b\x4f\xe5\x5f\x90\xd1\xd6\xd9\x92\xe3\xb4\xe0\x93\xa9\x0a\x23\x79\x46\x9b\xb1\x84\x0b\x6a\x53\xd6\xd6\x90\x2f\x72\x3e\x17\x48\x9e\x9e\xc1\x65\x17\xc8\xc7\x3b\xe3\x79\x4f\x77\x25\x5b\x7a\x2c\xe3\xcc\x49\xa5\xc8\xf1\x18\x22\x9f\x52\x3c\x2b\x4f\x11\x1a\x74\x27\x03\x0e\x2b\x52\x1b\xc1\x7c\x95\xa2\xef\x8b\x3c\x1d\x3e\x91\xbc\x19\xbf\x40\xed\x25\xe6\x5a\x65\x0b\xb5\x79\x51\x19\x0c\xbb\xf7\x45\xde\xfc\x3f\xf3\x25\x4b\x36\xfe\xe0\xdf\x94\x6c\x49\xf9\xa9\xad\xd0\x8d\xfd\x63\x8d\x87\xc0\x49\xe2\xe8\x7a\xc7\x86\xf0\x97\xa5\x29\x13\x14\x91\x2b\x4a\x1b\x28\x15\x83\xfe\x20\x7a\x5d\x9b\x9b\x74\xa2\x60\xa9\xf5\xdb\x4c\x2f\x32\xbd\xbc\x59\x5c\xad\xf4\x9b\x95\xbe\xfa\xa9\xce\xf7\x4f\x50\xbd\xc8\xf5\x32\x4f\x78\xd0\xaf\x47\x24\x7c\xbb\x86\x4c\xbf\x5b\x69\xad\x92\xc5\xb4\x63\x7a\x9d\x93\xe1\x7f\x7c\x91\x87\xea\x3c\xcc\x69\x7a\x7c\xce\x0a\x76\x4d\x1b\x21\xc4\x83\x15\xeb\x86\x43\x63\xf1\xb0\x72\xb5\x23\x05\xf1\xd0\xc8\x2c\xfd\x0a\xe3\x1f\xdc\x36\xb6\x46\x93\x0d\x0c\x05\xb5\xdb\xee\xd2\x8d\x91\x57\x82\xce\x58\xfa\x28\xb8\xf0\x32\xee\x38\xcc\x13\x25\xbc\x52\xb0\x47\xdb\xca\xf9\xed\xc0\x53\x50\xb5\x36\x72\x63\xc5\xfe\x74\x35\x66\x7f\x02\x00\x00\xff\xff\x8d\x29\x85\x33\xd1\x03\x00\x00") - -func templatesListingTmplBytes() ([]byte, error) { - return bindataRead( - _templatesListingTmpl, - "templates/listing.tmpl", - ) + fi, err := os.Stat(path) + if err != nil { + err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err) + } + + a := &asset{bytes: bytes, info: fi} + return a, err } +// templatesListingTmpl reads file data from disk. It returns an error on failure. func templatesListingTmpl() (*asset, error) { - bytes, err := templatesListingTmplBytes() + path := "D:\\Code\\Go\\src\\github.com\\hacdias\\caddy-filemanager\\assets\\templates\\listing.tmpl" + name := "templates/listing.tmpl" + bytes, err := bindataRead(path, name) if err != nil { return nil, err } - info := bindataFileInfo{name: "templates/listing.tmpl", size: 977, mode: os.FileMode(438), modTime: time.Unix(1466690774, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _templatesSingleTmpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x7c\x90\x41\xce\x82\x30\x14\x84\xf7\x3d\xc5\xa4\x07\x80\x0b\x14\xfe\xc5\xbf\x75\x65\xf4\x00\x0d\x7d\x90\x97\x40\xc1\xb6\x68\x0c\xe1\xee\xb6\x85\x60\x5c\xe8\xf2\x0d\xf3\x7d\x61\xba\x2c\x30\xd4\xb2\x25\xc8\x66\xb4\x81\x6c\x90\x58\x57\x21\xa0\x06\xcd\x16\x4d\xaf\xbd\xaf\xf2\xa7\x78\x92\x93\xb5\x00\x22\xc3\x2d\xe8\x86\xe2\xf2\x9c\x22\xc8\x83\xee\x28\x63\x00\x14\x0f\x1d\xbc\x6b\x2a\x19\x6b\xc5\xf5\x7c\x8a\xf9\x9f\xd3\x8f\x2a\xb8\x99\x32\x9e\x78\xea\x3d\x7d\x4a\xf4\x6c\x78\x3c\x24\xf9\xfa\xa1\x51\x65\x6e\x7c\xd7\xdd\xd9\xd0\xb8\x4f\x39\x2a\xbb\x7c\x72\x54\x27\xeb\xff\x36\x38\x96\x54\x99\xb2\x6d\x1a\x59\x93\xff\x42\x95\xe9\x05\x6a\x21\xde\xd9\x2b\x00\x00\xff\xff\xef\x07\xd5\xe5\x2d\x01\x00\x00") - -func templatesSingleTmplBytes() ([]byte, error) { - return bindataRead( - _templatesSingleTmpl, - "templates/single.tmpl", - ) + fi, err := os.Stat(path) + if err != nil { + err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err) + } + + a := &asset{bytes: bytes, info: fi} + return a, err } +// templatesSingleTmpl reads file data from disk. It returns an error on failure. func templatesSingleTmpl() (*asset, error) { - bytes, err := templatesSingleTmplBytes() + path := "D:\\Code\\Go\\src\\github.com\\hacdias\\caddy-filemanager\\assets\\templates\\single.tmpl" + name := "templates/single.tmpl" + bytes, err := bindataRead(path, name) if err != nil { return nil, err } - info := bindataFileInfo{name: "templates/single.tmpl", size: 301, mode: os.FileMode(438), modTime: time.Unix(1466630292, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil + fi, err := os.Stat(path) + if err != nil { + err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err) + } + + a := &asset{bytes: bytes, info: fi} + return a, err } // Asset loads and returns the asset for the given name. diff --git a/fileinfo.go b/fileinfo.go index 8bc2bde1..4d78c947 100644 --- a/fileinfo.go +++ b/fileinfo.go @@ -3,7 +3,6 @@ package filemanager import ( "fmt" "io/ioutil" - "mime" "net/http" "net/url" "os" @@ -69,16 +68,12 @@ func GetFileInfo(url *url.URL, c *Config) (*FileInfo, int, error) { // GetExtendedFileInfo is used to get extra parameters for FileInfo struct func (fi *FileInfo) GetExtendedFileInfo() error { - fi.Mimetype = mime.TypeByExtension(filepath.Ext(fi.Path)) - fi.Type = SimplifyMimeType(fi.Mimetype) - - if fi.Type == "text" { - err := fi.Read() - if err != nil { - return err - } + err := fi.Read() + if err != nil { + return err } + fi.Type = SimplifyMimeType(fi.Mimetype) return nil } @@ -88,6 +83,7 @@ func (fi *FileInfo) Read() error { if err != nil { return err } + fi.Mimetype = http.DetectContentType(raw) fi.Content = string(raw) return nil } @@ -104,7 +100,7 @@ func (fi FileInfo) HumanModTime(format string) string { } // Delete handles the delete requests -func (fi FileInfo) Delete() (int, error) { +func (fi *FileInfo) Delete() (int, error) { var err error // If it's a directory remove all the contents inside @@ -122,7 +118,7 @@ func (fi FileInfo) Delete() (int, error) { } // Rename function is used tor rename a file or a directory -func (fi FileInfo) Rename(w http.ResponseWriter, r *http.Request) (int, error) { +func (fi *FileInfo) Rename(w http.ResponseWriter, r *http.Request) (int, error) { newname := r.Header.Get("Rename-To") if newname == "" { return http.StatusBadRequest, nil @@ -135,11 +131,12 @@ func (fi FileInfo) Rename(w http.ResponseWriter, r *http.Request) (int, error) { return ErrorToHTTPCode(err), err } + fi.Path = newpath return http.StatusOK, nil } // ServeAsHTML is used to serve single file pages -func (fi FileInfo) ServeAsHTML(w http.ResponseWriter, r *http.Request, c *Config) (int, error) { +func (fi *FileInfo) ServeAsHTML(w http.ResponseWriter, r *http.Request, c *Config) (int, error) { if fi.IsDir { return fi.serveListing(w, r, c) } @@ -147,12 +144,16 @@ func (fi FileInfo) ServeAsHTML(w http.ResponseWriter, r *http.Request, c *Config return fi.serveSingleFile(w, r, c) } -func (fi FileInfo) serveSingleFile(w http.ResponseWriter, r *http.Request, c *Config) (int, error) { +func (fi *FileInfo) serveSingleFile(w http.ResponseWriter, r *http.Request, c *Config) (int, error) { err := fi.GetExtendedFileInfo() if err != nil { return ErrorToHTTPCode(err), err } + if fi.Type == "blob" { + return fi.ServeRawFile(w, r, c) + } + page := &Page{ Info: &PageInfo{ Name: fi.Name, @@ -163,18 +164,10 @@ func (fi FileInfo) serveSingleFile(w http.ResponseWriter, r *http.Request, c *Co }, } - templates := []string{"single", "actions", "base"} - for _, t := range templates { - code, err := page.AddTemplate(t, Asset, nil) - if err != nil { - return code, err - } - } - - return page.PrintAsHTML(w) + return page.PrintAsHTML(w, "single") } -func (fi FileInfo) serveListing(w http.ResponseWriter, r *http.Request, c *Config) (int, error) { +func (fi *FileInfo) serveListing(w http.ResponseWriter, r *http.Request, c *Config) (int, error) { var err error file, err := c.Root.Open(fi.RootPath) @@ -226,15 +219,7 @@ func (fi FileInfo) serveListing(w http.ResponseWriter, r *http.Request, c *Confi }, } - templates := []string{"listing", "actions", "base"} - for _, t := range templates { - code, err := page.AddTemplate(t, Asset, nil) - if err != nil { - return code, err - } - } - - return page.PrintAsHTML(w) + return page.PrintAsHTML(w, "listing") } func (fi FileInfo) loadDirectoryContents(file http.File, c *Config) (*Listing, error) { @@ -314,5 +299,13 @@ func SimplifyMimeType(name string) string { return "image" } - return "text" + if strings.HasPrefix(name, "text") { + return "text" + } + + if strings.HasPrefix(name, "application/javascript") { + return "text" + } + + return "blob" } diff --git a/filemanager.go b/filemanager.go index 07e10f45..40de0453 100644 --- a/filemanager.go +++ b/filemanager.go @@ -1,6 +1,6 @@ //go:generate go get github.com/jteeuwen/go-bindata //go:generate go install github.com/jteeuwen/go-bindata/go-bindata -//go:generate go-bindata -pkg filemanager -prefix "assets" -o binary.go assets/... +//go:generate go-bindata -debug -pkg filemanager -prefix "assets" -o binary.go assets/... // Package filemanager provides middleware for managing files in a directory // when directory path is requested instead of a specific file. Based on browse diff --git a/page.go b/page.go index cea1cb54..dcf0ebbe 100644 --- a/page.go +++ b/page.go @@ -12,7 +12,6 @@ import ( // Page contains the informations and functions needed to show the page type Page struct { Info *PageInfo - Tpl *template.Template } // AssetFunc is an Assets function @@ -72,37 +71,38 @@ func (p PageInfo) PreviousLink() string { return parts[len(parts)-2] } -// AddTemplate adds a template file to the page template -func (p *Page) AddTemplate(name string, assets AssetFunc, functions template.FuncMap) (int, error) { - - // Get the template from the assets - page, err := assets("templates/" + name + ".tmpl") - - // Check if there is some error. If so, the template doesn't exist - if err != nil { - log.Print(err) - return http.StatusInternalServerError, err - } - - // If it's the first iteration, creates a new template and add the - // functions map - if p.Tpl == nil { - p.Tpl, err = template.New(name).Funcs(functions).Parse(string(page)) - } else { - p.Tpl, err = p.Tpl.Parse(string(page)) - } - - if err != nil { - log.Print(err) - return http.StatusInternalServerError, err - } - return 0, nil -} - // PrintAsHTML formats the page in HTML and executes the template -func (p Page) PrintAsHTML(w http.ResponseWriter) (int, error) { +func (p Page) PrintAsHTML(w http.ResponseWriter, templates ...string) (int, error) { + templates = append(templates, "actions", "base") + var tpl *template.Template + + // For each template, add it to the the tpl variable + for i, t := range templates { + // Get the template from the assets + page, err := Asset("templates/" + t + ".tmpl") + + // Check if there is some error. If so, the template doesn't exist + if err != nil { + log.Print(err) + return http.StatusInternalServerError, err + } + + // If it's the first iteration, creates a new template and add the + // functions map + if i == 0 { + tpl, err = template.New(t).Parse(string(page)) + } else { + tpl, err = tpl.Parse(string(page)) + } + + if err != nil { + log.Print(err) + return http.StatusInternalServerError, err + } + } + buf := &bytes.Buffer{} - err := p.Tpl.Execute(buf, p.Info) + err := tpl.Execute(buf, p.Info) if err != nil { return http.StatusInternalServerError, err