Skip to content

Commit 72ce906

Browse files
authored
copy notification feature added (#28)
1 parent 6b14e92 commit 72ce906

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/views/BrowserView.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ref, watch, inject } from 'vue'
33
import InputPanel from '@/components/InputPanel.vue'
44
import OutputPanel from '@/components/OutputPanel.vue'
55
import DrawerPanel from '@/components/DrawerPanel.vue'
6-
import { uid, copyToClipboard } from 'quasar'
6+
import { uid, copyToClipboard, useQuasar } from 'quasar'
77
import { useRoute, useRouter } from 'vue-router'
88
99
const GlobalVariables = inject('GlobalVariables')
@@ -14,6 +14,7 @@ const queries = ref(route.query.session ? JSON.parse(atob(route.query.session))
1414
const outputPanel = ref()
1515
const outputPanelHeight = ref(`${GlobalVariables.outputPanelHeight}px`)
1616
const drawer = ref(true)
17+
const $q = useQuasar()
1718
1819
const runQuery = (query) => {
1920
const uuid = uid()
@@ -32,6 +33,9 @@ const shareQuery = (query) => {
3233
const session = btoa(JSON.stringify([query]))
3334
const urlToShare = `${window.location.origin}${pathName}?session=${session}`
3435
copyToClipboard(urlToShare)
36+
.then(() => {
37+
$q.notify({message: "Link copied to clipboard!", color: "positive"})
38+
})
3539
}
3640
3741
const updateQuery = (query, uuid) => {

0 commit comments

Comments
 (0)