feat(web) Add search functionality to add photo to album modal (#1273)

This commit is contained in:
Krisjanis Lejejs
2023-01-09 22:24:07 +02:00
committed by GitHub
parent 10789503c1
commit e4e040f14b
4 changed files with 74 additions and 31 deletions

View File

@@ -79,11 +79,12 @@
addToSharedAlbum = shared;
};
const handleAddToNewAlbum = () => {
const handleAddToNewAlbum = (event: CustomEvent) => {
isShowAlbumPicker = false;
const { albumName }: { albumName: string } = event.detail;
const assetIds = Array.from($selectedAssets).map((asset) => asset.id);
api.albumApi.createAlbum({ albumName: 'Untitled', assetIds }).then((response) => {
api.albumApi.createAlbum({ albumName, assetIds }).then((response) => {
const { id, albumName } = response.data;
notificationController.show({