mirror of
https://github.com/immich-app/immich.git
synced 2025-01-21 00:52:43 -05:00
chore(web): Fixing up missing awaits (#3882)
* chore(web): Fixing up some missing awaits. * chore(web/shared-viewer): Update import to shorted version.
This commit is contained in:
parent
f1027d7807
commit
305889f32b
6 changed files with 15 additions and 15 deletions
|
@ -58,7 +58,7 @@
|
|||
document.addEventListener('keydown', onKeyboardPress);
|
||||
|
||||
if (!sharedLink) {
|
||||
getAllAlbums();
|
||||
await getAllAlbums();
|
||||
}
|
||||
|
||||
// Import hack :( see https://github.com/vadimkorr/svelte-carousel/issues/27#issuecomment-851022295
|
||||
|
@ -136,7 +136,7 @@
|
|||
if (hasNext) {
|
||||
progressBar.restart(true);
|
||||
} else {
|
||||
handleStopSlideshow();
|
||||
await handleStopSlideshow();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@
|
|||
},
|
||||
});
|
||||
|
||||
navigateAssetForward();
|
||||
await navigateAssetForward();
|
||||
|
||||
for (const asset of deletedAssets) {
|
||||
if (asset.status == 'SUCCESS') {
|
||||
|
@ -201,7 +201,7 @@
|
|||
message: asset.isFavorite ? `Added to favorites` : `Removed from favorites`,
|
||||
});
|
||||
} catch (error) {
|
||||
handleError(error, `Unable to ${asset.isFavorite ? `add asset to` : `remove asset from`} favorites`);
|
||||
await handleError(error, `Unable to ${asset.isFavorite ? `add asset to` : `remove asset from`} favorites`);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -258,7 +258,7 @@
|
|||
message: asset.isArchived ? `Added to archive` : `Removed from archive`,
|
||||
});
|
||||
} catch (error) {
|
||||
handleError(error, `Unable to ${asset.isArchived ? `add asset to` : `remove asset from`} archive`);
|
||||
await handleError(error, `Unable to ${asset.isArchived ? `add asset to` : `remove asset from`} archive`);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -278,7 +278,7 @@
|
|||
await api.assetApi.runAssetJobs({ assetJobsDto: { assetIds: [asset.id], name } });
|
||||
notificationController.show({ type: NotificationType.Info, message: api.getAssetJobMessage(name) });
|
||||
} catch (error) {
|
||||
handleError(error, `Unable to submit job`);
|
||||
await handleError(error, `Unable to submit job`);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import { createEventDispatcher } from 'svelte';
|
||||
import { videoViewerVolume } from '$lib/stores/preferences.store';
|
||||
import LoadingSpinner from '../shared-components/loading-spinner.svelte';
|
||||
import { handleError } from '../../utils/handle-error';
|
||||
import { handleError } from '$lib/utils/handle-error';
|
||||
|
||||
export let assetId: string;
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
|||
video.muted = false;
|
||||
dispatch('onVideoStarted');
|
||||
} catch (error) {
|
||||
handleError(error, 'Unable to play video');
|
||||
await handleError(error, 'Unable to play video');
|
||||
} finally {
|
||||
isVideoLoading = false;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
});
|
||||
|
||||
if (status === 201) {
|
||||
goto(AppRoute.AUTH_LOGIN);
|
||||
await goto(AppRoute.AUTH_LOGIN);
|
||||
return;
|
||||
} else {
|
||||
error = 'Error create admin account';
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
}
|
||||
} catch (error) {
|
||||
authConfig.passwordLoginEnabled = true;
|
||||
handleError(error, 'Unable to connect!');
|
||||
await handleError(error, 'Unable to connect!');
|
||||
}
|
||||
|
||||
oauthLoading = false;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
import SelectAll from 'svelte-material-icons/SelectAll.svelte';
|
||||
import ImmichLogo from '../shared-components/immich-logo.svelte';
|
||||
import { notificationController, NotificationType } from '../shared-components/notification/notification';
|
||||
import { handleError } from '../../utils/handle-error';
|
||||
import { handleError } from '$lib/utils/handle-error';
|
||||
|
||||
export let sharedLink: SharedLinkResponseDto;
|
||||
export let isOwned: boolean;
|
||||
|
@ -60,7 +60,7 @@
|
|||
type: NotificationType.Info,
|
||||
});
|
||||
} catch (e) {
|
||||
handleError(e, 'Unable to add assets to shared link');
|
||||
await handleError(e, 'Unable to add assets to shared link');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -37,14 +37,14 @@
|
|||
await api.sharedLinkApi.removeSharedLink({ id: deleteLinkId });
|
||||
notificationController.show({ message: 'Deleted shared link', type: NotificationType.Info });
|
||||
deleteLinkId = null;
|
||||
refresh();
|
||||
await refresh();
|
||||
} catch (error) {
|
||||
handleError(error, 'Unable to delete shared link');
|
||||
await handleError(error, 'Unable to delete shared link');
|
||||
}
|
||||
};
|
||||
|
||||
const handleEditDone = async () => {
|
||||
refresh();
|
||||
await refresh();
|
||||
editSharedLink = null;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue