mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-26 07:11:00 -05:00
fix(a11y): the on/off switches on Skills, Functions and Automations rows are named and no longer wrapped in an unnamed button (#33096)
This commit is contained in:
3 files changed
+12
-9
No files matched your search
@@ -704,9 +704,9 @@
|
||||
</button>
|
||||
</FunctionMenu>
|
||||
|
||||
<button
|
||||
<div
|
||||
class="flex h-6 items-center"
|
||||
type="button"
|
||||
role="presentation"
|
||||
on:click={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
@@ -715,6 +715,7 @@
|
||||
<Tooltip content={func.is_active ? $i18n.t('Enabled') : $i18n.t('Disabled')}>
|
||||
<Switch
|
||||
bind:state={func.is_active}
|
||||
ariaLabel={$i18n.t('Enabled')}
|
||||
on:change={async () => {
|
||||
toggleFunctionById(localStorage.token, func.id);
|
||||
models.set(
|
||||
@@ -729,7 +730,7 @@
|
||||
}}
|
||||
/>
|
||||
</Tooltip>
|
||||
</button>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -643,9 +643,9 @@
|
||||
</button>
|
||||
</SkillMenu>
|
||||
|
||||
<button
|
||||
<div
|
||||
class="flex h-6 items-center"
|
||||
type="button"
|
||||
role="presentation"
|
||||
on:click={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
@@ -656,13 +656,14 @@
|
||||
>
|
||||
<Switch
|
||||
bind:state={skill.is_active}
|
||||
ariaLabel={$i18n.t('Enabled')}
|
||||
on:change={async () => {
|
||||
await toggleSkillById(localStorage.token, skill.id);
|
||||
_skills.set(await getSkills(localStorage.token));
|
||||
}}
|
||||
/>
|
||||
</Tooltip>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -653,9 +653,9 @@
|
||||
</button>
|
||||
</AutomationMenu>
|
||||
|
||||
<button
|
||||
<div
|
||||
class="flex h-6 items-center"
|
||||
type="button"
|
||||
role="presentation"
|
||||
on:click={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
@@ -666,12 +666,13 @@
|
||||
>
|
||||
<Switch
|
||||
bind:state={automation.is_active}
|
||||
ariaLabel={$i18n.t('Enabled')}
|
||||
on:change={() => {
|
||||
toggleHandler(automation);
|
||||
}}
|
||||
/>
|
||||
</Tooltip>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user