基本功能完成
This commit is contained in:
@@ -129,6 +129,7 @@ onUpdated(() => {
|
|||||||
<strong>{{ senderName(message) }}</strong>
|
<strong>{{ senderName(message) }}</strong>
|
||||||
<small>{{ formatTime(message.created_at) }}</small>
|
<small>{{ formatTime(message.created_at) }}</small>
|
||||||
</span>
|
</span>
|
||||||
|
<span class="chat-topic">{{ message.topic }}</span>
|
||||||
<span class="chat-text">{{ message.text || '[binary]' }}</span>
|
<span class="chat-text">{{ message.text || '[binary]' }}</span>
|
||||||
</button>
|
</button>
|
||||||
</aside>
|
</aside>
|
||||||
|
|||||||
@@ -20,10 +20,6 @@ const totalPages = computed(() => Math.max(1, Math.ceil(props.total / props.page
|
|||||||
const canPrev = computed(() => props.page > 1)
|
const canPrev = computed(() => props.page > 1)
|
||||||
const canNext = computed(() => props.page < totalPages.value)
|
const canNext = computed(() => props.page < totalPages.value)
|
||||||
|
|
||||||
function nodeName(node: NodeInfo): string {
|
|
||||||
return node.long_name || node.short_name || node.node_id
|
|
||||||
}
|
|
||||||
|
|
||||||
function formatTime(value: string): string {
|
function formatTime(value: string): string {
|
||||||
return new Date(value).toLocaleString()
|
return new Date(value).toLocaleString()
|
||||||
}
|
}
|
||||||
@@ -43,11 +39,12 @@ function formatTime(value: string): string {
|
|||||||
<table class="node-table">
|
<table class="node-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>节点</th>
|
|
||||||
<th>Node ID</th>
|
<th>Node ID</th>
|
||||||
<th>User ID</th>
|
<th>Long Name</th>
|
||||||
<th>角色</th>
|
<th>Short Name</th>
|
||||||
<th>硬件</th>
|
<th>硬件</th>
|
||||||
|
<th>角色</th>
|
||||||
|
<th>Public Key</th>
|
||||||
<th>更新时间</th>
|
<th>更新时间</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -59,11 +56,12 @@ function formatTime(value: string): string {
|
|||||||
:class="{ selected: selectedNodeId === node.node_id }"
|
:class="{ selected: selectedNodeId === node.node_id }"
|
||||||
@click="emit('select-node', node.node_id)"
|
@click="emit('select-node', node.node_id)"
|
||||||
>
|
>
|
||||||
<td>{{ nodeName(node) }}</td>
|
|
||||||
<td>{{ node.node_id }}</td>
|
<td>{{ node.node_id }}</td>
|
||||||
<td>{{ node.user_id || '-' }}</td>
|
<td>{{ node.long_name || '-' }}</td>
|
||||||
<td>{{ node.role || '-' }}</td>
|
<td>{{ node.short_name || '-' }}</td>
|
||||||
<td>{{ node.hw_model || '-' }}</td>
|
<td>{{ node.hw_model || '-' }}</td>
|
||||||
|
<td>{{ node.role || '-' }}</td>
|
||||||
|
<td>{{ node.public_key || '-' }}</td>
|
||||||
<td>{{ formatTime(node.updated_at) }}</td>
|
<td>{{ formatTime(node.updated_at) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -203,6 +203,13 @@ h3 {
|
|||||||
color: #64748b;
|
color: #64748b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chat-topic {
|
||||||
|
color: #64748b;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.2;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
.chat-text {
|
.chat-text {
|
||||||
color: #0f172a;
|
color: #0f172a;
|
||||||
line-height: 1.35;
|
line-height: 1.35;
|
||||||
|
|||||||
Reference in New Issue
Block a user