fix event embed filters + new clipboard mixin

This commit is contained in:
lesion
2021-12-06 15:58:12 +01:00
parent 1d80faaa37
commit 2d3ab6b572
14 changed files with 236 additions and 200 deletions

18
assets/clipboard.js Normal file
View File

@@ -0,0 +1,18 @@
export default {
methods: {
clipboard (str, msg = 'common.copied') {
try {
navigator.clipboard.writeText(str)
} catch (e) {
const el = document.createElement('textarea')
el.addEventListener('focusin', e => e.stopPropagation())
el.value = str
document.body.appendChild(el)
el.select()
document.execCommand('copy')
document.body.removeChild(el)
}
this.$root.$message(msg)
}
}
}

View File

@@ -120,4 +120,9 @@ li {
.cursorPointer {
cursor: pointer;
}
pre {
white-space: break-spaces;
font-size: 13px;
}