diff --git a/frontend/src/App.vue b/frontend/src/App.vue index b73bf33..c2a22c0 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -18,6 +18,7 @@ GnTable, GnTabs, GnTextarea, + GnToastProvider, GnToolbar } from "gnexus-ui-kit/vue"; @@ -36,6 +37,7 @@ const me = ref(null); const loading = ref(false); const error = ref(""); +const toastProvider = ref(null); const secrets = ref([]); const total = ref(0); const query = ref(""); @@ -420,6 +422,7 @@ async function copyValue(value) { if (value) { await navigator.clipboard.writeText(value); + showCopyToast(); } } @@ -484,9 +487,18 @@ async function copyText(value) { if (value) { await navigator.clipboard.writeText(value); + showCopyToast(); } } +function showCopyToast() { + toastProvider.value?.success({ + title: "Copied", + text: "Value copied to clipboard.", + lifetime: 1800 + }); +} + async function exportData() { const payload = await api.exportData(); const blob = new Blob([JSON.stringify(payload, null, 2)], { type: "application/json" }); @@ -565,6 +577,7 @@