feat(web): theme/locale preferences and improve SSR (#1832)

This commit is contained in:
Michel Heusschen 2023-02-22 18:53:08 +01:00 committed by GitHub
parent a9a769d902
commit 10cb612fb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 142 additions and 144 deletions

View file

@ -24,6 +24,7 @@
import { assetStore } from '$lib/stores/assets.store';
import { addAssetsToAlbum } from '$lib/utils/asset-utils';
import { browser } from '$app/environment';
export let asset: AssetResponseDto;
export let publicSharedKey = '';
@ -54,7 +55,9 @@
});
onDestroy(() => {
document.removeEventListener('keydown', onKeyboardPress);
if (browser) {
document.removeEventListener('keydown', onKeyboardPress);
}
});
$: asset.id && getAllAlbums(); // Update the album information when the asset ID changes