Skip to content

Commit

Permalink
feat: no slideshow transition
Browse files Browse the repository at this point in the history
  • Loading branch information
martabal committed Sep 27, 2024
1 parent 5b28273 commit db08ca7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
13 changes: 7 additions & 6 deletions web/src/lib/components/asset-viewer/asset-viewer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
stopProgress: stopSlideshowProgress,
slideshowNavigation,
slideshowState,
slideshowTransition,
} = slideshowStore;
let appearsInAlbums: AlbumResponseDto[] = [];
Expand All @@ -82,13 +83,14 @@
let numberOfComments: number;
let fullscreenElement: Element;
let unsubscribes: (() => void)[] = [];
let selectedEditType: string = '';
let stack: StackResponseDto | null = null;
let zoomToggle = () => void 0;
let copyImage: () => Promise<void>;
$: isFullScreen = fullscreenElement !== null;
let stack: StackResponseDto | null = null;
const refreshStack = async () => {
if (isSharedLink()) {
return;
Expand Down Expand Up @@ -390,11 +392,9 @@
onAction?.(action);
};
let selectedEditType: string = '';
function handleUpdateSelectedEditType(type: string) {
const handleUpdateSelectedEditType = (type: string) => {
selectedEditType = type;
}
};
</script>

<svelte:document bind:fullscreenElement />
Expand Down Expand Up @@ -508,6 +508,7 @@
onNextAsset={() => navigateAsset('next')}
on:close={closeViewer}
{sharedLink}
haveFadeTransition={$slideshowState === SlideshowState.None || $slideshowTransition}
/>
{/if}
{:else}
Expand Down
3 changes: 2 additions & 1 deletion web/src/lib/components/slideshow-settings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import SettingDropdown from './shared-components/settings/setting-dropdown.svelte';
import { t } from 'svelte-i18n';
const { slideshowDelay, showProgressBar, slideshowNavigation, slideshowLook } = slideshowStore;
const { slideshowDelay, showProgressBar, slideshowNavigation, slideshowLook, slideshowTransition } = slideshowStore;
export let onClose = () => {};
Expand Down Expand Up @@ -65,6 +65,7 @@
}}
/>
<SettingSwitch title={$t('show_progress_bar')} bind:checked={$showProgressBar} />
<SettingSwitch title={$t('show_slideshow_transition')} bind:checked={$slideshowTransition} />
<SettingInputField
inputType={SettingInputFieldType.NUMBER}
label={$t('duration')}
Expand Down
1 change: 1 addition & 0 deletions web/src/lib/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,7 @@
"show_person_options": "Show person options",
"show_progress_bar": "Show Progress Bar",
"show_search_options": "Show search options",
"show_slideshow_transition": "Show slideshow transition",
"show_supporter_badge": "Supporter badge",
"show_supporter_badge_description": "Show a supporter badge",
"shuffle": "Shuffle",
Expand Down
2 changes: 2 additions & 0 deletions web/src/lib/stores/slideshow.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function createSlideshowStore() {

const showProgressBar = persisted<boolean>('slideshow-show-progressbar', true);
const slideshowDelay = persisted<number>('slideshow-delay', 5, {});
const slideshowTransition = persisted<boolean>('slideshow-transition', true);

return {
restartProgress: {
Expand Down Expand Up @@ -67,6 +68,7 @@ function createSlideshowStore() {
slideshowState,
slideshowDelay,
showProgressBar,
slideshowTransition,
};
}

Expand Down

0 comments on commit db08ca7

Please sign in to comment.