mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-28 22:40:15 +00:00
feat: handle logout events in nostr-login
This commit introduces handling for logout events in nostr-login across various pages. When a user logs out, the current public key and other related information are reset to null. The nostrLogin.js file has also been updated to dispatch a 'nostrLoggedOut' event when this occurs. Additionally, the nostr-login package has been added to the project dependencies.
This commit is contained in:
@@ -59,6 +59,13 @@ mount(fn()
|
||||
$this->loadBoardVotes(),
|
||||
]);
|
||||
|
||||
on([
|
||||
'nostrLoggedOut' => function () {
|
||||
$this->currentPubkey = null;
|
||||
$this->currentPleb = null;
|
||||
},
|
||||
]);
|
||||
|
||||
on([
|
||||
'nostrLoggedIn' => fn($pubkey)
|
||||
=> [
|
||||
|
||||
Reference in New Issue
Block a user