diff --git a/weed/server/filer_ui/breadcrumb.go b/weed/server/filer_ui/breadcrumb.go index 5016117a8..3201ff76c 100644 --- a/weed/server/filer_ui/breadcrumb.go +++ b/weed/server/filer_ui/breadcrumb.go @@ -15,8 +15,12 @@ func ToBreadcrumb(fullpath string) (crumbs []Breadcrumb) { parts := strings.Split(fullpath, "/") for i := 0; i < len(parts); i++ { + name := parts[i] + if name == "" { + name = "/" + } crumb := Breadcrumb{ - Name: parts[i] + " /", + Name: name, Link: "/" + util.Join(parts[0:i+1]...), } if !strings.HasSuffix(crumb.Link, "/") { diff --git a/weed/server/filer_ui/filer.html b/weed/server/filer_ui/filer.html index 593d115f0..9befef10f 100644 --- a/weed/server/filer_ui/filer.html +++ b/weed/server/filer_ui/filer.html @@ -11,6 +11,7 @@ #drop-area { border: 1px transparent; + margin-top: 5px; } #drop-area.highlight { @@ -46,37 +47,13 @@ vertical-align: bottom; } - .danger { - color: red; - background: #fff; - border: 1px solid #fff; - border-radius: 2px; - } - - .info { - background: #fff; - border: 1px solid #fff; - border-radius: 2px; - } - .footer { position: absolute; - bottom: 10px; - right: 10%; - min-width: 30%; - } - - .progress-table { - width: 100%; - } - - .progress-table-file-name { - text-align: right; - } - - .progress-table-percent { - width: 60px; - text-align: right; + bottom: 0px; + right: 5%; + min-width: 25%; + border-left: 1px solid #ccc; + border-right: 1px solid #ccc; } .add-files { @@ -98,13 +75,17 @@
+
+ + +
+
@@ -112,7 +93,12 @@
- + {{if .EmptyFolder}} +
+ + +
+ {{else}} +
{{$path := .Path }} {{ range $entry_index, $entry := .Entries }} @@ -144,20 +130,18 @@ {{ $entry.Timestamp.Format "2006-01-02 15:04" }} {{ end }}
- {{if $entry.IsDirectory}} - - {{else}} - - {{end}} - +
+ + {{if $entry.IsDirectory}} + + {{else}} + + {{end}} +
- {{if .EmptyFolder}} -
- + -
{{end}}
@@ -234,17 +218,23 @@ function renderProgress() { var values = Object.values(uploadList); - var html = '\n'; + var html = '
\n<\/tr>\n'; for (let i of values) { - html += '\n\n
Uploading
' + i.name + '<\/td>\n'; - html += '' + i.percent + '% <\/td>\n<\/tr>\n'; + var progressBarClass = 'progress-bar-striped active'; + if (i.percent >= 100) { + progressBarClass = 'progress-bar-success'; + } + html += '
\n'; + html += '
\n'; + html += '
'; + html += '' + i.name + '' + i.percent + '%<\/div>'; + html += '<\/div>\n<\/td>\n<\/tr>\n'; } html += '<\/table>\n'; progressArea.innerHTML = html; if (values.length > 0) { progressArea.attributes.style.value = ''; } - console.log('Render Progress', values); } function reportProgress(file, percent) { @@ -289,7 +279,7 @@ } function handleCreateDir() { - var dirName = prompt('Directory Name:', ''); + var dirName = prompt('Folder Name:', ''); dirName = dirName.trim(); if (dirName == null || dirName == '') { return;