mirror of
https://github.com/immich-app/immich.git
synced 2026-03-26 11:50:53 +03:00
feat: loop slideshows (#25462)
* Add Repeat to the slideshow in the web UI. * Fix typo in SlideshowSettingsModal description prop Fixed spelling --------- Co-authored-by: generalzero <generalzero@generalzero.org>
This commit is contained in:
committed by
GitHub
parent
d0d269677e
commit
497003ec57
@@ -94,6 +94,7 @@
|
||||
slideshowNavigation,
|
||||
slideshowState,
|
||||
slideshowTransition,
|
||||
slideshowRepeat,
|
||||
} = slideshowStore;
|
||||
const stackThumbnailSize = 60;
|
||||
const stackSelectedThumbnailSize = 65;
|
||||
@@ -109,6 +110,7 @@
|
||||
let stack: StackResponseDto | null = $state(null);
|
||||
|
||||
let playOriginalVideo = $state($alwaysLoadOriginalVideo);
|
||||
let slideshowStartAssetId = $state<string>();
|
||||
|
||||
const setPlayOriginalVideo = (value: boolean) => {
|
||||
playOriginalVideo = value;
|
||||
@@ -238,6 +240,10 @@
|
||||
if ($slideshowState === SlideshowState.PlaySlideshow) {
|
||||
if (hasNext) {
|
||||
$restartSlideshowProgress = true;
|
||||
} else if ($slideshowRepeat && slideshowStartAssetId) {
|
||||
// Loop back to starting asset
|
||||
await setAssetId(slideshowStartAssetId);
|
||||
$restartSlideshowProgress = true;
|
||||
} else {
|
||||
await handleStopSlideshow();
|
||||
}
|
||||
@@ -262,6 +268,7 @@
|
||||
};
|
||||
|
||||
const handlePlaySlideshow = async () => {
|
||||
slideshowStartAssetId = asset.id;
|
||||
try {
|
||||
await assetViewerHtmlElement?.requestFullscreen?.();
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user