mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
Added error handling notification (#536)
This commit is contained in:
@@ -21,6 +21,10 @@
|
||||
import ControlAppBar from '$lib/components/shared-components/control-app-bar.svelte';
|
||||
import type { PageData } from './$types';
|
||||
import { onMount } from 'svelte';
|
||||
import {
|
||||
notificationController,
|
||||
NotificationType
|
||||
} from '$lib/components/shared-components/notification/notification';
|
||||
|
||||
export let data: PageData;
|
||||
|
||||
@@ -68,7 +72,10 @@
|
||||
pushState(selectedAsset.id);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Error navigating asset forward', e);
|
||||
notificationController.show({
|
||||
type: NotificationType.Info,
|
||||
message: 'You have reached the end'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -80,7 +87,10 @@
|
||||
pushState(selectedAsset.id);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Error navigating asset backward', e);
|
||||
notificationController.show({
|
||||
type: NotificationType.Info,
|
||||
message: 'You have reached the end'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -176,7 +186,11 @@
|
||||
clearMultiSelectAssetAssetHandler();
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Error deleteSelectedAssetHandler', e);
|
||||
notificationController.show({
|
||||
type: NotificationType.Error,
|
||||
message: 'Error deleting assets, check console for more details'
|
||||
});
|
||||
console.error('Error deleteSelectedAssetHandler', e);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user