mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-19 09:53:22 +02:00
feat: Improve container on:navigate
This commit is contained in:
@@ -42,10 +42,15 @@
|
||||
<Container class="flex-1 flex">
|
||||
<HeroShowcaseBackground {urls} {index} />
|
||||
<Container
|
||||
handleNavigateOut={{
|
||||
right: onNext,
|
||||
left: onPrevious,
|
||||
up: () => Selectable.giveFocus('left', true) || true
|
||||
on:navigate={({ detail }) => {
|
||||
if (detail.options.direction === 'right') {
|
||||
if (onNext()) detail.preventNavigation();
|
||||
} else if (detail.options.direction === 'left') {
|
||||
if (onPrevious()) detail.preventNavigation();
|
||||
} else if (detail.options.direction === 'up') {
|
||||
Selectable.giveFocus('left', true);
|
||||
detail.preventNavigation();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<div class="flex flex-1 z-10">
|
||||
|
||||
Reference in New Issue
Block a user