From f72c0bc7811dc19499418371e08930747fe087dc Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Sat, 5 Nov 2022 15:11:48 +0100 Subject: New Copy to clipboard custom service --- docs/customservices.md | 18 ++++++ src/components/services/CopyToClipboard.vue | 85 +++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 src/components/services/CopyToClipboard.vue diff --git a/docs/customservices.md b/docs/customservices.md index fb3f2a7..65f3d4c 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -27,6 +27,7 @@ within Homer: - [Proxmox](#proxmox) - [rTorrent](#rtorrent) - [qBittorrent](#qbittorrent) + - [CopyToClipboard](#copy-to-clipboard) If you experiencing any issue, please have a look to the [troubleshooting](troubleshooting.md) page. @@ -317,3 +318,20 @@ servers can be found at [enable-cors.org](https://enable-cors.org/server.html). torrentInterval: 5000 # Interval for updating the torrent count. target: "_blank" # optional html a tag target attribute ``` + +## Copy to Clipboard + +This service displays the same information of a generic one, but shows an icon button on the indicator place (right side) you can click to get the content of the `clipboard` field copied to your clipboard. + +You can still provide an `url` that would be open when clicked anywhere but on the icon button. + +Configuration example: + +```yaml +- name: "Copy me!" + logo: "assets/tools/sample.png" + subtitle: "Subtitle text goes here" + url: "#" + type: "CopyToClipboard" + clipboard: "this text will be copied to your clipboard" +``` diff --git a/src/components/services/CopyToClipboard.vue b/src/components/services/CopyToClipboard.vue new file mode 100644 index 0000000..18c4dc3 --- /dev/null +++ b/src/components/services/CopyToClipboard.vue @@ -0,0 +1,85 @@ + + + + + -- cgit v1.2.3