This commit is contained in:
Timothy Jaeryang Baek 2025-04-18 01:26:42 -07:00
parent eb80719cf0
commit a22be555cb
4 changed files with 6 additions and 7 deletions

View File

@ -262,7 +262,7 @@
{#if threadId !== null}
<Drawer
show={threadId !== null}
on:close={() => {
onClose={() => {
threadId = null;
}}
>

View File

@ -140,7 +140,7 @@
{#if $showControls}
<Drawer
show={$showControls}
on:close={() => {
onClose={() => {
showControls.set(false);
}}
>

View File

@ -1,13 +1,12 @@
<script lang="ts">
import { onDestroy, onMount, createEventDispatcher } from 'svelte';
import { onDestroy, onMount } from 'svelte';
import { flyAndScale } from '$lib/utils/transitions';
import { fade, fly, slide } from 'svelte/transition';
import { isApp } from '$lib/stores';
const dispatch = createEventDispatcher();
export let show = false;
export let className = '';
export let onClose = () => {};
let modalElement = null;
let mounted = false;
@ -33,7 +32,7 @@
window.addEventListener('keydown', handleKeyDown);
document.body.style.overflow = 'hidden';
} else if (modalElement) {
dispatch('close');
onClose();
window.removeEventListener('keydown', handleKeyDown);
if (document.body.contains(modalElement)) {

View File

@ -747,7 +747,7 @@
<Drawer
className="h-full"
show={selectedFileId !== null}
on:close={() => {
onClose={() => {
selectedFileId = null;
}}
>