This commit is contained in:
parent
5ed8033ef9
commit
86c811aa35
|
@ -271,25 +271,32 @@ func listFiles(dirname string) []string {
|
|||
}
|
||||
|
||||
func getIconSkin(filenameExtension string) string {
|
||||
switch filenameExtension {
|
||||
case ".gitignore", "", ".exe", ".s", ".tar", ".zip", ".rar", ".gz": // 不支持显示图标的文件
|
||||
return "ico-ztree-other "
|
||||
case ".json", ".js":
|
||||
return "ico-ztree-js "
|
||||
case ".txt":
|
||||
return "ico-ztree-text "
|
||||
case ".properties":
|
||||
return "ico-ztree-pro "
|
||||
case ".htm", ".html":
|
||||
return "ico-ztree-html "
|
||||
default:
|
||||
if isImg(filenameExtension) {
|
||||
return "ico-ztree-img "
|
||||
}
|
||||
|
||||
return "ico-ztree-" + filenameExtension[1:] + " "
|
||||
switch filenameExtension {
|
||||
case ".html", ".htm":
|
||||
return "ico-ztree-html "
|
||||
case ".go":
|
||||
return "ico-ztree-go "
|
||||
case ".css":
|
||||
return "ico-ztree-css "
|
||||
case ".txt":
|
||||
return "ico-ztree-text "
|
||||
case ".sql":
|
||||
return "ico-ztree-sql "
|
||||
case ".properties":
|
||||
return "ico-ztree-pro "
|
||||
case ".md":
|
||||
return "ico-ztree-md "
|
||||
case ".js", "json":
|
||||
return "ico-ztree-js "
|
||||
case ".xml":
|
||||
return "ico-ztree-xml "
|
||||
default:
|
||||
return "ico-ztree-other "
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func getEditorMode(filenameExtension string) string {
|
||||
|
|
|
@ -107,9 +107,6 @@ var tree = {
|
|||
case "md":
|
||||
iconSkin = "ico-ztree-md ";
|
||||
break;
|
||||
case "md":
|
||||
iconSkin = "ico-ztree-md ";
|
||||
break;
|
||||
case "js", "json":
|
||||
iconSkin = "ico-ztree-js ";
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue