mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-13 05:26:47 +00:00
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.
18 lines
599 B
JavaScript
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);
|
|
});
|
|
},
|
|
|
|
});
|