mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2025-12-14 12:06:46 +00:00
- 🔒 Introduced Nostr-based login functionality with `nostr-tools` integration. - 🖼️ Added user profile photo handling (upload, delete, and URL retrieval) in the `User` model. - 💻 Updated views to use `flux:avatar` for consistent user avatars. - ✂️ Removed unused routes and adjusted dashboard routing logic. - 📦 Updated dependencies in `package.json` and `yarn.lock`.
18 lines
353 B
JavaScript
18 lines
353 B
JavaScript
import {npubEncode} from "nostr-tools/nip19";
|
|
|
|
export default () => ({
|
|
|
|
async init() {
|
|
|
|
},
|
|
|
|
async openNostrLogin() {
|
|
const pubkey = await window.nostr.getPublicKey();
|
|
const npub = npubEncode(pubkey);
|
|
console.log(pubkey);
|
|
console.log(npub);
|
|
this.$dispatch('nostrLoggedIn', {pubkey: npub});
|
|
},
|
|
|
|
});
|