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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user