From ed8ec0dc2bbfb60a00af1411eb8fb496215813bf Mon Sep 17 00:00:00 2001 From: Emily Date: Sun, 16 Jun 2024 17:35:59 +0200 Subject: [PATCH] add referrers link --- dashboard/components/dashboard/BarsCard.vue | 50 +++++++++++++------ .../components/dashboard/ReferrersBarCard.vue | 6 +-- 2 files changed, 37 insertions(+), 19 deletions(-) diff --git a/dashboard/components/dashboard/BarsCard.vue b/dashboard/components/dashboard/BarsCard.vue index 2022ec4..294c55b 100644 --- a/dashboard/components/dashboard/BarsCard.vue +++ b/dashboard/components/dashboard/BarsCard.vue @@ -16,7 +16,8 @@ type Props = { isDetailView?: boolean, rawButton?: boolean, hideShowMore?: boolean, - customIconStyle?: string + customIconStyle?: string, + showLink?: boolean } const props = defineProps(); const emits = defineEmits<{ @@ -40,6 +41,11 @@ function showDetails(id: string) { emits('showDetails', id); } +function openExternalLink(link: string) { + if (link === 'self') return; + return window.open('https://' + link, '_blank'); +} +