WEB: Add copy button to action tab (#299)

This commit is contained in:
Spenser Black
2021-05-14 16:33:32 -04:00
committed by GitHub
parent 429b58aeb7
commit a284c6abf2
6 changed files with 28 additions and 22 deletions

View File

@@ -63,6 +63,13 @@
components: { Prism: PrismComponent },
//Watchers
watch: {
tab: {
immediate: true,
handler(current) {
if (current === 'action') this.clipboard = new ClipboardJS('.copy-action')
else this.clipboard?.destroy()
},
},
palette: {
immediate: true,
handler(current, previous) {
@@ -78,6 +85,7 @@
mode: "metrics",
tab: "overview",
palette: "light",
clipboard: null,
requests: { limit: 0, used: 0, remaining: 0, reset: 0 },
cached: new Map(),
config: Object.fromEntries(Object.entries(metadata.core.web).map(([key, { defaulted }]) => [key, defaulted])),