butterrobot/internal/admin/templates/plugin_list.html
Felipe M. a11804b29c
All checks were successful
CI / goreleaser-lint (push) Successful in 10s
CI / format (push) Successful in 1m10s
CI / test (push) Successful in 2m15s
CI / lint (push) Successful in 3m16s
CI / build (push) Successful in 5m21s
Release / release (push) Successful in 1m45s
feat: add global plugin configuration with per-channel overrides
Plugins that require configuration (Twitter/Instagram expanders, Domain
Blocker) can now have an app-wide default that each channel inherits and
overrides only where needed.

- model: add GlobalPluginConfig and MergeConfig (blank channel value
  inherits the global value)
- migration: add global_plugin_config table (#5)
- db: GetGlobalPluginConfig, GetAllGlobalPluginConfigs, SetGlobalPluginConfig
- app: merge global + channel config per message
- admin: /admin/plugins/config/<id> global config page, shared
  buildPluginConfigFromForm helper and _fields.html partial; channel form
  shows inherited global value as placeholder
- docs: document global vs per-channel plugin configuration
2026-06-04 09:12:46 +02:00

53 lines
No EOL
2.2 KiB
HTML

{{define "content"}}
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">Available Plugins</h3>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-vcenter card-table">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Help</th>
<th>Requires Config</th>
<th>Global Config</th>
</tr>
</thead>
<tbody>
{{range $id, $plugin := .Plugins}}
<tr>
<td>{{$id}}</td>
<td>{{$plugin.GetName}}</td>
<td>{{$plugin.GetHelp}}</td>
<td>
{{if $plugin.RequiresConfig}}
<span class="badge bg-yellow">Yes</span>
{{else}}
<span class="badge bg-green">No</span>
{{end}}
</td>
<td>
{{if $plugin.RequiresConfig}}
<a href="/admin/plugins/config/{{$id}}" class="btn btn-sm btn-primary">Configure</a>
{{else}}
<span class="text-muted"></span>
{{end}}
</td>
</tr>
{{else}}
<tr>
<td colspan="5" class="text-center">No plugins found</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
{{end}}