mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-14 06:36:46 +00:00
- Add permission checks to the election index and election year views. - Show election views only to users with a certain association status. - Update nostrApp.js to entangle the 'isAllowed' state.
17 lines
541 B
JavaScript
17 lines
541 B
JavaScript
export default (livewireComponent) => ({
|
|
|
|
isAllowed: livewireComponent.entangle('isAllowed', true),
|
|
signThisEvent: livewireComponent.entangle('signThisEvent'),
|
|
|
|
init() {
|
|
// on change of signThisEvent, call the method
|
|
this.$watch('signThisEvent', async () => {
|
|
const toBeSigned = JSON.parse(this.signThisEvent);
|
|
console.log(toBeSigned);
|
|
const signedEvent = await window.nostr.signEvent(toBeSigned);
|
|
this.$wire.call('signEvent', signedEvent);
|
|
});
|
|
},
|
|
|
|
});
|