mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-01-08 16:54:21 +01:00
approve all
This commit is contained in:
committed by
Tony Giorgio
parent
32dfd30136
commit
3ffa2b25f5
@@ -79,6 +79,14 @@ export function PendingNwc() {
|
||||
}
|
||||
}
|
||||
|
||||
async function approveAll() {
|
||||
// clone the list so it doesn't update in place
|
||||
const toApprove = [...pendingRequests()!];
|
||||
for (const item of toApprove) {
|
||||
await payItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
async function rejectItem(item: PendingItem) {
|
||||
try {
|
||||
setPaying(item.id);
|
||||
@@ -180,12 +188,22 @@ export function PendingNwc() {
|
||||
)}
|
||||
</For>
|
||||
</VStack>
|
||||
<A
|
||||
href="/settings/connections"
|
||||
class="self-center font-semibold text-m-red no-underline active:text-m-red/80"
|
||||
>
|
||||
{i18n.t("settings.connections.pending_nwc.configure_link")}
|
||||
</A>
|
||||
<div class="flex w-full justify-around">
|
||||
<button
|
||||
class="font-semibold text-m-green active:text-m-red/80"
|
||||
onClick={approveAll}
|
||||
>
|
||||
{i18n.t("settings.connections.pending_nwc.approve_all")}
|
||||
</button>
|
||||
<A
|
||||
href="/settings/connections"
|
||||
class="self-center font-semibold text-m-red no-underline active:text-m-red/80"
|
||||
>
|
||||
{i18n.t(
|
||||
"settings.connections.pending_nwc.configure_link"
|
||||
)}
|
||||
</A>
|
||||
</div>
|
||||
</Card>
|
||||
</Show>
|
||||
);
|
||||
|
||||
@@ -268,7 +268,8 @@ export default {
|
||||
"Authorize external services to request payments from your wallet. Pairs great with Nostr clients.",
|
||||
pending_nwc: {
|
||||
title: "Pending Requests",
|
||||
configure_link: "Configure"
|
||||
configure_link: "Configure",
|
||||
approve_all: "Approve All"
|
||||
}
|
||||
},
|
||||
emergency_kit: {
|
||||
|
||||
Reference in New Issue
Block a user