File tree 3 files changed +11
-1
lines changed
3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ 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
+ const { $settings } = useNuxtApp ()
36
+ const target = computed (() => props .target || $settings .behaviour .target )
35
37
36
38
// Right now, queries for "base" are only needed for statuses.
37
39
// When the situation will change it is necessary to remove/add condition for "immediate"
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ export function getDefaultConfig(): CompleteConfig {
19
19
lang : 'en' ,
20
20
theme : 'system' ,
21
21
checkUpdates : true ,
22
+ behaviour : {
23
+ target : '_blank' ,
24
+ } ,
22
25
services : [ ] ,
23
26
}
24
27
}
Original file line number Diff line number Diff line change @@ -5,10 +5,15 @@ export interface ServicesGroup {
5
5
items : BaseService [ ]
6
6
}
7
7
8
+ export interface Behaviour {
9
+ target ?: '_blank' | '_self' | '_parent' | '_top'
10
+ }
11
+
8
12
export interface Config {
9
13
title ?: string
10
14
lang : 'en' | 'ru'
11
15
theme ?: 'system' | 'light' | 'dark' | 'deep' | 'sepia'
16
+ behaviour ?: Behaviour
12
17
services : ServicesGroup [ ]
13
18
checkUpdates : boolean
14
19
}
You can’t perform that action at this time.
0 commit comments