diff --git a/web/src/lib/components/forms/login-form.svelte b/web/src/lib/components/forms/login-form.svelte
index 111e6c3fda..ef7d9b0b1e 100644
--- a/web/src/lib/components/forms/login-form.svelte
+++ b/web/src/lib/components/forms/login-form.svelte
@@ -16,7 +16,10 @@
let loading = false;
let oauthLoading = true;
- const dispatch = createEventDispatcher();
+ const dispatch = createEventDispatcher<{
+ success: void;
+ firstLogin: void;
+ }>();
onMount(async () => {
if (!$featureFlags.oauth) {
@@ -62,7 +65,7 @@
});
if (!data.isAdmin && data.shouldChangePassword) {
- dispatch('first-login');
+ dispatch('firstLogin');
return;
}
diff --git a/web/src/lib/components/photos-page/actions/create-shared-link.svelte b/web/src/lib/components/photos-page/actions/create-shared-link.svelte
index 29200800f9..6e700807af 100644
--- a/web/src/lib/components/photos-page/actions/create-shared-link.svelte
+++ b/web/src/lib/components/photos-page/actions/create-shared-link.svelte
@@ -6,7 +6,9 @@
import { getAssetControlContext } from '../asset-select-control-bar.svelte';
let showModal = false;
- const dispatch = createEventDispatcher();
+ const dispatch = createEventDispatcher<{
+ escape: void;
+ }>();
const { getAssets } = getAssetControlContext();
const escape = () => {
dispatch('escape');
diff --git a/web/src/lib/components/photos-page/actions/delete-assets.svelte b/web/src/lib/components/photos-page/actions/delete-assets.svelte
index 68d133ae97..02fbdaeed3 100644
--- a/web/src/lib/components/photos-page/actions/delete-assets.svelte
+++ b/web/src/lib/components/photos-page/actions/delete-assets.svelte
@@ -19,7 +19,9 @@
const { clearSelect, getOwnedAssets } = getAssetControlContext();
- const dispatch = createEventDispatcher();
+ const dispatch = createEventDispatcher<{
+ escape: void;
+ }>();
let isShowConfirmation = false;
let loading = false;
diff --git a/web/src/lib/components/shared-components/album-selection-modal.svelte b/web/src/lib/components/shared-components/album-selection-modal.svelte
index 27460ba2aa..6def8c4ef7 100644
--- a/web/src/lib/components/shared-components/album-selection-modal.svelte
+++ b/web/src/lib/components/shared-components/album-selection-modal.svelte
@@ -12,7 +12,18 @@
let loading = true;
let search = '';
- const dispatch = createEventDispatcher();
+ const dispatch = createEventDispatcher<{
+ newAlbum: {
+ albumName: string;
+ };
+ album: {
+ album: AlbumResponseDto;
+ };
+ newSharedAlbum: {
+ albumName: string;
+ };
+ close: void;
+ }>();
export let shared: boolean;
diff --git a/web/src/lib/components/shared-components/base-modal.svelte b/web/src/lib/components/shared-components/base-modal.svelte
index 7b466a333b..a1aae869f7 100644
--- a/web/src/lib/components/shared-components/base-modal.svelte
+++ b/web/src/lib/components/shared-components/base-modal.svelte
@@ -7,7 +7,10 @@
import { clickOutside } from '$lib/utils/click-outside';
import { mdiClose } from '@mdi/js';
- const dispatch = createEventDispatcher();
+ const dispatch = createEventDispatcher<{
+ escape: void;
+ close: void;
+ }>();
export let zIndex = 9999;
export let ignoreClickOutside = false;
diff --git a/web/src/lib/components/shared-components/create-share-link-modal/create-shared-link-modal.svelte b/web/src/lib/components/shared-components/create-share-link-modal/create-shared-link-modal.svelte
index 970ae63175..cec2686c7e 100644
--- a/web/src/lib/components/shared-components/create-share-link-modal/create-shared-link-modal.svelte
+++ b/web/src/lib/components/shared-components/create-share-link-modal/create-shared-link-modal.svelte
@@ -29,7 +29,10 @@
let canCopyImagesToClipboard = true;
let enablePassword = false;
- const dispatch = createEventDispatcher();
+ const dispatch = createEventDispatcher<{
+ close: void;
+ escape: void;
+ }>();
const expiredDateOption: ImmichDropDownOption = {
default: 'Never',
diff --git a/web/src/lib/components/shared-components/gallery-viewer/asset-selection-viewer.svelte b/web/src/lib/components/shared-components/gallery-viewer/asset-selection-viewer.svelte
index 067971c0af..75e9ad8c5a 100644
--- a/web/src/lib/components/shared-components/gallery-viewer/asset-selection-viewer.svelte
+++ b/web/src/lib/components/shared-components/gallery-viewer/asset-selection-viewer.svelte
@@ -11,7 +11,9 @@
let viewWidth: number;
$: thumbnailSize = getThumbnailSize(assets.length, viewWidth);
- let dispatch = createEventDispatcher();
+ let dispatch = createEventDispatcher<{
+ select: { asset: AssetResponseDto; selectedAssets: Set
};
+ }>();
const selectAssetHandler = (event: CustomEvent) => {
const { asset }: { asset: AssetResponseDto } = event.detail;
diff --git a/web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte b/web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte
index 938fe157eb..0c790c2851 100644
--- a/web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte
+++ b/web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte
@@ -16,7 +16,10 @@
let isShowSelectAvatar = false;
- const dispatch = createEventDispatcher();
+ const dispatch = createEventDispatcher<{
+ logout: void;
+ close: void;
+ }>();
const handleSaveProfile = async (color: UserAvatarColor) => {
try {
diff --git a/web/src/lib/components/shared-components/navigation-bar/avatar-selector.svelte b/web/src/lib/components/shared-components/navigation-bar/avatar-selector.svelte
index 6d7e395785..a29d436179 100644
--- a/web/src/lib/components/shared-components/navigation-bar/avatar-selector.svelte
+++ b/web/src/lib/components/shared-components/navigation-bar/avatar-selector.svelte
@@ -8,7 +8,10 @@
export let user: UserResponseDto;
- const dispatch = createEventDispatcher();
+ const dispatch = createEventDispatcher<{
+ close: void;
+ choose: UserAvatarColor;
+ }>();
const colors: UserAvatarColor[] = Object.values(UserAvatarColor);
diff --git a/web/src/lib/components/shared-components/navigation-bar/navigation-bar.svelte b/web/src/lib/components/shared-components/navigation-bar/navigation-bar.svelte
index 608e806248..c6fa67cf18 100644
--- a/web/src/lib/components/shared-components/navigation-bar/navigation-bar.svelte
+++ b/web/src/lib/components/shared-components/navigation-bar/navigation-bar.svelte
@@ -23,7 +23,9 @@
let shouldShowAccountInfo = false;
let shouldShowAccountInfoPanel = false;
- const dispatch = createEventDispatcher();
+ const dispatch = createEventDispatcher<{
+ uploadClicked: void;
+ }>();
const logOut = async () => {
const { data } = await api.authenticationApi.logout();
diff --git a/web/src/lib/components/shared-components/profile-image-cropper.svelte b/web/src/lib/components/shared-components/profile-image-cropper.svelte
index cd0e917d51..c8544ef0ac 100644
--- a/web/src/lib/components/shared-components/profile-image-cropper.svelte
+++ b/web/src/lib/components/shared-components/profile-image-cropper.svelte
@@ -10,7 +10,9 @@
export let asset: AssetResponseDto;
- const dispatch = createEventDispatcher();
+ const dispatch = createEventDispatcher<{
+ close: void;
+ }>();
let imgElement: HTMLDivElement;
onMount(() => {
diff --git a/web/src/lib/components/shared-components/show-shortcuts.svelte b/web/src/lib/components/shared-components/show-shortcuts.svelte
index e0f1f0974e..2f725f1a45 100644
--- a/web/src/lib/components/shared-components/show-shortcuts.svelte
+++ b/web/src/lib/components/shared-components/show-shortcuts.svelte
@@ -19,7 +19,9 @@
{ key: ['Del'], action: 'Delete Asset' },
],
};
- const dispatch = createEventDispatcher();
+ const dispatch = createEventDispatcher<{
+ close: void;
+ }>();
dispatch('close')} on:escape={() => dispatch('close')}>
diff --git a/web/src/lib/components/shared-components/side-bar/side-bar-button.svelte b/web/src/lib/components/shared-components/side-bar/side-bar-button.svelte
index a23eeed032..fbefb2eb5c 100644
--- a/web/src/lib/components/shared-components/side-bar/side-bar-button.svelte
+++ b/web/src/lib/components/shared-components/side-bar/side-bar-button.svelte
@@ -11,7 +11,9 @@
let showMoreInformation = false;
- const dispatch = createEventDispatcher();
+ const dispatch = createEventDispatcher<{
+ selected: void;
+ }>();
const onButtonClicked = () => dispatch('selected');
diff --git a/web/src/lib/components/user-settings-page/device-card.svelte b/web/src/lib/components/user-settings-page/device-card.svelte
index 3cbcd841ba..9558efe388 100644
--- a/web/src/lib/components/user-settings-page/device-card.svelte
+++ b/web/src/lib/components/user-settings-page/device-card.svelte
@@ -17,7 +17,9 @@
export let device: AuthDeviceResponseDto;
- const dispatcher = createEventDispatcher();
+ const dispatcher = createEventDispatcher<{
+ delete: void;
+ }>();
const options: ToRelativeCalendarOptions = {
unit: 'days',
diff --git a/web/src/lib/utils/dipatch.ts b/web/src/lib/utils/dipatch.ts
new file mode 100644
index 0000000000..6e3457eaa9
--- /dev/null
+++ b/web/src/lib/utils/dipatch.ts
@@ -0,0 +1,3 @@
+export interface ResetOptions {
+ default?: boolean;
+}
diff --git a/web/src/routes/(user)/albums/+page.svelte b/web/src/routes/(user)/albums/+page.svelte
index 9a4424e796..0c56f690cd 100644
--- a/web/src/routes/(user)/albums/+page.svelte
+++ b/web/src/routes/(user)/albums/+page.svelte
@@ -239,7 +239,7 @@
(shouldShowEditUserForm = false)}>
successModifyAlbum()}
+ on:editSuccess={() => successModifyAlbum()}
on:cancel={() => (shouldShowEditUserForm = false)}
/>
diff --git a/web/src/routes/admin/user-management/+page.svelte b/web/src/routes/admin/user-management/+page.svelte
index 2545bb25a8..ed631c25ff 100644
--- a/web/src/routes/admin/user-management/+page.svelte
+++ b/web/src/routes/admin/user-management/+page.svelte
@@ -107,7 +107,7 @@
-
+
{#if shouldShowCreateUserForm}
(shouldShowCreateUserForm = false)}>
(shouldShowCreateUserForm = false)} />
@@ -119,8 +119,9 @@
(shouldShowEditUserForm = false)}
/>
{/if}
@@ -163,32 +164,34 @@
{/if}
-
+
- Email |
- Name |
- Can import |
- Action |
+ Email |
+ Name |
+ Can import |
+ Action |
{#if allUsers}
{#each allUsers as immichUser, i}
- {immichUser.email} |
- {immichUser.name} |
-
+ | {immichUser.email} |
+ {immichUser.name} |
+
{#if immichUser.externalPath}
@@ -197,18 +200,18 @@
{/if}
|
-
+ |
{#if !isDeleted(immichUser)}
{#if immichUser.id !== $user.id}
@@ -218,62 +221,7 @@
- {/if}
- |
-
- {/each}
- {/if}
-
-
-
-
-
-
- Name |
- Email |
- Action |
-
-
-
- {#if allUsers}
- {#each allUsers as user, i}
-
- {user.name} |
- {user.email} |
-
- {#if !isDeleted(user)}
-
-
- {/if}
- {#if isDeleted(user)}
-
|