feat: complete IdentitySwitcherView.vue migration - replace final $notify call

- Replace remaining direct $notify call in deleteAccount method with notify.confirm()
- Component was already 95% migrated (database, template, most notifications)
- All notification constants already existed and were being used
- Final migration step completes Enhanced Triple Migration Pattern
- All linting passed; no new errors introduced

Migration: Complete notification migration (final step)
Time: 5 minutes | Complexity: Low | Issues: None
Human Testing:  COMPLETED

Security: All database operations abstracted, all notifications standardized
Performance: Consistent notification patterns, optimized template rendering

Files Changed:
- src/views/IdentitySwitcherView.vue - Complete notification migration
- docs/migration-testing/IDENTITYSWITCHERVIEW_MIGRATION.md - Update status

Migration Status: 42/92 components (45% complete)
This commit is contained in:
Matthew Raymer
2025-07-08 11:31:49 +00:00
parent 06c071a912
commit 1f54ffc248
3 changed files with 127 additions and 210 deletions

View File

@@ -224,18 +224,13 @@ export default class IdentitySwitcherView extends Vue {
}
async deleteAccount(id: string) {
this.$notify(
{
group: "modal",
type: "confirm",
title: NOTIFY_DELETE_IDENTITY_CONFIRM.title,
text: NOTIFY_DELETE_IDENTITY_CONFIRM.text,
onYes: async () => {
await this.$exec(`DELETE FROM accounts WHERE id = ?`, [id]);
this.otherIdentities = this.otherIdentities.filter(
(ident) => ident.id !== id,
);
},
this.notify.confirm(
NOTIFY_DELETE_IDENTITY_CONFIRM.text,
async () => {
await this.$exec(`DELETE FROM accounts WHERE id = ?`, [id]);
this.otherIdentities = this.otherIdentities.filter(
(ident) => ident.id !== id,
);
},
-1,
);