butterrobot/internal/admin/templates/plugins/social.twitter.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

12 lines
605 B
HTML

{{define "plugins/social.twitter.html"}}
<div class="mb-3">
<label class="form-label">Replacement Domain</label>
<input type="text" class="form-control" name="domain"
value="{{with .Config}}{{index . "domain"}}{{end}}"
placeholder="{{with .GlobalConfig}}{{with index . "domain"}}{{.}}{{else}}fxtwitter.com{{end}}{{else}}fxtwitter.com{{end}}">
<div class="form-text text-muted">
Enter the domain to replace twitter.com and x.com links with. Default is fxtwitter.com if left empty.
Leave blank to inherit the global configuration.
</div>
</div>
{{end}}