chore: migrate away from event dispatcher (#12820)

This commit is contained in:
Daniel Dietzler
2024-09-20 23:02:58 +02:00
committed by GitHub
parent 529d49471f
commit 124eb8251b
72 changed files with 360 additions and 656 deletions

View File

@@ -267,10 +267,7 @@
</script>
{#if toCreateLibrary}
<LibraryUserPickerForm
on:submit={({ detail }) => handleCreate(detail.ownerId)}
on:cancel={() => (toCreateLibrary = false)}
/>
<LibraryUserPickerForm onSubmit={handleCreate} onCancel={() => (toCreateLibrary = false)} />
{/if}
<UserPageLayout title={data.meta.title} admin>
@@ -385,28 +382,20 @@
</tr>
{#if renameLibrary === index}
<div transition:slide={{ duration: 250 }}>
<LibraryRenameForm
{library}
on:submit={({ detail }) => handleUpdate(detail)}
on:cancel={() => (renameLibrary = null)}
/>
<LibraryRenameForm {library} onSubmit={handleUpdate} onCancel={() => (renameLibrary = null)} />
</div>
{/if}
{#if editImportPaths === index}
<div transition:slide={{ duration: 250 }}>
<LibraryImportPathsForm
{library}
on:submit={({ detail }) => handleUpdate(detail)}
on:cancel={() => (editImportPaths = null)}
/>
<LibraryImportPathsForm {library} onSubmit={handleUpdate} onCancel={() => (editImportPaths = null)} />
</div>
{/if}
{#if editScanSettings === index}
<div transition:slide={{ duration: 250 }} class="mb-4 ml-4 mr-4">
<LibraryScanSettingsForm
{library}
on:submit={({ detail: library }) => handleUpdate(library)}
on:cancel={() => (editScanSettings = null)}
onSubmit={handleUpdate}
onCancel={() => (editScanSettings = null)}
/>
</div>
{/if}

View File

@@ -110,8 +110,8 @@
<section class="w-full pb-28 lg:w-[850px]">
{#if shouldShowCreateUserForm}
<CreateUserForm
on:submit={onUserCreated}
on:cancel={() => (shouldShowCreateUserForm = false)}
onSubmit={onUserCreated}
onCancel={() => (shouldShowCreateUserForm = false)}
onClose={() => (shouldShowCreateUserForm = false)}
/>
{/if}
@@ -121,8 +121,8 @@
user={selectedUser}
bind:newPassword
canResetPassword={selectedUser?.id !== $user.id}
on:editSuccess={onEditUserSuccess}
on:resetPasswordSuccess={onEditPasswordSuccess}
onEditSuccess={onEditUserSuccess}
onResetPasswordSuccess={onEditPasswordSuccess}
onClose={() => (shouldShowEditUserForm = false)}
/>
{/if}