mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-29 06:32:52 +00: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:
parent
12585a3851
commit
db5090dee3
3 changed files with 12 additions and 9 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue