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
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