Skip to content

Commit a048248

Browse files
jcohlmeyerJRC9 Devs
authored andcommitted
Add Video Preview Image to Replicator Preview Text
1 parent f1ec309 commit a048248

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: VideoEmbed
2-
version: 2.2.3
2+
version: 2.2.4
33
description: A field type for embedding YouTube and Vimeo Videos
44
url: https://github.com/jrc9designstudio/statamic-video-embed
55
developer: JRC9 Design Studio

readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Video Embed for Statamic 2
22
*Requirement:* Statamic v2.6.x, curl
3-
*Version:* 2.2.3
3+
*Version:* 2.2.4
44

55
### What is this?
66
Add YouTube and Vimeo videos to Statamic with a Video Embed field.
@@ -120,6 +120,7 @@ If you really want a simple tag that does it all for you, you can create your ow
120120
- `portrait_cinema` 9:21
121121

122122
### Version Log
123+
- 2.2.4 Add Video Preview Image to Replicator Preview Text
123124
- 2.2.3 Auto Focus & Change Watcher Fix
124125
- 2.2.2 Add Replicator Preview Text
125126
- 2.2.1 Fix for Statamic 2.6

resources/assets/js/fieldtype.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,14 @@ Vue.component('video_embed-fieldtype', {
106106
// Return the current description (striping html) for vue preview.
107107
return this.data.description.replace(/<\/?[^>]+(>|$)/g, "");
108108
},
109+
previewImage: function() {
110+
return this.data.thumbnail_small ? '<img src="' + this.data.thumbnail_small + '" width="auto" height="20" title="' + this.title + '" />' : '';
111+
},
109112
},
110113

111114
methods: {
112115
getReplicatorPreviewText: function() {
113-
return this.title;
116+
return this.previewImage + ' ' + this.title;
114117
},
115118
focus: function() {
116119
this.$els.videoUrlField.focus();

0 commit comments

Comments
 (0)