mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
feat: copy element names on sidebar from context menu, closes #718
This commit is contained in:
@ -161,6 +161,7 @@ import ModalProcessesListContext from '@/components/ModalProcessesListContext.vu
|
||||
import ModalProcessesListRow from '@/components/ModalProcessesListRow.vue';
|
||||
import { useFocusTrap } from '@/composables/useFocusTrap';
|
||||
import Schema from '@/ipc-api/Schema';
|
||||
import { copyText } from '@/libs/copyText';
|
||||
import { useConnectionsStore } from '@/stores/connections';
|
||||
import { useNotificationsStore } from '@/stores/notifications';
|
||||
|
||||
@ -322,13 +323,13 @@ const closeContext = () => {
|
||||
const copyCell = () => {
|
||||
const row = results.value.find(row => Number(row.id) === selectedRow.value);
|
||||
const valueToCopy = row[selectedCell.value.field];
|
||||
navigator.clipboard.writeText(valueToCopy);
|
||||
copyText(valueToCopy);
|
||||
};
|
||||
|
||||
const copyRow = () => {
|
||||
const row = results.value.find(row => Number(row.id) === selectedRow.value);
|
||||
const rowToCopy = JSON.parse(JSON.stringify(row));
|
||||
navigator.clipboard.writeText(JSON.stringify(rowToCopy));
|
||||
copyText(JSON.stringify(rowToCopy));
|
||||
};
|
||||
|
||||
const closeModal = () => emit('close');
|
||||
|
Reference in New Issue
Block a user