fix: TV Back button not working and choppy sidebar animations

This commit is contained in:
Aleksi Lassila
2024-04-14 15:38:28 +03:00
parent 72027faff2
commit d3a47555fd
8 changed files with 29 additions and 9 deletions

View File

@@ -2,9 +2,22 @@
import Container from '../../Container.svelte';
import { appState } from '../stores/app-state.store';
import Button from '../components/Button.svelte';
let lastKeyCode = 0;
let lastKey = '';
</script>
<Container class="pl-24 flex flex-col items-start" focusOnMount>
User agent: {window.navigator.userAgent}
<div>Last key code: {lastKeyCode}</div>
<div>Last key: {lastKey}</div>
<Button on:clickOrSelect={appState.logOut} class="hover:bg-red-500">Log Out</Button>
</Container>
<svelte:window
on:keydown={(e) => {
console.log('keypress', e);
lastKeyCode = e.keyCode;
lastKey = e.key;
}}
/>

View File

@@ -68,7 +68,7 @@
<DotFilled />
<p class="flex-shrink-0">
<a href={'https://www.themoviedb.org/movie/' + movie.id}
>{movie.vote_average} TMDB</a
>{movie.vote_average?.toFixed(1)} TMDB</a
>
</p>
</div>