mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 20:49:16 +00:00
fixing pending state actions
This commit is contained in:
parent
16342acfcd
commit
48840d51e0
@ -56,8 +56,8 @@ export function Contact({ close, guid, listing }) {
|
|||||||
|
|
||||||
{ state.status === 'pending' && (
|
{ state.status === 'pending' && (
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<div class={ state.buttonStatus } onClick={() => updateContact(actions.saveContact)}>Save Contact</div>
|
<div class={ state.buttonStatus } onClick={() => updateContact(actions.confirmContact)}>Save Contact</div>
|
||||||
<div class={ state.buttonStatus } onClick={() => updateContact(actions.saveConnect)}>Save and Accept</div>
|
<div class={ state.buttonStatus } onClick={() => updateContact(actions.connect)}>Save and Accept</div>
|
||||||
<div class={ state.buttonStatus } onClick={() => updateContact(actions.remove)}>Ignore Request</div>
|
<div class={ state.buttonStatus } onClick={() => updateContact(actions.remove)}>Ignore Request</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
@ -103,6 +103,11 @@ export function useContact(guid, listing, close) {
|
|||||||
await card.actions.addCard(message);
|
await card.actions.addCard(message);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
confirmContact: async() => {
|
||||||
|
await applyAction(async () => {
|
||||||
|
await card.actions.setCardConfirmed(state.cardId);
|
||||||
|
});
|
||||||
|
},
|
||||||
saveConnect: async () => {
|
saveConnect: async () => {
|
||||||
await applyAction(async () => {
|
await applyAction(async () => {
|
||||||
let profile = await getListingMessage(state.node, guid);
|
let profile = await getListingMessage(state.node, guid);
|
||||||
|
Loading…
Reference in New Issue
Block a user