diff --git a/src/api.go b/src/api.go index e211dfb..66000b3 100644 --- a/src/api.go +++ b/src/api.go @@ -226,6 +226,7 @@ func RegisterPluginAPIs(authRouter *auth.RouterDef) { authRouter.HandleFunc("/api/plugins/enable", pluginManager.HandleEnablePlugin) authRouter.HandleFunc("/api/plugins/disable", pluginManager.HandleDisablePlugin) authRouter.HandleFunc("/api/plugins/icon", pluginManager.HandleLoadPluginIcon) + authRouter.HandleFunc("/api/plugins/info", pluginManager.HandlePluginInfo) authRouter.HandleFunc("/api/plugins/groups/list", pluginManager.HandleListPluginGroups) authRouter.HandleFunc("/api/plugins/groups/add", pluginManager.HandleAddPluginToGroup) diff --git a/src/def.go b/src/def.go index a17c919..0719405 100644 --- a/src/def.go +++ b/src/def.go @@ -80,8 +80,6 @@ var ( allowSshLoopback = flag.Bool("sshlb", false, "Allow loopback web ssh connection (DANGER)") allowMdnsScanning = flag.Bool("mdns", true, "Enable mDNS scanner and transponder") mdnsName = flag.String("mdnsname", "", "mDNS name, leave empty to use default (zoraxy_{node-uuid}.local)") - ztAuthToken = flag.String("ztauth", "", "ZeroTier authtoken for the local node") - ztAPIPort = flag.Int("ztport", 9993, "ZeroTier controller API port") runningInDocker = flag.Bool("docker", false, "Run Zoraxy in docker compatibility mode") acmeAutoRenewInterval = flag.Int("autorenew", 86400, "ACME auto TLS/SSL certificate renew check interval (seconds)") acmeCertAutoRenewDays = flag.Int("earlyrenew", 30, "Number of days to early renew a soon expiring certificate (days)") diff --git a/src/mod/plugins/handler.go b/src/mod/plugins/handler.go index 9151d52..8e95805 100644 --- a/src/mod/plugins/handler.go +++ b/src/mod/plugins/handler.go @@ -173,6 +173,28 @@ func (m *Manager) HandleListPlugins(w http.ResponseWriter, r *http.Request) { utils.SendJSONResponse(w, string(js)) } +func (m *Manager) HandlePluginInfo(w http.ResponseWriter, r *http.Request) { + pluginID, err := utils.GetPara(r, "plugin_id") + if err != nil { + utils.SendErrorResponse(w, "plugin_id not found") + return + } + + plugin, err := m.GetPluginByID(pluginID) + if err != nil { + utils.SendErrorResponse(w, err.Error()) + return + } + + js, err := json.Marshal(plugin) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + utils.SendJSONResponse(w, string(js)) +} + func (m *Manager) HandleLoadPluginIcon(w http.ResponseWriter, r *http.Request) { pluginID, err := utils.GetPara(r, "plugin_id") if err != nil { diff --git a/src/web/components/httprp.html b/src/web/components/httprp.html index 871d0eb..fa5c9ca 100644 --- a/src/web/components/httprp.html +++ b/src/web/components/httprp.html @@ -665,6 +665,9 @@ //Bind on tab switch events tabSwitchEventBind["httprp"] = function(){ listProxyEndpoints(); + + //Reset the tag filter + $("#tagFilterDropdown").dropdown('set selected', ""); } /* Tags & Search */ diff --git a/src/web/components/plugins.html b/src/web/components/plugins.html index e2b8d84..c2e463b 100644 --- a/src/web/components/plugins.html +++ b/src/web/components/plugins.html @@ -63,6 +63,42 @@ .selectedPluginItem.active .selectedIcon{ display: block; } + + .pluginAddRemoveButtons{ + border-left: 1px solid var(--divider_color); + border-right: 1px solid var(--divider_color); + display: flex !important; + align-items: center !important; + justify-content: center !important; + } + + .pluginAddRemoveButtons .mobileViewOnly{ + display: none; + } + + .selectColTitle{ + font-weight: bold; + margin-bottom: 0.4em; + text-align: center; + width: 100%; + } + + @media (max-width: 780px) { + .pluginAddRemoveButtons { + border-left: none; + border-right: none; + border-top: 1px solid var(--divider_color); + border-bottom: 1px solid var(--divider_color); + } + + .pluginAddRemoveButtons .mobileViewOnly{ + display: block; + } + + .pluginAddRemoveButtons .wideViewOnly{ + display: none; + } + }
The plugin registered the following information about itself
+IntroSpect | +Response | +
---|---|
Name | ++ |
Version | ++ |
Author | ++ |
Description | ++ |
Category | ++ |
URL | ++ |
Contact | ++ |
Zoraxy assigned the following settings for its runtime
+Properties | +Configuration | +Enabled | ++ + |
---|---|
Assigned Port | ++ |
Working Directory | ++ |