Skip to content

Commit

Permalink
viewer: allow showing meta in slideshow (close #819)
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Patil <[email protected]>
  • Loading branch information
pulsejet committed Mar 11, 2024
1 parent c463ecf commit f20929a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 23 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
- Hide files starting with `.` in the timeline
- Prevent automatically retrying failed indexing jobs
- Support for 3GP videos ([#1055](https://github.com/pulsejet/memories/issues/1055))
- Option to show metadata in slideshow ([#819](https://github.com/pulsejet/memories/issues/819))

## [v6.2.2] - 2024-01-10

Expand Down
34 changes: 12 additions & 22 deletions src/components/Settings.vue
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
<!--
- @copyright Copyright (c) 2019 John Molakvoæ <[email protected]>
-
- @author John Molakvoæ <[email protected]>
-
- @license AGPL-3.0-or-later
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-->

<template>
<div>
<NcAppSettingsDialog
Expand Down Expand Up @@ -72,6 +50,14 @@
{{ t('memories', 'Show full file path in sidebar') }}
</NcCheckboxRadioSwitch>

<NcCheckboxRadioSwitch
:checked.sync="config.metadata_in_slideshow"
@update:checked="updateMetadataInSlideshow"
type="switch"
>
{{ t('memories', 'Show metadata in slideshow') }}
</NcCheckboxRadioSwitch>

<div class="radio-group">
<div class="title">{{ t('memories', 'High resolution image loading behavior') }}</div>
<NcCheckboxRadioSwitch
Expand Down Expand Up @@ -330,6 +316,10 @@ export default defineComponent({
await this.updateSetting('sidebar_filepath', 'sidebarFilepath');
},
async updateMetadataInSlideshow() {
await this.updateSetting('metadata_in_slideshow', 'metadataInSlideshow');
},
// Folders settings
async updateShowHidden() {
await this.updateSetting('show_hidden_folders', 'showHidden');
Expand Down
7 changes: 6 additions & 1 deletion src/components/viewer/Viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,12 @@ export default defineComponent({
/** Show bottom bar info such as date taken */
showBottomBar(): boolean {
return this.showControls && !this.isVideo && this.fullyOpened && Boolean(this.currentPhoto?.imageInfo);
return (
(this.showControls || (!!this.slideshowTimer && this.config.metadata_in_slideshow)) &&
!this.isVideo &&
this.fullyOpened &&
Boolean(this.currentPhoto?.imageInfo)
);
},
/** Allow closing the viewer */
Expand Down
1 change: 1 addition & 0 deletions src/services/static-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ class StaticConfig {
high_res_cond_default: 'zoom',
livephoto_autoplay: true,
sidebar_filepath: false,
metadata_in_slideshow: false,

// folder settings
folders_path: '',
Expand Down
1 change: 1 addition & 0 deletions src/typings/config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ declare module '@typings' {
high_res_cond_default: HighResCond;
livephoto_autoplay: boolean;
sidebar_filepath: boolean;
metadata_in_slideshow: boolean;

// folder settings
folders_path: string;
Expand Down

0 comments on commit f20929a

Please sign in to comment.