Files
einundzwanzig-verein/resources/js/nostrApp.js
fsociety c21a46a870 feat: add boardVotes and showLog functionalities
This commit includes the addition of a 'boardVotes' functionality in the electionAdminCharts.js file, and a 'showLog' functionality in the nostrApp.js file. This update provides enhanced interactivity and data handling for the charts and logs respectively.
2024-10-02 12:40:42 +02:00

18 lines
599 B
JavaScript

export default (livewireComponent) => ({
isAllowed: livewireComponent.entangle('isAllowed', true),
signThisEvent: livewireComponent.entangle('signThisEvent'),
showLog: livewireComponent.entangle('showLog', true),
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);
});
},
});