Skip to content

Commit 425a9ed

Browse files
committed
fix(tags): change to bordered tags to increase readability
1 parent 0dd32ee commit 425a9ed

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

src/components/common/list/use-list-scroll.ts

+9-6
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ const i18n = useI18n('common', 'tag');
8383
export const getTags = (item: Pick<ListScrollSourceItem, 'episode' | 'season'>, type: ListScrollItem['type']): ListScrollItem['tags'] => {
8484
const tags: ListScrollItem['tags'] = [];
8585
if (type === 'episode' && item.episode) {
86+
tags.push({
87+
label: `${i18n('season')} ${item.episode.season.toString().padStart(2, '0')} ${i18n('episode')} ${item.episode.number
88+
.toString()
89+
.padStart(2, '0')}`,
90+
type: 'warning',
91+
bordered: true,
92+
});
93+
8694
let premiere: 'season' | 'series' | 'mid_season' | null = null;
8795
// let finale: 'season' | 'series' | 'mid_season';
8896
if (item.episode.season === 1 && item.episode.number === 1) premiere = 'series';
@@ -93,14 +101,9 @@ export const getTags = (item: Pick<ListScrollSourceItem, 'episode' | 'season'>,
93101
label: premiere,
94102
i18n: ['calendar', 'tag', 'label', 'premiere'],
95103
type: premiere === 'season' ? 'info' : 'primary',
104+
bordered: true,
96105
});
97106
}
98-
tags.push({
99-
label: `${i18n('season')} ${item.episode.season.toString().padStart(2, '0')} ${i18n('episode')} ${item.episode.number
100-
.toString()
101-
.padStart(2, '0')}`,
102-
type: 'warning',
103-
});
104107
} else if (type === 'season' && item.season) {
105108
tags.push({
106109
label: `Season ${item.season.number.toString().padStart(2, '0')}`,

src/i18n/en/calendar/calendar.json

+4
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@
1818
"calendar__tag__label__finale__season": {
1919
"message": "Season Finale",
2020
"description": "Label for a season finale"
21+
},
22+
"calendar__tag__label__finale": {
23+
"message": "Finale",
24+
"description": "Label for a finale"
2125
}
2226
}

0 commit comments

Comments
 (0)