@@ -85,6 +85,31 @@ watch(() => props.initialSubPage, (subPage) => {
8585 activeSubPage .value = subPage
8686})
8787
88+ // Counts reported by the metadata sub-pages, shown in their footer.
89+ const subPageCounts = ref <Partial <Record <SubPage , number >>>({})
90+
91+ function setSubPageCount(subPage : SubPage , count : number | undefined ) {
92+ subPageCounts .value = { ... subPageCounts .value , [subPage ]: count }
93+ }
94+
95+ const activeSubPageCountLabel = computed (() => {
96+ const count = subPageCounts .value [activeSubPage .value ]
97+ if (count === undefined )
98+ return ' '
99+ switch (activeSubPage .value ) {
100+ case ' schema' :
101+ return t (' components.dataTableView.columnsCount' , { count })
102+ case ' indexes' :
103+ return t (' components.dataTableView.indexesCount' , { count })
104+ case ' foreign_keys' :
105+ return t (' components.dataTableView.foreignKeysCount' , { count })
106+ case ' triggers' :
107+ return t (' components.dataTableView.triggersCount' , { count })
108+ default :
109+ return ' '
110+ }
111+ })
112+
88113const currentPage = ref (1 )
89114const rowsPerPage = ref <RowsPerPage >(100 )
90115const filterInput = ref (' ' )
@@ -859,6 +884,7 @@ watch(
859884 hiddenColumns .value = new Set ()
860885 sort .clearSort ()
861886 connectionError .value = null
887+ subPageCounts .value = {}
862888
863889 if (newConnId !== oldConnId ) {
864890 data .value = null
@@ -1318,6 +1344,7 @@ watch(
13181344 :schema =" props .schema ?? null "
13191345 :table-name =" props .tableName "
13201346 class="flex-1"
1347+ @count-change =" setSubPageCount (' schema' , $event )"
13211348 />
13221349
13231350 <!-- Indexes sub-page -->
@@ -1328,6 +1355,7 @@ watch(
13281355 :schema =" props .schema ?? null "
13291356 :table-name =" props .tableName "
13301357 class="flex-1"
1358+ @count-change =" setSubPageCount (' indexes' , $event )"
13311359 />
13321360
13331361 <!-- Foreign Keys sub-page -->
@@ -1338,6 +1366,7 @@ watch(
13381366 :schema =" props .schema ?? null "
13391367 :table-name =" props .tableName "
13401368 class="flex-1"
1369+ @count-change =" setSubPageCount (' foreign_keys' , $event )"
13411370 />
13421371
13431372 <!-- Triggers sub-page -->
@@ -1348,8 +1377,20 @@ watch(
13481377 :schema =" props .schema ?? null "
13491378 :table-name =" props .tableName "
13501379 class="flex-1"
1380+ @count-change =" setSubPageCount (' triggers' , $event )"
13511381 />
13521382
1383+ <!-- Status footer for metadata sub-pages -->
1384+ <div
1385+ v-if =" activeSubPage !== 'data'"
1386+ class =" text-xs text-muted-foreground px-3 py-1.5 border-t bg-muted/20 flex shrink-0 gap-3 items-center overflow-hidden"
1387+ >
1388+ <span v-if =" props.database" class =" tabular-nums" >
1389+ {{ t('pages.queries.status.database') }}: {{ props.database }}
1390+ </span >
1391+ <span v-if =" activeSubPageCountLabel" class =" tabular-nums" >{{ activeSubPageCountLabel }}</span >
1392+ </div >
1393+
13531394 <!-- ── Delete confirmation dialog ── -->
13541395 <DestructiveConfirmDialog
13551396 v-model :open =" deleteDialogOpen "
0 commit comments