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} {#if threadId !== null}
<Drawer <Drawer
show={threadId !== null} show={threadId !== null}
on:close={() => { onClose={() => {
threadId = null; threadId = null;
}} }}
> >

View File

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

View File

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

View File

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