mirror of https://github.com/Wox-launcher/Wox
Add website for system plugins
This commit is contained in:
parent
3d200a9828
commit
a62445a220
|
@ -39,6 +39,7 @@ func (a *ApplicationPlugin) GetMetadata() plugin.Metadata {
|
||||||
Id: "ea2b6859-14bc-4c89-9c88-627da7379141",
|
Id: "ea2b6859-14bc-4c89-9c88-627da7379141",
|
||||||
Name: "App",
|
Name: "App",
|
||||||
Author: "Wox Launcher",
|
Author: "Wox Launcher",
|
||||||
|
Website: "https://github.com/Wox-launcher/Wox",
|
||||||
Version: "1.0.0",
|
Version: "1.0.0",
|
||||||
MinWoxVersion: "2.0.0",
|
MinWoxVersion: "2.0.0",
|
||||||
Runtime: "Nodejs",
|
Runtime: "Nodejs",
|
||||||
|
|
|
@ -31,6 +31,7 @@ func (c *BrowserBookmarkPlugin) GetMetadata() plugin.Metadata {
|
||||||
Id: "95d041d3-be7e-4b20-8517-88dda2db280b",
|
Id: "95d041d3-be7e-4b20-8517-88dda2db280b",
|
||||||
Name: "BrowserBookmark",
|
Name: "BrowserBookmark",
|
||||||
Author: "Wox Launcher",
|
Author: "Wox Launcher",
|
||||||
|
Website: "https://github.com/Wox-launcher/Wox",
|
||||||
Version: "1.0.0",
|
Version: "1.0.0",
|
||||||
MinWoxVersion: "2.0.0",
|
MinWoxVersion: "2.0.0",
|
||||||
Runtime: "Nodejs",
|
Runtime: "Nodejs",
|
||||||
|
|
|
@ -33,6 +33,7 @@ func (c *CalculatorPlugin) GetMetadata() plugin.Metadata {
|
||||||
Id: "bd723c38-f28d-4152-8621-76fd21d6456e",
|
Id: "bd723c38-f28d-4152-8621-76fd21d6456e",
|
||||||
Name: "Calculator",
|
Name: "Calculator",
|
||||||
Author: "Wox Launcher",
|
Author: "Wox Launcher",
|
||||||
|
Website: "https://github.com/Wox-launcher/Wox",
|
||||||
Version: "1.0.0",
|
Version: "1.0.0",
|
||||||
MinWoxVersion: "2.0.0",
|
MinWoxVersion: "2.0.0",
|
||||||
Runtime: "Nodejs",
|
Runtime: "Nodejs",
|
||||||
|
|
|
@ -27,6 +27,7 @@ func (c *ChatgptPlugin) GetMetadata() plugin.Metadata {
|
||||||
Id: "c9910664-1c28-47ae-bad6-e7332a02d471",
|
Id: "c9910664-1c28-47ae-bad6-e7332a02d471",
|
||||||
Name: "Chatgpt",
|
Name: "Chatgpt",
|
||||||
Author: "Wox Launcher",
|
Author: "Wox Launcher",
|
||||||
|
Website: "https://github.com/Wox-launcher/Wox",
|
||||||
Version: "1.0.0",
|
Version: "1.0.0",
|
||||||
MinWoxVersion: "2.0.0",
|
MinWoxVersion: "2.0.0",
|
||||||
Runtime: "Nodejs",
|
Runtime: "Nodejs",
|
||||||
|
|
|
@ -128,6 +128,7 @@ func (c *ClipboardPlugin) GetMetadata() plugin.Metadata {
|
||||||
Id: "5f815d98-27f5-488d-a756-c317ea39935b",
|
Id: "5f815d98-27f5-488d-a756-c317ea39935b",
|
||||||
Name: "Clipboard History",
|
Name: "Clipboard History",
|
||||||
Author: "Wox Launcher",
|
Author: "Wox Launcher",
|
||||||
|
Website: "https://github.com/Wox-launcher/Wox",
|
||||||
Version: "1.0.0",
|
Version: "1.0.0",
|
||||||
MinWoxVersion: "2.0.0",
|
MinWoxVersion: "2.0.0",
|
||||||
Runtime: "Nodejs",
|
Runtime: "Nodejs",
|
||||||
|
|
|
@ -25,6 +25,7 @@ func (i *IndicatorPlugin) GetMetadata() plugin.Metadata {
|
||||||
Id: "38564bf0-75ad-4b3e-8afe-a0e0a287c42e",
|
Id: "38564bf0-75ad-4b3e-8afe-a0e0a287c42e",
|
||||||
Name: "System Plugin Indicator",
|
Name: "System Plugin Indicator",
|
||||||
Author: "Wox Launcher",
|
Author: "Wox Launcher",
|
||||||
|
Website: "https://github.com/Wox-launcher/Wox",
|
||||||
Version: "1.0.0",
|
Version: "1.0.0",
|
||||||
MinWoxVersion: "2.0.0",
|
MinWoxVersion: "2.0.0",
|
||||||
Runtime: "Nodejs",
|
Runtime: "Nodejs",
|
||||||
|
|
|
@ -23,6 +23,7 @@ func (i *QueryHistoryPlugin) GetMetadata() plugin.Metadata {
|
||||||
Id: "fa51ecc4-e491-4e4b-b1f3-70df8a3966d8",
|
Id: "fa51ecc4-e491-4e4b-b1f3-70df8a3966d8",
|
||||||
Name: "Wox Query History",
|
Name: "Wox Query History",
|
||||||
Author: "Wox Launcher",
|
Author: "Wox Launcher",
|
||||||
|
Website: "https://github.com/Wox-launcher/Wox",
|
||||||
Version: "1.0.0",
|
Version: "1.0.0",
|
||||||
MinWoxVersion: "2.0.0",
|
MinWoxVersion: "2.0.0",
|
||||||
Runtime: "Nodejs",
|
Runtime: "Nodejs",
|
||||||
|
|
|
@ -23,6 +23,7 @@ func (i *SelectionPlugin) GetMetadata() plugin.Metadata {
|
||||||
Id: "d9e557ed-89bd-4b8b-bd64-2a7632cf3483",
|
Id: "d9e557ed-89bd-4b8b-bd64-2a7632cf3483",
|
||||||
Name: "Selection",
|
Name: "Selection",
|
||||||
Author: "Wox Launcher",
|
Author: "Wox Launcher",
|
||||||
|
Website: "https://github.com/Wox-launcher/Wox",
|
||||||
Version: "1.0.0",
|
Version: "1.0.0",
|
||||||
MinWoxVersion: "2.0.0",
|
MinWoxVersion: "2.0.0",
|
||||||
Runtime: "Nodejs",
|
Runtime: "Nodejs",
|
||||||
|
|
|
@ -35,6 +35,7 @@ func (r *SysPlugin) GetMetadata() plugin.Metadata {
|
||||||
Id: "227f7d64-df08-4e35-ad05-98a26d540d06",
|
Id: "227f7d64-df08-4e35-ad05-98a26d540d06",
|
||||||
Name: "System Commands",
|
Name: "System Commands",
|
||||||
Author: "Wox Launcher",
|
Author: "Wox Launcher",
|
||||||
|
Website: "https://github.com/Wox-launcher/Wox",
|
||||||
Version: "1.0.0",
|
Version: "1.0.0",
|
||||||
MinWoxVersion: "2.0.0",
|
MinWoxVersion: "2.0.0",
|
||||||
Runtime: "Nodejs",
|
Runtime: "Nodejs",
|
||||||
|
|
|
@ -23,6 +23,7 @@ func (r *UrlPlugin) GetMetadata() plugin.Metadata {
|
||||||
Id: "1af58721-6c97-4901-b291-620daf08d9c9",
|
Id: "1af58721-6c97-4901-b291-620daf08d9c9",
|
||||||
Name: "Url",
|
Name: "Url",
|
||||||
Author: "Wox Launcher",
|
Author: "Wox Launcher",
|
||||||
|
Website: "https://github.com/Wox-launcher/Wox",
|
||||||
Version: "1.0.0",
|
Version: "1.0.0",
|
||||||
MinWoxVersion: "2.0.0",
|
MinWoxVersion: "2.0.0",
|
||||||
Runtime: "Nodejs",
|
Runtime: "Nodejs",
|
||||||
|
|
|
@ -32,6 +32,7 @@ func (r *WebSearchPlugin) GetMetadata() plugin.Metadata {
|
||||||
Id: "c1e350a7-c521-4dc3-b4ff-509f720fde86",
|
Id: "c1e350a7-c521-4dc3-b4ff-509f720fde86",
|
||||||
Name: "WebSearch",
|
Name: "WebSearch",
|
||||||
Author: "Wox Launcher",
|
Author: "Wox Launcher",
|
||||||
|
Website: "https://github.com/Wox-launcher/Wox",
|
||||||
Version: "1.0.0",
|
Version: "1.0.0",
|
||||||
MinWoxVersion: "2.0.0",
|
MinWoxVersion: "2.0.0",
|
||||||
Runtime: "Nodejs",
|
Runtime: "Nodejs",
|
||||||
|
|
|
@ -22,6 +22,7 @@ func (i *WPMPlugin) GetMetadata() plugin.Metadata {
|
||||||
Id: "e2c5f005-6c73-43c8-bc53-ab04def265b2",
|
Id: "e2c5f005-6c73-43c8-bc53-ab04def265b2",
|
||||||
Name: "Wox Plugin Manager",
|
Name: "Wox Plugin Manager",
|
||||||
Author: "Wox Launcher",
|
Author: "Wox Launcher",
|
||||||
|
Website: "https://github.com/Wox-launcher/Wox",
|
||||||
Version: "1.0.0",
|
Version: "1.0.0",
|
||||||
MinWoxVersion: "2.0.0",
|
MinWoxVersion: "2.0.0",
|
||||||
Runtime: "Nodejs",
|
Runtime: "Nodejs",
|
||||||
|
|
|
@ -410,13 +410,14 @@ func serveAndWait(ctx context.Context, port int) {
|
||||||
})
|
})
|
||||||
|
|
||||||
mux.HandleFunc("/open/url", func(w http.ResponseWriter, r *http.Request) {
|
mux.HandleFunc("/open/url", func(w http.ResponseWriter, r *http.Request) {
|
||||||
url := r.URL.Query().Get("url")
|
body, _ := io.ReadAll(r.Body)
|
||||||
if url == "" {
|
urlResult := gjson.GetBytes(body, "url")
|
||||||
writeErrorResponse(w, "url is empty")
|
if !urlResult.Exists() {
|
||||||
|
writeErrorResponse(w, "id is empty")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
util.ShellOpen(url)
|
util.ShellOpen(urlResult.String())
|
||||||
|
|
||||||
writeSuccessResponse(w, "")
|
writeSuccessResponse(w, "")
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue