mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-11 04:50:11 +02:00
refac
This commit is contained in:
@@ -55,7 +55,14 @@
|
||||
|
||||
export let onChange: Function = () => {};
|
||||
|
||||
$: onChange(open);
|
||||
const toggleOpen = () => {
|
||||
if (disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
open = !open;
|
||||
onChange(open);
|
||||
};
|
||||
|
||||
const collapsibleId = uuidv4();
|
||||
</script>
|
||||
@@ -64,14 +71,7 @@
|
||||
{#if title !== null}
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div
|
||||
class="{buttonClassName} {disabled ? '' : 'cursor-pointer'}"
|
||||
on:pointerup={() => {
|
||||
if (!disabled) {
|
||||
open = !open;
|
||||
}
|
||||
}}
|
||||
>
|
||||
<div class="{buttonClassName} {disabled ? '' : 'cursor-pointer'}" on:pointerup={toggleOpen}>
|
||||
<div
|
||||
class=" w-full flex items-center justify-between gap-2 {attributes?.done &&
|
||||
attributes?.done !== 'true' &&
|
||||
@@ -135,11 +135,7 @@
|
||||
on:click={(e) => {
|
||||
e.stopPropagation();
|
||||
}}
|
||||
on:pointerup={(e) => {
|
||||
if (!disabled) {
|
||||
open = !open;
|
||||
}
|
||||
}}
|
||||
on:pointerup={toggleOpen}
|
||||
>
|
||||
<div>
|
||||
<div class="flex items-start justify-between">
|
||||
|
||||
Reference in New Issue
Block a user