diff --git a/src/views/Workspace.vue b/src/views/Workspace.vue index 01b15327b8..fb1813db7c 100644 --- a/src/views/Workspace.vue +++ b/src/views/Workspace.vue @@ -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 { diff --git a/user-data/conf.yml b/user-data/conf.yml index 5f0b012ad0..7421b2e9f9 100644 --- a/user-data/conf.yml +++ b/user-data/conf.yml @@ -27,6 +27,7 @@ sections: description: Source Code, Issues and Pull Requests url: https://github.com/lissy93/dashy icon: favicon + target: newtab - title: Docs description: Configuring & Usage Documentation provider: Dashy.to @@ -36,12 +37,14 @@ sections: description: See how others are using Dashy url: https://github.com/Lissy93/dashy/blob/master/docs/showcase.md icon: far fa-grin-hearts + target: newtab - title: Config Guide description: See full list of configuration options url: https://github.com/Lissy93/dashy/blob/master/docs/configuring.md icon: fas fa-wrench + target: newtab - title: Support description: Get help with Dashy, raise a bug, or get in contact url: https://github.com/Lissy93/dashy/blob/master/.github/SUPPORT.md icon: far fa-hands-helping - \ No newline at end of file + target: newtab