Эх сурвалжийг харах

dev: automated commit - 2026-03-08 15:46:09

Mariano Z. 2 долоо хоног өмнө
parent
commit
385dae4f8a

+ 7 - 2
frontend/src/views/RecordsView.vue

@@ -124,6 +124,11 @@ async function confirmDelete(deleteFromCloudflare: boolean) {
   }
 }
 
+async function copyContent(content: string) {
+  await navigator.clipboard.writeText(content)
+  toast.success('Copied to clipboard')
+}
+
 function formatDate(iso: string): string {
   return new Intl.DateTimeFormat(undefined, {
     dateStyle: 'medium',
@@ -257,7 +262,7 @@ onMounted(loadData)
                   <TableCell>
                     <Badge variant="outline">{{ record.type }}</Badge>
                   </TableCell>
-                  <TableCell class="font-mono text-sm max-w-[200px] truncate">{{ record.content }}</TableCell>
+                  <TableCell class="font-mono text-sm max-w-[200px] truncate cursor-pointer" @click="copyContent(record.content)">{{ record.content }}</TableCell>
                   <TableCell class="text-muted-foreground">{{ record.zone_name }}</TableCell>
                   <TableCell>
                     <Badge
@@ -396,7 +401,7 @@ onMounted(loadData)
                   <TableCell>
                     <Badge variant="outline">{{ record.type }}</Badge>
                   </TableCell>
-                  <TableCell class="font-mono text-sm max-w-[200px] truncate">{{ record.content }}</TableCell>
+                  <TableCell class="font-mono text-sm max-w-[200px] truncate cursor-pointer" @click="copyContent(record.content)">{{ record.content }}</TableCell>
                   <TableCell class="text-muted-foreground">{{ record.zone_name }}</TableCell>
                   <TableCell>
                     <Badge