feat: 本机默认信任自己且不能移除

This commit is contained in:
Nixevol
2026-10-12 08:54:17 +08:00
parent 5e62af17f4
commit b7763bb800
3 changed files with 24 additions and 3 deletions
+4 -3
View File
@@ -8,9 +8,10 @@
<div v-if="!store.running" class="empty">请先启动被控。</div>
<div v-else-if="items.length === 0" class="empty">还没有信任的设备。</div>
<div v-for="id in items" :key="id" class="trust-row">
<span>{{ store.nameOf(id) }}</span>
<span v-if="store.nameOf(id) !== id" class="device-id">{{ id }}</span>
<n-button size="tiny" @click="remove(id)">移除</n-button>
<span>{{ id === store.endpointId ? '本机' : store.nameOf(id) }}</span>
<span v-if="id !== store.endpointId && store.nameOf(id) !== id" class="device-id">{{ id }}</span>
<span v-else class="device-id">{{ id }}</span>
<n-button v-if="id !== store.endpointId" size="tiny" @click="remove(id)">移除</n-button>
</div>
</div>
<form class="trust-add" @submit.prevent="add">