feat(web): ascending order for slideshow (#7502)

* feat: ascending order for slideshow

* feat: use dropdown

* rename

* fix: size

* pr feedback

* fix: hide text on small screen

* Wording

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
martin 2024-03-02 16:50:02 +01:00 committed by GitHub
parent db455060f0
commit 8d44afe915
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 144 additions and 64 deletions

View file

@ -7,11 +7,20 @@ export enum SlideshowState {
None = 'none',
}
export enum SlideshowNavigation {
Shuffle = 'shuffle',
AscendingOrder = 'ascending-order',
DescendingOrder = 'descending-order',
}
function createSlideshowStore() {
const restartState = writable<boolean>(false);
const stopState = writable<boolean>(false);
const slideshowShuffle = persisted<boolean>('slideshow-shuffle', true);
const slideshowNavigation = persisted<SlideshowNavigation>(
'slideshow-navigation',
SlideshowNavigation.DescendingOrder,
);
const slideshowState = writable<SlideshowState>(SlideshowState.None);
const showProgressBar = persisted<boolean>('slideshow-show-progressbar', true);
@ -40,7 +49,7 @@ function createSlideshowStore() {
}
},
},
slideshowShuffle,
slideshowNavigation,
slideshowState,
slideshowDelay,
showProgressBar,