fix(inbounds): wrap popover-table rows in <tbody>

Vue's template compiler warned that <tr> can't be a direct child of
<table> per the HTML spec; the browser silently inserts a <tbody>
wrapper but Vue's SSR/hydration path doesn't, which can cause
hydration mismatches. Add explicit <tbody> in both popover tables
(traffic + mobile-info).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
MHSanaei 2026-05-08 13:36:24 +02:00
parent f205cce044
commit d2d69ecfa1
No known key found for this signature in database
GPG key ID: 7E4060F2FBE5AB7A

View file

@ -397,14 +397,16 @@ function showQrCodeMenu(dbInbound) {
<a-popover> <a-popover>
<template #content> <template #content>
<table cellpadding="2"> <table cellpadding="2">
<tr> <tbody>
<td> {{ SizeFormatter.sizeFormat(record.up) }}</td> <tr>
<td> {{ SizeFormatter.sizeFormat(record.down) }}</td> <td> {{ SizeFormatter.sizeFormat(record.up) }}</td>
</tr> <td> {{ SizeFormatter.sizeFormat(record.down) }}</td>
<tr v-if="record.total > 0 && record.up + record.down < record.total"> </tr>
<td>Remaining</td> <tr v-if="record.total > 0 && record.up + record.down < record.total">
<td>{{ SizeFormatter.sizeFormat(record.total - record.up - record.down) }}</td> <td>Remaining</td>
</tr> <td>{{ SizeFormatter.sizeFormat(record.total - record.up - record.down) }}</td>
</tr>
</tbody>
</table> </table>
</template> </template>
<a-tag :color="ColorUtils.usageColor(record.up + record.down, trafficDiff, record.total)"> <a-tag :color="ColorUtils.usageColor(record.up + record.down, trafficDiff, record.total)">
@ -439,35 +441,37 @@ function showQrCodeMenu(dbInbound) {
<a-popover placement="bottomRight" trigger="click"> <a-popover placement="bottomRight" trigger="click">
<template #content> <template #content>
<table cellpadding="2"> <table cellpadding="2">
<tr> <tbody>
<td>Protocol</td> <tr>
<td><a-tag color="purple">{{ record.protocol }}</a-tag></td> <td>Protocol</td>
</tr> <td><a-tag color="purple">{{ record.protocol }}</a-tag></td>
<tr> </tr>
<td>Port</td> <tr>
<td><a-tag>{{ record.port }}</a-tag></td> <td>Port</td>
</tr> <td><a-tag>{{ record.port }}</a-tag></td>
<tr v-if="clientCount[record.id]"> </tr>
<td>Clients</td> <tr v-if="clientCount[record.id]">
<td><a-tag color="blue">{{ clientCount[record.id].clients }}</a-tag></td> <td>Clients</td>
</tr> <td><a-tag color="blue">{{ clientCount[record.id].clients }}</a-tag></td>
<tr> </tr>
<td>Traffic</td> <tr>
<td> <td>Traffic</td>
<a-tag> <td>
{{ SizeFormatter.sizeFormat(record.up + record.down) }} / <a-tag>
<template v-if="record.total > 0">{{ SizeFormatter.sizeFormat(record.total) }}</template> {{ SizeFormatter.sizeFormat(record.up + record.down) }} /
<template v-else></template> <template v-if="record.total > 0">{{ SizeFormatter.sizeFormat(record.total) }}</template>
</a-tag> <template v-else></template>
</td> </a-tag>
</tr> </td>
<tr> </tr>
<td>Expiry</td> <tr>
<td> <td>Expiry</td>
<a-tag v-if="record.expiryTime > 0">{{ IntlUtil.formatRelativeTime(record.expiryTime) }}</a-tag> <td>
<a-tag v-else color="purple"></a-tag> <a-tag v-if="record.expiryTime > 0">{{ IntlUtil.formatRelativeTime(record.expiryTime) }}</a-tag>
</td> <a-tag v-else color="purple"></a-tag>
</tr> </td>
</tr>
</tbody>
</table> </table>
</template> </template>
<InfoCircleOutlined class="row-info-trigger" /> <InfoCircleOutlined class="row-info-trigger" />