mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-06 13:38:28 -04:00
feat(plugins): add update all CLI flag and settings updates dialog (#2682)
* feat(plugins): add update all CLI flag and settings update dialog * feat(plugins): add comparison diff URL support and update button styling * feat(plugins): skip system plugins in bulk CLI update * fix(plugins): remove check shorthand to resolve conflict with config flag * feat(plugins): inline update dialog, show version tags, restructure buttons
This commit is contained in:
@@ -42,12 +42,15 @@ func HandleListInstalled(conn net.Conn, req models.Request) {
|
||||
for _, id := range installedNames {
|
||||
if plugin, ok := pluginMap[id]; ok {
|
||||
hasUpdate := false
|
||||
if hasUpdates, err := manager.HasUpdates(id, plugin); err == nil {
|
||||
diffURL := plugin.Repo
|
||||
if hasUpdates, dURL, err := manager.HasUpdates(id, plugin); err == nil {
|
||||
hasUpdate = hasUpdates
|
||||
diffURL = dURL
|
||||
}
|
||||
|
||||
info := pluginInfoFromPlugin(plugin)
|
||||
info.HasUpdate = hasUpdate
|
||||
info.DiffURL = diffURL
|
||||
result = append(result, info)
|
||||
} else {
|
||||
result = append(result, PluginInfo{
|
||||
|
||||
@@ -18,6 +18,7 @@ type PluginInfo struct {
|
||||
Note string `json:"note,omitempty"`
|
||||
HasUpdate bool `json:"hasUpdate,omitempty"`
|
||||
RequiresDMS string `json:"requires_dms,omitempty"`
|
||||
DiffURL string `json:"diffUrl,omitempty"`
|
||||
Upvotes int `json:"upvotes,omitempty"`
|
||||
Status []string `json:"status,omitempty"`
|
||||
IssueURL string `json:"issueUrl,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user