diff --git a/webui/src/App.svelte b/webui/src/App.svelte index 385b5af..85408dd 100644 --- a/webui/src/App.svelte +++ b/webui/src/App.svelte @@ -332,8 +332,11 @@ } } - async function toggleSkipMount(mod) { - if (mod.disabledByFlag) return; + async function toggleSkipMount(event, mod) { + if (mod.disabledByFlag) { + event.target.checked = !event.target.checked; + return + }; const moduleDir = config.moduledir || DEFAULT_CONFIG.moduledir; const modulePath = `${moduleDir}/${mod.name}`; @@ -351,6 +354,7 @@ if (errno !== 0) { console.error(stderr); + event.target.checked = !event.target.checked; modules = modules.map(m => m.name === mod.name ? { ...m, toggling: false, error: L.modules.toggleError } : m ); @@ -363,6 +367,7 @@ } } catch (e) { console.error(e); + event.target.checked = !event.target.checked; modules = modules.map(m => m.name === mod.name ? { ...m, toggling: false, error: L.modules.toggleError } : m ); @@ -579,22 +584,24 @@
{#each modules as m (m.name)}
-
{m.name}
+
+ {m.name} + +
- {#if m.error} -

{m.error}

+
{m.error}
{/if}
{/each} diff --git a/webui/src/app.css b/webui/src/app.css index 625f41b..f4526ac 100644 --- a/webui/src/app.css +++ b/webui/src/app.css @@ -229,7 +229,7 @@ button:disabled { .error { font-size: 12px; color: var(--nord11); - margin-bottom: 4px; + margin-top: 4px; } .path { @@ -348,15 +348,20 @@ button:disabled { } .module-row { + padding: 12px 8px; + border-bottom: 1px solid rgba(255, 255, 255, 0.08); +} +.module-info { display: flex; align-items: center; justify-content: space-between; - padding: 12px 8px; - border-bottom: 1px solid rgba(255,255,255,0.08); -} +} .module-name { font-size: 15px; + overflow: scroll; + flex:1; + margin-right: 20px; } /* switch slider */