added delete profile button

This commit is contained in:
Ryan Breen
2023-01-16 20:21:35 -05:00
parent 579211e6f4
commit 4fee1c9e81
4 changed files with 36 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ Alpine.data('popup', () => ({
profileIndex: 0,
visibleKey: false,
confirmClear: false,
confirmDelete: false,
async init() {
console.log("Initializing backend.");
@@ -88,6 +89,12 @@ Alpine.data('popup', () => ({
this.confirmClear = false;
},
async deleteProfile() {
await browser.runtime.sendMessage({kind: 'deleteProfile'});
await this.init();
this.confirmDelete = false;
},
// Properties
get hasValidPubKey() {