Copy Npub button

This commit is contained in:
Ryan Breen
2023-05-24 22:35:46 -04:00
parent c68f91923a
commit aa5b477651
6 changed files with 35 additions and 9 deletions

View File

@@ -8,6 +8,7 @@ import {
initialize,
relayReminder,
toggleRelayReminder,
getNpub,
} from './utilities/utils';
import Alpine from 'alpinejs';
window.Alpine = Alpine;
@@ -86,6 +87,11 @@ Alpine.data('popup', () => ({
await toggleRelayReminder();
this.showRelayReminder = false;
},
async copyNpub() {
let npub = await getNpub();
await browser.runtime.sendMessage({ kind: 'copy', payload: npub });
},
}));
Alpine.start();