diff --git a/frontend/src/pages/inbounds/ClientRowTable.vue b/frontend/src/pages/inbounds/ClientRowTable.vue new file mode 100644 index 00000000..71e9f400 --- /dev/null +++ b/frontend/src/pages/inbounds/ClientRowTable.vue @@ -0,0 +1,501 @@ + + + + + diff --git a/frontend/src/pages/inbounds/InboundList.vue b/frontend/src/pages/inbounds/InboundList.vue index 0f0468c2..47508fc8 100644 --- a/frontend/src/pages/inbounds/InboundList.vue +++ b/frontend/src/pages/inbounds/InboundList.vue @@ -27,16 +27,19 @@ import { import { HttpUtil, ObjectUtil, SizeFormatter, IntlUtil, ColorUtils } from '@/utils'; import { DBInbound } from '@/models/dbinbound.js'; import { Inbound } from '@/models/inbound.js'; +import ClientRowTable from './ClientRowTable.vue'; const props = defineProps({ dbInbounds: { type: Array, required: true }, clientCount: { type: Object, required: true }, onlineClients: { type: Array, required: true }, + lastOnlineMap: { type: Object, default: () => ({}) }, refreshing: { type: Boolean, default: false }, expireDiff: { type: Number, default: 0 }, trafficDiff: { type: Number, default: 0 }, pageSize: { type: Number, default: 0 }, isMobile: { type: Boolean, default: false }, + isDarkTheme: { type: Boolean, default: false }, subEnable: { type: Boolean, default: false }, }); @@ -45,6 +48,13 @@ const emit = defineEmits([ 'add-inbound', 'general-action', 'row-action', + // Per-client events surfaced from the expand-row table. + 'edit-client', + 'qrcode-client', + 'info-client', + 'reset-traffic-client', + 'delete-client', + 'toggle-enable-client', ]); // ============ Toolbar / search & filter ============================= @@ -302,7 +312,30 @@ function showQrCodeMenu(dbInbound) { :scroll="isMobile ? {} : { x: 1000 }" :style="{ marginTop: '10px' }" size="small" + :row-class-name="(r) => (r.isMultiUser() ? '' : 'hide-expand-icon')" > + + +