Fix plugin arrows (grey/disable not hide) + live frontmatter update on plugin change

- Arrow buttons: opacity 0.4 + pointer-events none at first/last (not hidden)
- updateFrontmatter(): updates both layout AND plugins in editor live
- Plugin order change -> frontmatter updated immediately in CodeMirror
- Plugin checkbox toggle -> frontmatter updated immediately
- Label is 'Plugins' (not 'Zichtbare plugins')
- Update AGENTS.md with plugin types (content vs system)
This commit is contained in:
2026-08-11 17:29:54 +02:00
parent 73450a17c1
commit 6daa0a6f49
2 changed files with 91 additions and 29 deletions
+9
View File
@@ -271,6 +271,15 @@ Gedefinieerd in `AdminAuth::ROLE_PERMISSIONS` als een mapping van rol → toeges
- `handlePluginsEdit` in `admin.php` moet `$pluginDir . '/' . $plugin . '.php'` gebruiken, NIET `$pluginDir . '/plugin.php'`.
- `handlePluginsNew` moet het bestand aanmaken als `<PluginName>.php`, NIET `plugin.php`.
## CRITICAL: Plugin types (content vs systeem)
- `plugin.json` heeft een `type` veld: `"type": "content"` of `"type": "system"`.
- **Content plugins** (type=content): Verschijnen in de sidebar en in de plugin selectie op content-edit paginas.
- **Systeem plugins** (type=system): Worden geladen door PluginManager (voor API/hooks) maar verschijnen NIET in de sidebar. Bieden functionaliteit aan via de CMSAPI.
- `PluginManager::isPluginViewable()` checkt `type === 'system'` -> niet viewable in sidebar.
- `handleContentEdit` toont alleen content-plugins in de plugin selectie.
- De admin plugins pagina toont een "Content" of "Systeem" badge.
- Bij geen `type` veld in plugin.json wordt default `content` aangenomen.
## CRITICAL: Essentiële plugins beschermen
- Essentiële plugins gedefinieerd in `getProtectedPlugins()` in `public/admin.php` (huidige: `Navigation`).
- Deze plugins kunnen NIET worden: gedeactiveerd (`handlePluginsToggle`), verwijderd (`handlePluginsDelete`), bewerkt (`handlePluginsEdit`).