feat: capability layer for clipboard, share and deep links with tests

This commit is contained in:
2026-08-20 08:31:59 +02:00
parent 12851a2b1c
commit f525b06966
11 changed files with 446 additions and 33 deletions
+3 -2
View File
@@ -148,8 +148,9 @@
<script setup lang="ts">
import { computed, ref } from 'vue';
import { useRouter } from 'vue-router';
import { copyToClipboard, useQuasar } from 'quasar';
import { useQuasar } from 'quasar';
import { writeClipboard } from '@/capabilities/clipboard';
import { buildBackup } from '@/lnurlcash/storage';
import { useWalletStore } from '@/stores/wallet';
import { useNostrBackupStore } from '@/stores/nostrBackup';
@@ -191,7 +192,7 @@ const relayModel = computed({
const copyPubkey = () => {
if (!nostr.pubkey) return;
void copyToClipboard(nostr.pubkey).then(() => toast('positive', 'Backup address copied.'));
void writeClipboard(nostr.pubkey).then(() => toast('positive', 'Backup address copied.'));
};
const backupBusy = ref(false);
+3 -2
View File
@@ -224,8 +224,9 @@
<script setup lang="ts">
import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { copyToClipboard, useQuasar } from 'quasar';
import { useQuasar } from 'quasar';
import { writeClipboard } from '@/capabilities/clipboard';
import type { NwcBudget, NwcConnectionRecord } from '@/lnurlcash/nwc';
import { msatToSats } from '@/lnurlcash/units';
import { useWalletStore } from '@/stores/wallet';
@@ -282,7 +283,7 @@ const createNewConnection = (): void => {
};
const copyConnectionString = (): void => {
void copyToClipboard(createdString.value).then(() =>
void writeClipboard(createdString.value).then(() =>
toast('positive', 'Connection string copied.'),
);
};