Skip to content

Commit

Permalink
feat: show episode description
Browse files Browse the repository at this point in the history
  • Loading branch information
pbek committed Mar 3, 2023
1 parent 7a40410 commit 1a8559d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## 0.2.0
- You can now click an episode to show the description of the episode
- The episode image detection was now made more fault-tolerant to always be able to show an episode image

## 0.1.1
Expand Down
25 changes: 24 additions & 1 deletion src/components/ActionListItem.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<NcListItem :title="isLoading ? action.episodeUrl : getEpisodeName()"
@click="showModalEpisodeDescription"
:details="getDetails()">
<template #icon>
<!--
Expand All @@ -19,7 +20,7 @@
<NcModal
v-if="modalPlayer"
@close="closeModalPlayer"
size="small"
size="normal"
title="Play media"
:outTransition="true">
<div class="modal__content">
Expand All @@ -31,6 +32,18 @@
</audio>
</div>
</NcModal>
<NcModal
v-if="modalEpisodeDescription"
@close="closeModalEpisodeDescription"
size="large"
title="Episode description"
:outTransition="true">
<div class="modal__content">
<h2 v-if="isLoading">Loading episode description"</h2>
<h2 v-else>Episode description</h2>
<div v-html="getEpisodeDescription()"></div>
</div>
</NcModal>
</template>
<template #actions>
<NcActionLink :href="action.podcastUrl"
Expand Down Expand Up @@ -91,6 +104,7 @@ export default {
actionExtraData: null,
isLoading: true,
modalPlayer: false,
modalEpisodeDescription: false,
}
},
async mounted() {
Expand Down Expand Up @@ -147,11 +161,20 @@ export default {
getEpisodeLink() {
return this.actionExtraData?.episodeLink ?? ''
},
getEpisodeDescription() {
return this.actionExtraData?.episodeDescription ?? '';
},
showModalPlayer() {
this.modalPlayer = true
},
closeModalPlayer() {
this.modalPlayer = false
},
showModalEpisodeDescription() {
this.modalEpisodeDescription = true
},
closeModalEpisodeDescription() {
this.modalEpisodeDescription = false
}
},
watch: {
Expand Down

0 comments on commit 1a8559d

Please sign in to comment.