File tree 3 files changed +5
-2
lines changed
3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" p-4 flex gap-4" >
3
3
<div class =" flex-shrink-0 flex" >
4
- <a :href =" link" class =" self-center w-16 h-16 overflow-hidden rounded-2xl border border-fg/10 dark:border-fg/15" >
4
+ <a :href =" link" :target = " target " class =" self-center w-16 h-16 overflow-hidden rounded-2xl border border-fg/10 dark:border-fg/15" >
5
5
<slot name =" icon" >
6
6
<ServiceBaseIcon v-if =" icon" v-bind =" icon" />
7
7
</slot >
10
10
<div >
11
11
<h3 class =" text-lg mt-1 font-semibold line-clamp-1 flex gap-2 items-center" >
12
12
<slot name =" title" >
13
- <a :href =" link" >{{ title }}</a >
13
+ <a :href =" link" :target = " target " >{{ title }}</a >
14
14
</slot >
15
15
<slot v-if =" props?.status" name =" status" >
16
16
<ServiceBaseStatus :ping =" data?.ping" />
@@ -31,6 +31,7 @@ import type { BaseService } from '~/types'
31
31
import { useServiceData } from ' ~/composables/services'
32
32
33
33
const props = defineProps <BaseService >()
34
+ const target = computed (() => props .target || ' _blank' )
34
35
35
36
// Right now, queries for "base" are only needed for statuses.
36
37
// When the situation will change it is necessary to remove/add condition for "immediate"
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ export function validateConfigSchema(config: any) {
41
41
title : z . string ( ) ,
42
42
description : z . string ( ) . optional ( ) ,
43
43
link : z . string ( ) ,
44
+ target : z . string ( ) . optional ( ) ,
44
45
icon : icon . optional ( ) ,
45
46
status : status . optional ( ) ,
46
47
type : z . string ( ) . optional ( ) ,
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export interface BaseService {
17
17
title : string
18
18
description ?: string
19
19
link : string
20
+ target ?: '_blank' | '_self' | '_parent' | '_top'
20
21
icon ?: ServiceIcon
21
22
status ?: ServiceStatus
22
23
options ?: Record < string , string | number | boolean >
You can’t perform that action at this time.
0 commit comments