mirror of
https://github.com/jellyfin/jellyfin-vue.git
synced 2025-03-02 10:57:32 +00:00
feat(item details page): add basic item details page
This commit is contained in:
parent
604f1e79cd
commit
c94c6d6cd9
41
pages/itemdetails/_itemId.vue
Normal file
41
pages/itemdetails/_itemId.vue
Normal file
@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-img :src="imageLink(Item.Id, 'backdrop')"></v-img>
|
||||
<h1>{{ Item.Name }}</h1>
|
||||
<p>{{ Item.Overview }}</p>
|
||||
<v-btn color="primary">Play {{ Item.Type }} </v-btn>
|
||||
<v-btn>More</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
return {
|
||||
Name: '',
|
||||
Item: {},
|
||||
Seasons: {},
|
||||
Episodes: []
|
||||
};
|
||||
},
|
||||
|
||||
async beforeMount() {
|
||||
const Item = await this.$itemsApi.getItems({
|
||||
uId: this.$auth.user.Id,
|
||||
userId: this.$auth.user.Id,
|
||||
ids: this.$route.params.itemId,
|
||||
fields: 'Overview'
|
||||
});
|
||||
|
||||
this.Item = Item.data.Items[0];
|
||||
},
|
||||
methods: {
|
||||
imageLink(id: string, type: string) {
|
||||
const url = `${this.$axios.defaults.baseURL}/Items/${id}/Images/${type}`;
|
||||
return url;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user