This commit is contained in:
GoEdgeLab
2024-07-27 15:42:58 +08:00
parent 7279dc873f
commit d7d0c8fbfe
490 changed files with 2158 additions and 738 deletions

View File

@@ -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 {