@@ -15,6 +15,7 @@ import PosterPlaceholder from '~/assets/images/poster-placholder.webp';
15
15
import { type ListScrollItem } from ' ~/models/list-scroll.model' ;
16
16
17
17
import { useShowStore } from ' ~/stores/data/show.store' ;
18
+ import { useExtensionSettingsStoreRefs } from ' ~/stores/settings/extension.store' ;
18
19
import { useI18n } from ' ~/utils' ;
19
20
import { createTab } from ' ~/utils/browser/browser.utils' ;
20
21
import { deCapitalise } from ' ~/utils/string.utils' ;
@@ -91,9 +92,11 @@ const tooltipOptions = computed<PopoverProps>(() => ({
91
92
delay: 500 ,
92
93
}));
93
94
94
- const onTagClick = (url ? : string ) => {
95
+ const { openLinksInNewTab } = useExtensionSettingsStoreRefs ();
96
+ const onTagClick = (e : MouseEvent , url ? : string ) => {
97
+ e .preventDefault ();
95
98
if (! url ) return ;
96
- createTab ({ url });
99
+ createTab ({ url , active: openLinksInNewTab . value });
97
100
};
98
101
</script >
99
102
@@ -125,18 +128,17 @@ const onTagClick = (url?: string) => {
125
128
<NFlex v-if =" date || tags?.length" size =" medium" class =" tags" >
126
129
<template v-for =" tag of tags " :key =" tag .label " >
127
130
<NSkeleton v-if =" loading" text style =" width : 6% " />
128
- <NTag
129
- v-else
130
- class =" tag"
131
- :class =" { meta: tag.meta, link: !!tag.url }"
132
- size =" small"
133
- :bordered =" tag.bordered ?? false"
134
- :href =" tag.url"
135
- v-bind =" tag"
136
- @click =" onTagClick(tag.url)"
137
- >
138
- {{ tag.label }}
139
- </NTag >
131
+ <a v-else :href =" tag.url" @click =" e => onTagClick(e, tag.url)" >
132
+ <NTag
133
+ class =" tag"
134
+ :class =" { meta: tag.meta, link: !!tag.url }"
135
+ size =" small"
136
+ :bordered =" tag.bordered ?? false"
137
+ v-bind =" tag"
138
+ >
139
+ {{ tag.label }}
140
+ </NTag >
141
+ </a >
140
142
</template >
141
143
<template v-if =" date " >
142
144
<NSkeleton v-if =" loading" text style =" width : 6% " />
0 commit comments