Add website for system plugins

This commit is contained in:
qianlifeng 2023-11-27 16:17:12 +08:00
parent 3d200a9828
commit a62445a220
13 changed files with 17 additions and 4 deletions

View File

@ -39,6 +39,7 @@ func (a *ApplicationPlugin) GetMetadata() plugin.Metadata {
Id: "ea2b6859-14bc-4c89-9c88-627da7379141",
Name: "App",
Author: "Wox Launcher",
Website: "https://github.com/Wox-launcher/Wox",
Version: "1.0.0",
MinWoxVersion: "2.0.0",
Runtime: "Nodejs",

View File

@ -31,6 +31,7 @@ func (c *BrowserBookmarkPlugin) GetMetadata() plugin.Metadata {
Id: "95d041d3-be7e-4b20-8517-88dda2db280b",
Name: "BrowserBookmark",
Author: "Wox Launcher",
Website: "https://github.com/Wox-launcher/Wox",
Version: "1.0.0",
MinWoxVersion: "2.0.0",
Runtime: "Nodejs",

View File

@ -33,6 +33,7 @@ func (c *CalculatorPlugin) GetMetadata() plugin.Metadata {
Id: "bd723c38-f28d-4152-8621-76fd21d6456e",
Name: "Calculator",
Author: "Wox Launcher",
Website: "https://github.com/Wox-launcher/Wox",
Version: "1.0.0",
MinWoxVersion: "2.0.0",
Runtime: "Nodejs",

View File

@ -27,6 +27,7 @@ func (c *ChatgptPlugin) GetMetadata() plugin.Metadata {
Id: "c9910664-1c28-47ae-bad6-e7332a02d471",
Name: "Chatgpt",
Author: "Wox Launcher",
Website: "https://github.com/Wox-launcher/Wox",
Version: "1.0.0",
MinWoxVersion: "2.0.0",
Runtime: "Nodejs",

View File

@ -128,6 +128,7 @@ func (c *ClipboardPlugin) GetMetadata() plugin.Metadata {
Id: "5f815d98-27f5-488d-a756-c317ea39935b",
Name: "Clipboard History",
Author: "Wox Launcher",
Website: "https://github.com/Wox-launcher/Wox",
Version: "1.0.0",
MinWoxVersion: "2.0.0",
Runtime: "Nodejs",

View File

@ -25,6 +25,7 @@ func (i *IndicatorPlugin) GetMetadata() plugin.Metadata {
Id: "38564bf0-75ad-4b3e-8afe-a0e0a287c42e",
Name: "System Plugin Indicator",
Author: "Wox Launcher",
Website: "https://github.com/Wox-launcher/Wox",
Version: "1.0.0",
MinWoxVersion: "2.0.0",
Runtime: "Nodejs",

View File

@ -23,6 +23,7 @@ func (i *QueryHistoryPlugin) GetMetadata() plugin.Metadata {
Id: "fa51ecc4-e491-4e4b-b1f3-70df8a3966d8",
Name: "Wox Query History",
Author: "Wox Launcher",
Website: "https://github.com/Wox-launcher/Wox",
Version: "1.0.0",
MinWoxVersion: "2.0.0",
Runtime: "Nodejs",

View File

@ -23,6 +23,7 @@ func (i *SelectionPlugin) GetMetadata() plugin.Metadata {
Id: "d9e557ed-89bd-4b8b-bd64-2a7632cf3483",
Name: "Selection",
Author: "Wox Launcher",
Website: "https://github.com/Wox-launcher/Wox",
Version: "1.0.0",
MinWoxVersion: "2.0.0",
Runtime: "Nodejs",

View File

@ -35,6 +35,7 @@ func (r *SysPlugin) GetMetadata() plugin.Metadata {
Id: "227f7d64-df08-4e35-ad05-98a26d540d06",
Name: "System Commands",
Author: "Wox Launcher",
Website: "https://github.com/Wox-launcher/Wox",
Version: "1.0.0",
MinWoxVersion: "2.0.0",
Runtime: "Nodejs",

View File

@ -23,6 +23,7 @@ func (r *UrlPlugin) GetMetadata() plugin.Metadata {
Id: "1af58721-6c97-4901-b291-620daf08d9c9",
Name: "Url",
Author: "Wox Launcher",
Website: "https://github.com/Wox-launcher/Wox",
Version: "1.0.0",
MinWoxVersion: "2.0.0",
Runtime: "Nodejs",

View File

@ -32,6 +32,7 @@ func (r *WebSearchPlugin) GetMetadata() plugin.Metadata {
Id: "c1e350a7-c521-4dc3-b4ff-509f720fde86",
Name: "WebSearch",
Author: "Wox Launcher",
Website: "https://github.com/Wox-launcher/Wox",
Version: "1.0.0",
MinWoxVersion: "2.0.0",
Runtime: "Nodejs",

View File

@ -22,6 +22,7 @@ func (i *WPMPlugin) GetMetadata() plugin.Metadata {
Id: "e2c5f005-6c73-43c8-bc53-ab04def265b2",
Name: "Wox Plugin Manager",
Author: "Wox Launcher",
Website: "https://github.com/Wox-launcher/Wox",
Version: "1.0.0",
MinWoxVersion: "2.0.0",
Runtime: "Nodejs",

View File

@ -410,13 +410,14 @@ func serveAndWait(ctx context.Context, port int) {
})
mux.HandleFunc("/open/url", func(w http.ResponseWriter, r *http.Request) {
url := r.URL.Query().Get("url")
if url == "" {
writeErrorResponse(w, "url is empty")
body, _ := io.ReadAll(r.Body)
urlResult := gjson.GetBytes(body, "url")
if !urlResult.Exists() {
writeErrorResponse(w, "id is empty")
return
}
util.ShellOpen(url)
util.ShellOpen(urlResult.String())
writeSuccessResponse(w, "")
})