mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-01-29 13:25:50 +08:00
v1.4.1
This commit is contained in:
@@ -2,11 +2,13 @@ package condutils
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/iwind/TeaGo/Tea"
|
||||
_ "github.com/iwind/TeaGo/bootstrap"
|
||||
"github.com/iwind/TeaGo/files"
|
||||
"github.com/iwind/TeaGo/logs"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
type CondJSComponent struct {
|
||||
@@ -27,6 +29,10 @@ func ReadAllAvailableCondTypes() []*CondJSComponent {
|
||||
if Tea.IsTesting() {
|
||||
dir = filepath.Dir(Tea.Root) + "/web"
|
||||
}
|
||||
gitDir, gDirFound := os.LookupEnv("GithubDIR")
|
||||
if gDirFound {
|
||||
dir = gitDir + "/EdgeAdmin/web"
|
||||
}
|
||||
dir += "/public/js/conds/"
|
||||
jsonFiles := files.NewFile(dir).List()
|
||||
for _, file := range jsonFiles {
|
||||
|
||||
Reference in New Issue
Block a user