feat: migrate all clipboard operations from useClipboard to ClipboardService
- Replace useClipboard with platform-agnostic ClipboardService across 13 files - Add proper error handling with user notifications for all clipboard operations - Fix naming conflicts between method names and imported function names - Ensure consistent async/await patterns throughout the codebase - Add notification system to HelpView.vue for user feedback on clipboard errors - Remove unnecessary wrapper methods for cleaner code Files migrated: - View components: UserProfileView, QuickActionBvcEndView, ProjectViewView, InviteOneView, SeedBackupView, HelpView, AccountViewView, DatabaseMigration, ConfirmGiftView, ClaimView, OnboardMeetingSetupView - Utility functions: libs/util.ts (doCopyTwoSecRedo) - Components: HiddenDidDialog Naming conflicts resolved: - DatabaseMigration: copyToClipboard() → copyExportedDataToClipboard() - ShareMyContactInfoView: copyToClipboard() → copyContactMessageToClipboard() → removed - HiddenDidDialog: copyToClipboard() → copyTextToClipboard() - ClaimView: copyToClipboard() → copyTextToClipboard() - ConfirmGiftView: copyToClipboard() → copyTextToClipboard() This migration ensures reliable clipboard functionality across iOS, Android, and web platforms with proper error handling and user feedback. Closes: Platform-specific clipboard issues on mobile devices
This commit is contained in:
@@ -104,6 +104,7 @@ import { Buffer } from "buffer/";
|
||||
import QRCodeVue3 from "qr-code-generator-vue3";
|
||||
import { Component, Vue } from "vue-facing-decorator";
|
||||
import { Router } from "vue-router";
|
||||
import { copyToClipboard } from "../services/ClipboardService";
|
||||
|
||||
import { logger } from "../utils/logger";
|
||||
import { QRScannerFactory } from "../services/QRScanner/QRScannerFactory";
|
||||
@@ -661,7 +662,6 @@ export default class ContactQRScanFull extends Vue {
|
||||
);
|
||||
|
||||
// Use the platform-specific ClipboardService for reliable iOS support
|
||||
const { copyToClipboard } = await import("../services/ClipboardService");
|
||||
await copyToClipboard(jwtUrl);
|
||||
|
||||
this.notify.toast(
|
||||
@@ -684,7 +684,6 @@ export default class ContactQRScanFull extends Vue {
|
||||
async onCopyDidToClipboard() {
|
||||
try {
|
||||
// Use the platform-specific ClipboardService for reliable iOS support
|
||||
const { copyToClipboard } = await import("../services/ClipboardService");
|
||||
await copyToClipboard(this.activeDid);
|
||||
|
||||
this.notify.info(NOTIFY_QR_DID_COPIED.message, QR_TIMEOUT_LONG);
|
||||
|
||||
Reference in New Issue
Block a user