File tree Expand file tree Collapse file tree 5 files changed +67
-30
lines changed Expand file tree Collapse file tree 5 files changed +67
-30
lines changed Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div style =" white-space : initial " >
3
+ <a v-for =" (link, i) in currentValue" @click.stop =" openLink(link.main)"
4
+ ><v-icon small
5
+ >{{ isVideoUrl(link.main) ? 'mdi-video' : 'mdi-image' }}
6
+ </v-icon ></a
7
+ >
8
+ </div >
9
+ </template >
10
+
11
+ <script >
12
+ import columnMixin from ' ~/mixins/column'
13
+ import { openLink } from ' ~/services/base'
14
+ import { isVideoUrl } from ' ~/services/common'
15
+
16
+ export default {
17
+ mixins: [columnMixin],
18
+
19
+ methods: {
20
+ openLink,
21
+ isVideoUrl,
22
+ },
23
+ computed: {},
24
+ }
25
+ </script >
Original file line number Diff line number Diff line change 1
- <template >
2
- <div >
3
- <a
4
- v-if =" currentValue.firstImageLink"
5
- @click.stop =" openLink(currentValue.firstImageLink)"
6
- ><v-icon small >mdi-image</v-icon ></a
7
- >
8
- <a
9
- v-if =" currentValue.firstVideoLink"
10
- @click.stop =" openLink(currentValue.firstVideoLink)"
11
- ><v-icon small >mdi-video</v-icon ></a
12
- >
13
- </div >
14
- </template >
15
-
16
- <script >
17
- import columnMixin from ' ~/mixins/column'
18
- import { openLink } from ' ~/services/base'
19
-
20
- export default {
21
- mixins: [columnMixin],
22
-
23
- methods: {
24
- openLink,
25
- },
26
- computed: {},
27
- }
28
- </script >
1
+ <template >
2
+ <div >
3
+ <a
4
+ v-if =" currentValue.firstImageLink"
5
+ @click.stop =" openLink(currentValue.firstImageLink)"
6
+ ><v-icon small >mdi-image</v-icon ></a
7
+ >
8
+ <a
9
+ v-if =" currentValue.firstVideoLink"
10
+ @click.stop =" openLink(currentValue.firstVideoLink)"
11
+ ><v-icon small >mdi-video</v-icon ></a
12
+ >
13
+ </div >
14
+ </template >
15
+
16
+ <script >
17
+ import columnMixin from ' ~/mixins/column'
18
+ import { openLink } from ' ~/services/base'
19
+
20
+ export default {
21
+ mixins: [columnMixin],
22
+
23
+ methods: {
24
+ openLink,
25
+ },
26
+ computed: {},
27
+ }
28
+ </script >
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import AdminEditSubmissionInterface from '~/components/interface/crud/special/ad
11
11
import CrudSubmissionInterface from '~/components/interface/crud/special/crudSubmissionInterface.vue'
12
12
import UrlColumn from '~/components/table/urlColumn.vue'
13
13
import EvidenceColumn from '~/components/table/special/evidenceColumn.vue'
14
+ import AllEvidenceColumn from '~/components/table/special/allEvidenceColumn.vue'
14
15
import RankingColumn from '~/components/table/special/rankingColumn.vue'
15
16
import ReignColumn from '~/components/table/special/reignColumn.vue'
16
17
import ParticipantsColumn from '~/components/table/special/participantsColumn.vue'
@@ -187,6 +188,11 @@ export const Submission = <RecordInfo<'submission'>>{
187
188
fields : [ 'firstImageLink' , 'firstVideoLink' ] ,
188
189
component : EvidenceColumn ,
189
190
} ,
191
+ allEvidenceLinks : {
192
+ text : 'Evidence' ,
193
+ fields : [ 'externalLinks' ] ,
194
+ component : AllEvidenceColumn ,
195
+ } ,
190
196
score : {
191
197
text : 'Result' ,
192
198
component : ResultColumn ,
Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ export const PublicSubmission = {
47
47
align : 'right' ,
48
48
} ,
49
49
{
50
- field : 'mainEvidenceLinks ' ,
51
- width : '50px ' ,
50
+ field : 'allEvidenceLinks ' ,
51
+ width : '90px ' ,
52
52
} ,
53
53
{
54
54
field : 'happenedOn' ,
Original file line number Diff line number Diff line change @@ -197,3 +197,9 @@ export function generateEventText(
197
197
export function isValidEvidenceLink ( link : string ) {
198
198
return link . match ( / y o u t u \. b e | y o u t u b e \. c o m | s t r e a m a b l e \. c o m | i m g u r \. c o m / )
199
199
}
200
+
201
+ export function isVideoUrl ( url : string ) {
202
+ return url . match (
203
+ / ( \. ( g i f | m p 4 ) $ ) | ( y o u t u \. b e | y o u t u b e \. c o m | s t r e a m a b l e \. c o m | g f y c a t \. c o m ) /
204
+ )
205
+ }
You can’t perform that action at this time.
0 commit comments