mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(web): add an option to fill the screen with the slideshow view (#8909)
* feat: add an option to fill the screen with the slideshow view * fix: rename var
This commit is contained in:
parent
4478e524f8
commit
eaf9e5e477
3 changed files with 46 additions and 12 deletions
|
|
@ -13,6 +13,16 @@ export enum SlideshowNavigation {
|
|||
DescendingOrder = 'descending-order',
|
||||
}
|
||||
|
||||
export enum SlideshowLook {
|
||||
Contain = 'contain',
|
||||
Cover = 'cover',
|
||||
}
|
||||
|
||||
export const slideshowLookCssMapping: Record<SlideshowLook, string> = {
|
||||
[SlideshowLook.Contain]: 'object-contain',
|
||||
[SlideshowLook.Cover]: 'object-cover',
|
||||
};
|
||||
|
||||
function createSlideshowStore() {
|
||||
const restartState = writable<boolean>(false);
|
||||
const stopState = writable<boolean>(false);
|
||||
|
|
@ -21,6 +31,7 @@ function createSlideshowStore() {
|
|||
'slideshow-navigation',
|
||||
SlideshowNavigation.DescendingOrder,
|
||||
);
|
||||
const slideshowLook = persisted<SlideshowLook>('slideshow-look', SlideshowLook.Contain);
|
||||
const slideshowState = writable<SlideshowState>(SlideshowState.None);
|
||||
|
||||
const showProgressBar = persisted<boolean>('slideshow-show-progressbar', true);
|
||||
|
|
@ -50,6 +61,7 @@ function createSlideshowStore() {
|
|||
},
|
||||
},
|
||||
slideshowNavigation,
|
||||
slideshowLook,
|
||||
slideshowState,
|
||||
slideshowDelay,
|
||||
showProgressBar,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue