You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							25 lines
						
					
					
						
							503 B
						
					
					
				
			
		
		
		
			
			
			
		
		
	
	
							25 lines
						
					
					
						
							503 B
						
					
					
				| package filer_ui | |
| 
 | |
| import ( | |
| 	_ "embed" | |
| 	"github.com/dustin/go-humanize" | |
| 	"html/template" | |
| 	"net/url" | |
| 	"strings" | |
| ) | |
| 
 | |
| func printpath(parts ...string) string { | |
| 	concat := strings.Join(parts, "") | |
| 	escaped := url.PathEscape(concat) | |
| 	return strings.ReplaceAll(escaped, "%2F", "/") | |
| } | |
| 
 | |
| var funcMap = template.FuncMap{ | |
| 	"humanizeBytes": humanize.Bytes, | |
| 	"printpath":     printpath, | |
| } | |
| 
 | |
| //go:embed filer.html | |
| var filerHtml string | |
| 
 | |
| var StatusTpl = template.Must(template.New("status").Funcs(funcMap).Parse(filerHtml))
 |