mirror of
https://github.com/immich-app/immich.git
synced 2025-01-21 03:02:44 +01:00
fix(web): multiple fixes for the webUI (#8368)
fix: multiple fixes for the webUI
This commit is contained in:
parent
4b39d37cae
commit
6a36bbd1d1
1 changed files with 12 additions and 9 deletions
|
@ -286,7 +286,15 @@
|
||||||
$restartSlideshowProgress = true;
|
$restartSlideshowProgress = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const navigateAsset = async (order: 'previous' | 'next', e?: Event) => {
|
const navigateAsset = async (order?: 'previous' | 'next', e?: Event) => {
|
||||||
|
if (!order) {
|
||||||
|
if ($slideshowState === SlideshowState.PlaySlideshow) {
|
||||||
|
order = $slideshowNavigation === SlideshowNavigation.AscendingOrder ? 'previous' : 'next';
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($slideshowState === SlideshowState.PlaySlideshow && $slideshowNavigation === SlideshowNavigation.Shuffle) {
|
if ($slideshowState === SlideshowState.PlaySlideshow && $slideshowNavigation === SlideshowNavigation.Shuffle) {
|
||||||
return (order === 'previous' ? slideshowHistory.previous() : slideshowHistory.next()) || navigateAssetRandom();
|
return (order === 'previous' ? slideshowHistory.previous() : slideshowHistory.next()) || navigateAssetRandom();
|
||||||
}
|
}
|
||||||
|
@ -446,12 +454,6 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleVideoEnded = async () => {
|
|
||||||
if ($slideshowState === SlideshowState.PlaySlideshow) {
|
|
||||||
await navigateAsset('next');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const handlePlaySlideshow = async () => {
|
const handlePlaySlideshow = async () => {
|
||||||
try {
|
try {
|
||||||
await assetViewerHtmlElement.requestFullscreen();
|
await assetViewerHtmlElement.requestFullscreen();
|
||||||
|
@ -464,6 +466,7 @@
|
||||||
const handleStopSlideshow = async () => {
|
const handleStopSlideshow = async () => {
|
||||||
try {
|
try {
|
||||||
if (document.fullscreenElement) {
|
if (document.fullscreenElement) {
|
||||||
|
document.body.style.cursor = '';
|
||||||
await document.exitFullscreen();
|
await document.exitFullscreen();
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -588,7 +591,7 @@
|
||||||
<VideoViewer
|
<VideoViewer
|
||||||
assetId={previewStackedAsset.id}
|
assetId={previewStackedAsset.id}
|
||||||
on:close={closeViewer}
|
on:close={closeViewer}
|
||||||
on:onVideoEnded={handleVideoEnded}
|
on:onVideoEnded={() => navigateAsset()}
|
||||||
on:onVideoStarted={handleVideoStarted}
|
on:onVideoStarted={handleVideoStarted}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -621,7 +624,7 @@
|
||||||
<VideoViewer
|
<VideoViewer
|
||||||
assetId={asset.id}
|
assetId={asset.id}
|
||||||
on:close={closeViewer}
|
on:close={closeViewer}
|
||||||
on:onVideoEnded={handleVideoEnded}
|
on:onVideoEnded={() => navigateAsset()}
|
||||||
on:onVideoStarted={handleVideoStarted}
|
on:onVideoStarted={handleVideoStarted}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
Loading…
Reference in a new issue