Skip to content

Commit

Permalink
Display play icon over live photos' previews
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <louis@chmn.me>
  • Loading branch information
artonge committed Nov 8, 2023
1 parent 17f48e0 commit 87b86b8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions apps/files/src/components/FileEntry/FileEntryPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
:aria-label="t('files', 'Favorite')">
<FavoriteIcon v-once />
</span>

<OverlayIcon :is="fileOverlay"
v-if="fileOverlay"
class="files-list__row-icon-overlay" />
</span>
</template>

Expand All @@ -71,9 +75,11 @@ import KeyIcon from 'vue-material-design-icons/Key.vue'
import LinkIcon from 'vue-material-design-icons/Link.vue'
import NetworkIcon from 'vue-material-design-icons/Network.vue'
import TagIcon from 'vue-material-design-icons/Tag.vue'
import PlayCircleIcon from 'vue-material-design-icons/PlayCircle.vue'
import { useUserConfigStore } from '../../store/userconfig.ts'
import FavoriteIcon from './FavoriteIcon.vue'
import { isLivePhoto } from '../../services/LivePhotos'
export default Vue.extend({
name: 'FileEntryPreview',
Expand Down Expand Up @@ -163,6 +169,14 @@ export default Vue.extend({
}
},
fileOverlay() {
if (isLivePhoto(this.source)) {
return PlayCircleIcon
}
return null
},
folderOverlay() {
if (this.source.type !== FileType.Folder) {
return null
Expand Down

0 comments on commit 87b86b8

Please sign in to comment.