diff --git a/client/assets/global.scss b/client/assets/global.scss index cab8e039..69822065 100644 --- a/client/assets/global.scss +++ b/client/assets/global.scss @@ -148,3 +148,9 @@ body { .text-capitalize-first-letter::first-letter { text-transform: uppercase; } + +/* Global Jellyfin styles */ + +.item-overview { + text-align: justify; +} diff --git a/client/components/Item/Card/Card.vue b/client/components/Item/Card/Card.vue index 229d71b1..482202be 100644 --- a/client/components/Item/Card/Card.vue +++ b/client/components/Item/Card/Card.vue @@ -164,7 +164,7 @@ export default Vue.extend({ * @returns {string} Either the item name or the series name */ cardTitle(): string { - if (this.item.Type !== 'Episode') { + if (this.item.Type !== 'Episode' || this.episode) { return this.item.Name || ''; } else { return this.item.SeriesName || ''; @@ -176,6 +176,10 @@ export default Vue.extend({ * or the album artist */ cardSubtitle(): string { + if (this.episode) { + return ''; + } + switch (this.item.Type) { case 'Episode': return `${this.$t('seasonEpisodeAbbrev', { diff --git a/client/components/Item/ItemGrid.vue b/client/components/Item/ItemGrid.vue index 4ccf0570..5dfd78e2 100644 --- a/client/components/Item/ItemGrid.vue +++ b/client/components/Item/ItemGrid.vue @@ -24,6 +24,7 @@ v-for="card of item.chunk" :key="card.Id" :item="card" + :episode="episode" margin text overlay @@ -62,12 +63,13 @@ export default Vue.extend({ } }, loading: { - type: Boolean, - required: false + type: Boolean + }, + episode: { + type: Boolean }, large: { - type: Boolean, - required: false + type: Boolean } }, computed: { diff --git a/client/components/Item/MediaInfo.vue b/client/components/Item/MediaInfo.vue index 9e3353a1..0c90ca64 100644 --- a/client/components/Item/MediaInfo.vue +++ b/client/components/Item/MediaInfo.vue @@ -1,7 +1,11 @@ @@ -162,10 +247,11 @@ import { Context } from '@nuxt/types'; import imageHelper from '~/mixins/imageHelper'; import formsHelper from '~/mixins/formsHelper'; import itemHelper from '~/mixins/itemHelper'; +import timeUtils from '~/mixins/timeUtils'; import { isValidMD5 } from '~/utils/items'; export default Vue.extend({ - mixins: [imageHelper, formsHelper, itemHelper], + mixins: [imageHelper, formsHelper, itemHelper, timeUtils], validate(ctx: Context) { return isValidMD5(ctx.route.params.itemId); }, @@ -180,6 +266,7 @@ export default Vue.extend({ }, data() { return { + activeTab: 0, itemId: '' as string, parentItem: {} as BaseItemDto, backdropImageSource: '', @@ -234,6 +321,26 @@ export default Vue.extend({ (person: BaseItemPerson) => person.Type === 'Writer' ); } + }, + startDate(): Date | null { + if (this.item.PremiereDate) { + return this.$dateFns.format(new Date(this.item.PremiereDate), 'PPP', { + locale: this.$i18n.locale + }); + } else { + return null; + } + }, + endDate: { + get(): Date | null { + if (this.item.EndDate) { + return this.$dateFns.format(new Date(this.item.EndDate), 'PPP', { + locale: this.$i18n.locale + }); + } else { + return null; + } + } } }, watch: { @@ -262,3 +369,12 @@ export default Vue.extend({ } }); + +