File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 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'
3131import { useServiceData } from ' ~/composables/services'
3232
3333const props = defineProps <BaseService >()
34- const target = computed (() => props .target || ' _blank' )
34+
35+ const { $settings } = useNuxtApp ()
36+ const target = computed (() => props .target || $settings .behaviour .target )
3537
3638// Right now, queries for "base" are only needed for statuses.
3739// 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 {
1919 lang : 'en' ,
2020 theme : 'system' ,
2121 checkUpdates : true ,
22+ behaviour : {
23+ target : '_blank' ,
24+ } ,
2225 services : [ ] ,
2326 }
2427}
Original file line number Diff line number Diff line change @@ -5,10 +5,15 @@ export interface ServicesGroup {
55 items : BaseService [ ]
66}
77
8+ export interface Behaviour {
9+ target ?: '_blank' | '_self' | '_parent' | '_top'
10+ }
11+
812export interface Config {
913 title ?: string
1014 lang : 'en' | 'ru'
1115 theme ?: 'system' | 'light' | 'dark' | 'deep' | 'sepia'
16+ behaviour ?: Behaviour
1217 services : ServicesGroup [ ]
1318 checkUpdates : boolean
1419}
You can’t perform that action at this time.
0 commit comments