@@ -27,15 +27,26 @@ const props = defineProps({
27
27
},
28
28
})
29
29
30
- const tabs = ref ([" Blobs" , " Messages" ])
31
- const activeTab = ref (tabs .value [0 ])
30
+ const tabs = ref ([
31
+ {
32
+ name: " Blobs" ,
33
+ icon: " blob" ,
34
+ },
35
+ {
36
+ name: " Messages" ,
37
+ icon: " message" ,
38
+ },
39
+ ])
40
+ const activeTab = ref (tabs .value [0 ].name )
32
41
33
42
const isRefetching = ref (false )
34
43
const messages = ref ([])
35
44
const blobs = ref ([])
36
45
37
46
const page = ref (1 )
38
- const pages = computed (() => Math .ceil (props .namespace .pfb_count / 10 ))
47
+ const pages = computed (() => {
48
+ return Math .ceil ((activeTab .value === " Blobs" ? props .namespace .blobs_count : props .namespace .pfb_count ) / 10 )
49
+ })
39
50
const handleNext = () => {
40
51
if (page .value === pages .value ) return
41
52
page .value += 1
@@ -194,6 +205,11 @@ const handleViewRawMessages = () => {
194
205
< Text size= " 12" weight= " 600" color= " secondary" > {{ comma (namespace .pfb_count ) }} < / Text >
195
206
< / Flex>
196
207
208
+ < Flex align= " center" justify= " between" >
209
+ < Text size= " 12" weight= " 600" color= " tertiary" > Blobs< / Text >
210
+ < Text size= " 12" weight= " 600" color= " secondary" > {{ comma (namespace .blobs_count ) }} < / Text >
211
+ < / Flex>
212
+
197
213
< Flex align= " center" justify= " between" >
198
214
< Text size= " 12" weight= " 600" color= " tertiary" > Version< / Text >
199
215
< Text size= " 12" weight= " 600" color= " secondary" > {{ namespace .version }} < / Text >
@@ -213,13 +229,14 @@ const handleViewRawMessages = () => {
213
229
< Flex align= " center" justify= " between" : class = " $style.tabs_wrapper" >
214
230
< Flex gap= " 4" : class = " $style.tabs" >
215
231
< Flex
216
- @click= " activeTab = tab"
232
+ @click= " activeTab = tab.name "
217
233
v- for = " tab in tabs"
218
234
align= " center"
219
235
gap= " 6"
220
- : class = " [$style.tab, activeTab === tab && $style.active]"
236
+ : class = " [$style.tab, activeTab === tab.name && $style.active]"
221
237
>
222
- < Text size= " 13" weight= " 600" > {{ tab }}< / Text >
238
+ < Icon : name= " tab.icon" size= " 12" color= " secondary" / >
239
+ < Text size= " 13" weight= " 600" > {{ tab .name }}< / Text >
223
240
< / Flex>
224
241
< / Flex>
225
242
< / Flex>
0 commit comments