feat: update_identity_status command + People ignore action
This commit is contained in:
@@ -106,6 +106,7 @@
|
||||
|
||||
<div v-if="ctxMenu.show" class="ctx-menu" :style="{ left: ctxMenu.x + 'px', top: ctxMenu.y + 'px' }">
|
||||
<div class="ctx-item" @click="ctxAction('star')">{{ ctxMenu.person?.starred ? '☆ Unstar' : '★ Star' }}</div>
|
||||
<div class="ctx-item" @click="ctxAction('ignore')">{{ ctxMenu.person?.ignored ? '↺ Unignore' : '⊘ Ignore' }}</div>
|
||||
<div class="ctx-item" @click="ctxAction('rename')">✎ Rename</div>
|
||||
<div class="ctx-item" @click="ctxAction('merge')">⇄ Merge</div>
|
||||
<div class="ctx-divider"></div>
|
||||
@@ -265,6 +266,10 @@ function ctxAction(action: string) {
|
||||
p.starred = !p.starred
|
||||
const idx = people.value.findIndex((x: any) => x.identity_uuid === p.identity_uuid)
|
||||
if (idx >= 0) people.value[idx].starred = p.starred
|
||||
} else if (action === 'ignore') {
|
||||
invoke('update_identity_status', { uuid: p.identity_uuid, status: 'skipped' }).then(() => {
|
||||
people.value = people.value.filter((x: any) => x.identity_uuid !== p.identity_uuid)
|
||||
}).catch(e => console.error('Ignore failed:', e))
|
||||
} else if (action === 'rename') {
|
||||
selectPerson(p)
|
||||
setTimeout(() => startEditName(), 100)
|
||||
|
||||
Reference in New Issue
Block a user