Version 1.4.0
Main changes
fix(tpl): prevent collapse multiple whitespaces from filenames
feat(tpls): show escape char in filename
fix(tpl): remove fixed width from modify date
fix(serverHandler/content) add extra headers for HEAD method
fix(archive): use url base name instead of fs name for alias root
feat(serverHandler): output json data if param is "json"
feat(serverHandler): prevent output error information to end user
Breaking changes
feat(serverHandler): remove proxy features
Feature for proxying specified url path is removed.
- Proxy is not a main feature for file sharing server
- Removing proxy reduces code complexity a lot
refactor(tpl): simplify sub item class name
Sub items' class names of a directory are changed. This may break
external customized templates.
Before:
Class names are on <a> elements, which are children of <li> elements.
directory class names: "item", "item-dir"
file class names: "item", "item-file"
After:
Class names are on <li> elements.
directory class name: "dir"
file class name: "file"
refactor(tpl): use formatted data for page rendering
Add .Html
to sub item info.
Function invoking in template is slow. Generate formatted data before
rendering.
before:
Iterate item's FileInfo in template
{{range .SubItems}}
...
{{end}}
after:
Iterate item's FileInfo in template
{{range .SubItems}}{{with .Info}}
...
{{end}}{{end}}