Skip to content

Commit 87b86b8

Browse files
committed
Display play icon over live photos' previews
Signed-off-by: Louis Chemineau <[email protected]>
1 parent 17f48e0 commit 87b86b8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

apps/files/src/components/FileEntry/FileEntryPreview.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
:aria-label="t('files', 'Favorite')">
5151
<FavoriteIcon v-once />
5252
</span>
53+
54+
<OverlayIcon :is="fileOverlay"
55+
v-if="fileOverlay"
56+
class="files-list__row-icon-overlay" />
5357
</span>
5458
</template>
5559

@@ -71,9 +75,11 @@ import KeyIcon from 'vue-material-design-icons/Key.vue'
7175
import LinkIcon from 'vue-material-design-icons/Link.vue'
7276
import NetworkIcon from 'vue-material-design-icons/Network.vue'
7377
import TagIcon from 'vue-material-design-icons/Tag.vue'
78+
import PlayCircleIcon from 'vue-material-design-icons/PlayCircle.vue'
7479
7580
import { useUserConfigStore } from '../../store/userconfig.ts'
7681
import FavoriteIcon from './FavoriteIcon.vue'
82+
import { isLivePhoto } from '../../services/LivePhotos'
7783
7884
export default Vue.extend({
7985
name: 'FileEntryPreview',
@@ -163,6 +169,14 @@ export default Vue.extend({
163169
}
164170
},
165171
172+
fileOverlay() {
173+
if (isLivePhoto(this.source)) {
174+
return PlayCircleIcon
175+
}
176+
177+
return null
178+
},
179+
166180
folderOverlay() {
167181
if (this.source.type !== FileType.Folder) {
168182
return null

0 commit comments

Comments
 (0)