Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: no slideshow transition #12989

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading