File tree Expand file tree Collapse file tree 2 files changed +27
-6
lines changed Expand file tree Collapse file tree 2 files changed +27
-6
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<ul v-if =" tags.length" class =" flex flex-wrap gap-2" >
3
+ <div v-if =" additionalSearchViews" >
4
+ <VTag
5
+ v-for =" (tag, index) in tags"
6
+ :key =" index"
7
+ href =" /"
8
+ :title =" tag.name"
9
+ />
10
+ </div >
3
11
<VMediaTag v-for =" (tag, index) in tags" :key =" index" tag =" li" >{{
4
12
tag.name
5
13
}}</VMediaTag >
6
14
</ul >
7
15
</template >
8
16
<script lang="ts">
9
- import { defineComponent , PropType } from " vue"
17
+ import { computed , defineComponent , PropType } from " vue"
10
18
11
19
import type { Tag } from " ~/types/media"
20
+ import { useFeatureFlagStore } from " ~/stores/feature-flag"
12
21
13
22
import VMediaTag from " ~/components/VMediaTag/VMediaTag.vue"
14
23
24
+ import VTag from " ~/components/VTag/VTag.vue"
25
+
15
26
export default defineComponent ({
16
27
name: " VMediaTags" ,
17
- components: { VMediaTag },
28
+ components: { VMediaTag , VTag },
18
29
props: {
19
30
tags: {
20
31
type: Array as PropType <Tag []>,
21
32
required: true ,
22
33
},
23
34
},
35
+ setup() {
36
+ const featureFlagStore = useFeatureFlagStore ()
37
+
38
+ const additionalSearchViews = computed (() =>
39
+ featureFlagStore .isOn (" additional_search_views" )
40
+ )
41
+
42
+ return { additionalSearchViews }
43
+ },
24
44
})
25
45
</script >
Original file line number Diff line number Diff line change 10
10
</template >
11
11
12
12
<script lang="ts">
13
- import { defineComponent } from " @nuxtjs/composition-api "
13
+ import { defineComponent } from " vue "
14
14
15
15
import VButton from " ~/components/VButton.vue"
16
16
17
17
export default defineComponent ({
18
18
name: " VTag" ,
19
19
components: { VButton },
20
20
props: {
21
- title: { type: String },
21
+ title: {
22
+ type: String ,
23
+ required: true ,
24
+ },
22
25
href: {
23
26
type: String ,
24
27
required: true ,
25
28
},
26
29
},
27
30
})
28
31
</script >
29
-
30
- <style scoped></style >
You can’t perform that action at this time.
0 commit comments