增加加密群公告和群主转让

This commit is contained in:
xhgit committed 2026-11-15 17:20:18 +08:00
1 parent 52c0e52ffd
commit 47b76080c6
10 files changed
+163 -22

No files matched your search

+3
View File
@@ -203,6 +203,8 @@ onBeforeUnmount(() => {
@click="change(member.role === 'admin' ? 'demote' : 'promote', member.id)">
{{ member.role === 'admin' ? '取消管理员' : '设为管理员' }}
</button>
<button v-if="detail.role === 'owner' && member.state === 'active'" type="button" class="plain" :disabled="busy"
@click="confirmation = { action: 'transfer', target: member.id, label: '将群主转让给 ' + member.username }">转让群主</button>
<button v-if="detail.role === 'owner' || member.role === 'member'" class="plain" :disabled="busy"
@click="confirmation = { action: 'remove', target: member.id, label: member.state === 'invited' ? '撤销此邀请' : '移除此成员' }">
{{ member.state === 'invited' ? '撤销邀请' : '移除成员' }}
@@ -214,6 +216,7 @@ onBeforeUnmount(() => {
<button v-else class="plain" :disabled="busy" @click="confirmation = { action: 'leave', label: '退出群组' }">退出群组</button>
<div v-if="confirmation" class="confirmation">
<p>确认{{ confirmation.label }}?</p>
<p v-if="confirmation.action === 'transfer'" class="muted">转让完成后,你将成为普通成员,由新群主重新建立加密会话。</p>
<button class="plain" :disabled="busy" @click="change(confirmation.action, confirmation.target)">确认操作</button>
<button class="plain" @click="confirmation = undefined">取消</button>
</div>