mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-24 03:55:23 -04:00
plugins: enhance browser and CLI with new votes and labels
This commit is contained in:
@@ -28,9 +28,12 @@ func HandleList(conn net.Conn, req models.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
feedback := plugins.FetchFeedback()
|
||||
|
||||
result := make([]PluginInfo, len(pluginList))
|
||||
for i, p := range pluginList {
|
||||
installed, _ := manager.IsInstalled(p)
|
||||
fb := feedback[p.ID]
|
||||
result[i] = PluginInfo{
|
||||
ID: p.ID,
|
||||
Name: p.Name,
|
||||
@@ -46,6 +49,9 @@ func HandleList(conn net.Conn, req models.Request) {
|
||||
FirstParty: strings.HasPrefix(p.Repo, "https://github.com/AvengeMedia"),
|
||||
Featured: p.Featured,
|
||||
RequiresDMS: p.RequiresDMS,
|
||||
Upvotes: fb.Upvotes,
|
||||
Status: fb.Status,
|
||||
IssueURL: fb.IssueURL,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,9 @@ type PluginInfo struct {
|
||||
Note string `json:"note,omitempty"`
|
||||
HasUpdate bool `json:"hasUpdate,omitempty"`
|
||||
RequiresDMS string `json:"requires_dms,omitempty"`
|
||||
Upvotes int `json:"upvotes,omitempty"`
|
||||
Status []string `json:"status,omitempty"`
|
||||
IssueURL string `json:"issueUrl,omitempty"`
|
||||
}
|
||||
|
||||
type SuccessResult struct {
|
||||
|
||||
Reference in New Issue
Block a user