feat(web): enable websocket (#3765)

* send store event to page

* fix format

* add new asset to existing bucket

* format

* debouncing

* format

* load bucket

* feedback

* feat: listen to deletes and auto-subscribe on all asset grid pages

* feat: auto refresh on person thumbnail

* chore: skip upload event for now

* fix: person thumbnail event

* fix merge

* update handleAssetDeletion with websocket communication

* update info box on mount

* fix test

* fix test

* feat: event for trash asset

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
Alex 2023-10-06 15:48:11 -05:00 committed by GitHub
parent 4dffae3f39
commit 36b21948bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 279 additions and 136 deletions

View file

@ -44,6 +44,7 @@
onMount(async () => {
showSkeleton = false;
document.addEventListener('keydown', onKeyboardPress);
assetStore.connect();
await assetStore.init(viewport);
});
@ -55,6 +56,8 @@
if ($showAssetViewer) {
$showAssetViewer = false;
}
assetStore.disconnect();
});
const handleKeyboardPress = (event: KeyboardEvent) => {