We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb7ba73 commit fa17699Copy full SHA for fa17699
packages/shell-chrome/src/devtools-background.js
@@ -68,7 +68,7 @@ function onContextMenu ({ id }) {
68
}, 'Open Vue devtools to see component details')
69
} else {
70
pendingAction = null
71
- toast('No Vue component was found', 'warn')
+ toast('component-not-found')
72
}
73
})
74
@@ -113,7 +113,15 @@ function onPanelHidden () {
113
114
// Toasts
115
116
-function toast (message, type = 'normal') {
+const toastMessages = {
117
+ 'component-not-found': { message: 'No Vue component was found', type: 'warn' }
118
+}
119
+
120
+function toast (id) {
121
+ if (!Object.keys().includes(id)) return
122
123
+ const { message, type } = toastMessages[id]
124
125
const src = `(function() {
126
__VUE_DEVTOOLS_TOAST__(\`${message}\`, '${type}');
127
})()`
0 commit comments