diff --git a/frontend/auth/admin/AdminApp.vue b/frontend/auth/admin/AdminApp.vue index 1479d31..0f5cec8 100644 --- a/frontend/auth/admin/AdminApp.vue +++ b/frontend/auth/admin/AdminApp.vue @@ -372,20 +372,6 @@ function generateUserRegistrationLink(u) { showRegModal.value = true } -function onLinkCopied() { - authStore.showMessage('Link copied to clipboard!') -} - -function copy(text) { - if (!text) return - navigator.clipboard.writeText(text) - .catch(()=>{}) -} - -function permissionDisplayName(id) { - return permissions.value.find(p => p.id === id)?.display_name || id -} - async function toggleOrgPermission(org, permId, checked) { // Build next permission list const has = org.permissions.includes(permId) diff --git a/frontend/src/admin/AdminUserDetail.vue b/frontend/src/admin/AdminUserDetail.vue index 3581702..0608e9c 100644 --- a/frontend/src/admin/AdminUserDetail.vue +++ b/frontend/src/admin/AdminUserDetail.vue @@ -35,7 +35,7 @@ const backButtonRef = ref(null) const hasActiveModal = computed(() => props.showRegModal) function onLinkCopied() { - authStore.showMessage('Link copied to clipboard!') + authStore.showMessage(`📋 Link copied! Send it to ${props.selectedUser.display_name}.`) } function handleEditName() { diff --git a/frontend/src/components/DeviceLinkView.vue b/frontend/src/components/DeviceLinkView.vue deleted file mode 100644 index 9b5e212..0000000 --- a/frontend/src/components/DeviceLinkView.vue +++ /dev/null @@ -1,62 +0,0 @@ - - - - - diff --git a/frontend/src/components/ProfileView.vue b/frontend/src/components/ProfileView.vue index fe7e59f..2c90dce 100644 --- a/frontend/src/components/ProfileView.vue +++ b/frontend/src/components/ProfileView.vue @@ -108,6 +108,7 @@ v-if="showRegLink" endpoint="/auth/api/user/create-link" @close="showRegLink = false" + @copied="onLinkCopied" /> @@ -184,6 +185,10 @@ const handlePairingError = (message) => { } } +const onLinkCopied = () => { + authStore.showMessage('📋 Link copied! Send it to your other device.') +} + // Helper to focus preferred button in a row (primary first, or first button) const focusPreferredButton = (container) => { focusPreferred(container, { primarySelector: '.btn-primary', itemSelector: 'button' }) diff --git a/frontend/src/components/QRCodeDisplay.vue b/frontend/src/components/QRCodeDisplay.vue index 7bafaf3..45b53dc 100644 --- a/frontend/src/components/QRCodeDisplay.vue +++ b/frontend/src/components/QRCodeDisplay.vue @@ -7,9 +7,6 @@ -
- ✓ Link copied to clipboard -
@@ -25,9 +22,6 @@ const props = defineProps({ const emit = defineEmits(['copied']) const qrCanvas = ref(null) -const showCopyToast = ref(false) - -let copyToastTimer = null const displayUrl = computed(() => { if (!props.url) return '' @@ -65,13 +59,7 @@ async function copyLink() { if (!props.url) return try { await navigator.clipboard.writeText(props.url) - showCopyToast.value = true emit('copied') - - if (copyToastTimer) clearTimeout(copyToastTimer) - copyToastTimer = setTimeout(() => { - showCopyToast.value = false - }, 2000) } catch (err) { console.error('Failed to copy link:', err) } @@ -139,23 +127,4 @@ watch(qrCanvas, () => { .qr-link:hover .link-text { color: var(--color-text); } - -.copy-toast { - position: absolute; - top: -2rem; - left: 50%; - transform: translateX(-50%); - background: var(--color-success); - color: white; - padding: 0.5rem 1rem; - border-radius: var(--radius-sm); - font-size: 0.875rem; - z-index: 10; - animation: fadeInOut 2s ease-in-out; -} - -@keyframes fadeInOut { - 0%, 100% { opacity: 0; } - 10%, 90% { opacity: 1; } -}