@@ -18,12 +18,14 @@ import AnchorLink from '~/components/common/buttons/AnchorLink.vue';
18
18
import TagLink from ' ~/components/common/buttons/TagLink.vue' ;
19
19
import ProgressTooltip from ' ~/components/common/tooltip/ProgressTooltip.vue' ;
20
20
import IconGrid from ' ~/components/icons/IconGrid.vue' ;
21
+ import IconLoading from ' ~/components/icons/IconLoading.vue' ;
21
22
import IconPlayFilled from ' ~/components/icons/IconPlayFilled.vue' ;
22
23
import { getCustomLinkIcon } from ' ~/models/link.model' ;
23
24
import { type ListScrollItem } from ' ~/models/list-scroll.model' ;
24
25
25
26
import { ProgressType } from ' ~/models/progress-type.model' ;
26
27
import { useItemCollected , useItemPlayed } from ' ~/stores/composable/use-item-played' ;
28
+ import { useWatchingStore } from ' ~/stores/data/watching.store' ;
27
29
import { useExtensionSettingsStoreRefs } from ' ~/stores/settings/extension.store' ;
28
30
import { useLinksStore } from ' ~/stores/settings/links.store' ;
29
31
import { useI18n } from ' ~/utils/i18n.utils' ;
@@ -72,13 +74,19 @@ const props = defineProps({
72
74
required: false ,
73
75
default: false ,
74
76
},
77
+ showWatching: {
78
+ type: Boolean ,
79
+ required: false ,
80
+ default: false ,
81
+ },
75
82
showTagLoader: {
76
83
type: Boolean ,
77
84
required: false ,
78
85
},
79
86
});
80
87
81
- const { item, hideDate, showProgress, showPlayed, showCollected } = toRefs (props );
88
+ const { item, hideDate, showProgress, showPlayed, showCollected, showWatching } =
89
+ toRefs (props );
82
90
83
91
const type = computed (() =>
84
92
item .value .type ? i18n (item .value .type , ' common' , ' media' , ' type' ) : item .value .type ,
@@ -118,6 +126,13 @@ const {
118
126
} = useItemPlayed (item , { showPlayed , showProgress });
119
127
const { collected, date : collectedDate } = useItemCollected (item , showCollected );
120
128
129
+ const { isWatchingListItem } = useWatchingStore ();
130
+ const watching = computed (() => {
131
+ if (! showWatching .value ) return false ;
132
+ if (! item .value ) return false ;
133
+ return isWatchingListItem (item .value );
134
+ });
135
+
121
136
const { progressType } = useExtensionSettingsStoreRefs ();
122
137
123
138
const percentage = computed (() => {
@@ -274,6 +289,26 @@ const onTagClick = (url?: string) => {
274
289
</template >
275
290
</NTag >
276
291
</template >
292
+ <template v-if =" showWatching && watching " >
293
+ <NSkeleton
294
+ v-if =" loading"
295
+ key =" watching-loader"
296
+ text
297
+ style =" width : 22px ; height : 18px ; border-radius : 2px "
298
+ />
299
+ <NTag
300
+ v-else
301
+ key =" watching"
302
+ class =" tag badge"
303
+ size =" small"
304
+ type =" error"
305
+ :bordered =" false"
306
+ >
307
+ <template #icon >
308
+ <NIcon :component =" IconLoading" />
309
+ </template >
310
+ </NTag >
311
+ </template >
277
312
</NFlex >
278
313
<div v-if =" showProgress" class =" panel-progress" >
279
314
<NSkeleton
0 commit comments