Added plugin dir parameter

- Added plugin dir parameter
- Fixed critical architectural bug that effects plugin UI in production mode
- Updated implementation of embed FS routing
- Minor dark theme update
- Fixed ztnc UI bug for msgbox and confirm box
This commit is contained in:
Toby Chui
2025-03-28 21:24:18 +08:00
parent 3e031605fc
commit 136989f2ea
18 changed files with 152 additions and 126 deletions

View File

@@ -94,7 +94,7 @@ func startupSequence() {
}
authAgent = auth.NewAuthenticationAgent(SYSTEM_NAME, []byte(sessionKey), sysdb, true, SystemWideLogger, func(w http.ResponseWriter, r *http.Request) {
//Not logged in. Redirecting to login page
http.Redirect(w, r, ppf("/login.html"), http.StatusTemporaryRedirect)
http.Redirect(w, r, "/login.html", http.StatusTemporaryRedirect)
})
//Create a TLS certificate manager
@@ -305,12 +305,14 @@ func startupSequence() {
/*
Plugin Manager
*/
pluginFolder := *path_plugin
pluginFolder = strings.TrimSuffix(pluginFolder, "/")
pluginManager = plugins.NewPluginManager(&plugins.ManagerOptions{
PluginDir: "./plugins",
PluginDir: pluginFolder,
SystemConst: &zoraxy_plugin.RuntimeConstantValue{
ZoraxyVersion: SYSTEM_VERSION,
ZoraxyUUID: nodeUUID,
ZoraxyVersion: SYSTEM_VERSION,
ZoraxyUUID: nodeUUID,
DevelopmentBuild: DEVELOPMENT_BUILD,
},
Database: sysdb,
Logger: SystemWideLogger,