refactor: update to DevTools v1

This commit is contained in:
Arash
2023-10-26 13:02:26 -06:00
parent 0b575fa322
commit 1bec7a703d
14 changed files with 2787 additions and 1557 deletions

View File

@ -1,14 +0,0 @@
let _showNotification: typeof showNotification
export function showNotification(data: {
message: string
icon?: string
classes?: string
duration?: number
}) {
_showNotification?.(data)
}
export function provideNotificationFn(fn: typeof showNotification) {
_showNotification = fn
}

View File

@ -1,14 +1,14 @@
import { useClipboard } from '@vueuse/core'
import { showNotification } from './dialog'
// import { } from '@nuxt/devtools-ui-kit'
export function useCopy() {
const clipboard = useClipboard()
return (text: string) => {
clipboard.copy(text)
showNotification({
message: 'Copied to clipboard',
icon: 'carbon-copy',
})
// devtoolsUiShowNotification({
// message: 'Copied to clipboard',
// icon: 'carbon-copy',
// })
}
}