From 417028b1857bae445ed9b29332421aaf564f47e7 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Wed, 28 Feb 2024 12:06:21 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=20Adds=20optional=20item.rel=20att?= =?UTF-8?q?ribute=20(fixes=20#1477)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/configuring.md | 1 + src/components/LinkItems/Item.vue | 3 ++- src/utils/ConfigSchema.json | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/configuring.md b/docs/configuring.md index 0e8f9a62..72558e70 100644 --- a/docs/configuring.md +++ b/docs/configuring.md @@ -228,6 +228,7 @@ For more info, see the **[Authentication Docs](/docs/authentication.md)** **`statusCheckAcceptCodes`** | `string` | _Optional_ | If your service's response code is anything other than 2xx, then you can opt to specify an alternative success code. E.g. if you expect your server to return 403, but still want the status indicator to be green, set this value to `403` **`statusCheckMaxRedirects`** | `number` | _Optional_ | If your service redirects to another page, and you would like status checks to follow redirects, then specify the maximum number of redirects here. Defaults to `0` / will not follow redirects **`color`** | `string` | _Optional_ | An optional color for the text and font-awesome icon to be displayed in. Note that this will override the current theme and so may not display well +**`rel`** | `string` | _Optional_ | The value of the `rel` attribute for the link. Useful for specifying the relationship between the target link/document and Dashy. Defaults to `noopener noreferrer` **`backgroundColor`** | `string` | _Optional_ | An optional background fill color for the that given item. Again, this will override the current theme and so might not display well against the background **`provider`** | `string` | _Optional_ | The name of the provider for a given service, useful for when including hosted apps. In some themes, this is visible under the item name **`displayData`** | `object` | _Optional_ | Meta-data to optionally override display settings for a given item. See [`displayData`](#itemdisplaydata-optional) diff --git a/src/components/LinkItems/Item.vue b/src/components/LinkItems/Item.vue index 370ac83d..753b2f95 100644 --- a/src/components/LinkItems/Item.vue +++ b/src/components/LinkItems/Item.vue @@ -9,7 +9,8 @@ :target="anchorTarget" :class="`item ${makeClassList}`" v-tooltip="getTooltipOptions()" - rel="noopener noreferrer" tabindex="0" + :rel="`${item.rel || 'noopener noreferrer'}`" + tabindex="0" :id="`link-${item.id}`" :style="customStyle" > diff --git a/src/utils/ConfigSchema.json b/src/utils/ConfigSchema.json index fc43b1d1..2dd6665b 100644 --- a/src/utils/ConfigSchema.json +++ b/src/utils/ConfigSchema.json @@ -982,6 +982,11 @@ "type": "number", "description": "A numeric shortcut key, between 0 and 9. Useful for quickly launching frequently used applications" }, + "rel": { + "title": "rel", + "type": "string", + "description": "The rel attribute for the link. For specifying the relationship between the current document and the linked document" + }, "tags": { "title": "Tags", "type": "array",