Add launchApp support for target:clipboard to copy text to clipboard

This commit is contained in:
jx163 2025-09-02 13:03:08 +12:00
parent a4f76c6b0b
commit 32e3f3d38c

View file

@ -46,6 +46,16 @@ export default {
},
methods: {
launchApp(options) {
const { url, target } = options;
if (target === 'clipboard') {
if (navigator.clipboard) {
navigator.clipboard.writeText(url);
this.$toasted.show('Copied to clipboard!');
} else {
this.$toasted.show('Clipboard API not supported');
}
return;
}
if (options.target === 'newtab') {
window.open(options.url, '_blank');
} else {