fix: only plugins with on_install are managed - skip others entirely

- Discover(): skip plugins without on_install hook (not shown in UI)
- Enable(): simplified - just check Installed flag
- SyncConfig(): simplified - no HasInstall special case
- Frontend: simplified toggle logic (only installed/uninstalled states)
- Tests: updated all test fixtures to include on_install hook
This commit is contained in:
2026-06-07 15:55:04 +08:00
parent 5c769c92a0
commit 3f787ec66d
4 changed files with 30 additions and 35 deletions
+2 -12
View File
@@ -107,11 +107,11 @@
</div>
</div>
<div class="plugin-toggle">
{#if p.hasInstall && !p.installed}
{#if !p.installed}
<button class="install-btn" on:click={() => install(p)}>
📦 Установить
</button>
{:else if p.hasInstall && p.installed}
{:else}
<div class="toggle-group">
<button
class="toggle-btn"
@@ -126,16 +126,6 @@
🗑
</button>
</div>
{:else}
<button
class="toggle-btn"
class:active={p.active}
on:click={() => toggle(p)}
role="switch"
aria-checked={p.active}
>
<span class="toggle-knob"></span>
</button>
{/if}
</div>
</div>