From 9d2d397bdab6071ade59f422f0279aad5da00905 Mon Sep 17 00:00:00 2001 From: medcl Date: Wed, 30 Dec 2020 23:11:49 +0800 Subject: [PATCH] add vfs to ui --- .gitignore | 3 ++- ui.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9f043f85..73b94a01 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,5 @@ appveyor.yml /bin *.exe web/.github/ -web/report* \ No newline at end of file +web/report* +log/ \ No newline at end of file diff --git a/ui.go b/ui.go index a6bb53a9..146e2427 100644 --- a/ui.go +++ b/ui.go @@ -2,6 +2,7 @@ package main import ( "fmt" + public "infini.sh/search-center/.public" "net/http" log "github.com/cihub/seelog" @@ -20,7 +21,7 @@ type UI struct { func (h UI) InitUI() { - // vfs.RegisterFS(public.StaticFS{StaticFolder: h.config.UILocalPath, TrimLeftPath: h.config.UILocalPath , CheckLocalFirst: h.config.UILocalEnabled, SkipVFS: !h.config.UIVFSEnabled}) + vfs.RegisterFS(public.StaticFS{StaticFolder: h.Config.UILocalPath, TrimLeftPath: h.Config.UILocalPath , CheckLocalFirst: h.Config.UILocalEnabled, SkipVFS: !h.Config.UIVFSEnabled}) ui.HandleUI("/", vfs.FileServer(vfs.VFS()))