|
25 | 25 | <h1 class="mt-0 font-bold h2"> |
26 | 26 | {{ showObject.name }} |
27 | 27 | </h1> |
28 | | - <div class="show-infos"> |
| 28 | + <div v-if="showObject.active" class="show-infos"> |
29 | 29 | <p> |
30 | | - Airing time: {{ dayNames[showObject.day - 1] }} {{ |
| 30 | + {{ dayNames[showObject.day - 1] }} {{ |
31 | 31 | removeSeconds(showObject.start) |
32 | | - }}–{{ removeSeconds(showObject.end) }}, |
33 | | - {{ showFrequency(showObject.frequency, showObject.week) }}, Language: <span |
34 | | - v-sanitize.nothing="getLanguageGraph(showObject.language)" |
35 | | - class="language" |
36 | | - /> |
| 32 | + }}–{{ removeSeconds(showObject.end) }} |
37 | 33 | </p> |
38 | | - <p v-if="showObject && getLatestEpisode"> |
39 | | - {{ showObject.active ? 'Show is active.' : 'Show is not active.' }} |
40 | | - Last episode: |
41 | | - <NuxtLink :to="{ path: `/shows/${slug}/${getLatestEpisode.name_slug}` }"> |
42 | | - <strong>{{ getLatestEpisode.name }}</strong> |
43 | | - </NuxtLink>, |
44 | | - {{ $moment(getLatestEpisode.play_date).fromNow() }}. |
| 34 | + <p> |
| 35 | + {{ showFrequency(showObject.frequency, showObject.week, showObject.playlist_name) }} |
| 36 | + </p> |
| 37 | + <p> |
| 38 | + Language: <span v-sanitize.nothing="getLanguageGraph(showObject.language)" class="language"/> |
| 39 | + </p> |
| 40 | + <p v-if="showObject.archive_mixcloud_base_url"> |
| 41 | + Elsewhere on web: |
| 42 | + <!-- Quick fix: we (mis)use Mixcloud links (originally meant for another upload platform) as arbitrary external link. --> |
| 43 | + <!-- Note: link needs to be full path and it will be displayed! --> |
| 44 | + <a class="show-external-link" :href="showObject.archive_mixcloud_base_url" target="_blank"> |
| 45 | + {{ showObject.archive_mixcloud_base_url }} |
| 46 | + </a> |
| 47 | + </p> |
| 48 | + </div> |
| 49 | + <!-- Inactive shows: currently hard-coded for more flexibility and readability --> |
| 50 | + <div v-else class="show-infos"> |
| 51 | + <p> |
| 52 | + <strong>Show is not active</strong> |
| 53 | + </p> |
| 54 | + <p> |
| 55 | + Language: <span v-sanitize.nothing="getLanguageGraph(showObject.language)" class="language"/> |
| 56 | + </p> |
| 57 | + <p v-if="showObject.archive_mixcloud_base_url"> |
| 58 | + Elsewhere on web: |
| 59 | + <!-- Quick fix: we (mis)use Mixcloud links (originally meant for another upload platform) as arbitrary external link. --> |
| 60 | + <!-- Note: link needs to be full path and it will be displayed! --> |
| 61 | + <a class="show-external-link" :href="showObject.archive_mixcloud_base_url" target="_blank"> |
| 62 | + {{ showObject.archive_mixcloud_base_url }} |
| 63 | + </a> |
45 | 64 | </p> |
46 | 65 | </div> |
47 | 66 | <div v-sanitize="[ sanitizeOptions, showObject.description ]" class="description-text" /> |
@@ -153,17 +172,7 @@ export default { |
153 | 172 | const day = d.getDate().toLocaleString('en-US', { minimumIntegerDigits: 2 }) |
154 | 173 | return `${year}-${month}-${day}` |
155 | 174 | }, |
156 | | - getLatestEpisode () { |
157 | | - if (this.showObject?.items) { |
158 | | - const itemsSorted = this.showObject.items |
159 | | - .filter(show => show.play_date < this.getToday) |
160 | | - .filter(show => show.archived === true) |
161 | | - .sort((a, b) => b.number - a.number) |
162 | | - .sort((a, b) => new Date(b.play_date) - new Date(a.play_date)) |
163 | | - return itemsSorted[0] |
164 | | - } |
165 | | - return null |
166 | | - }, |
| 175 | +
|
167 | 176 | arcsiEpisodesList () { |
168 | 177 | if (this.showObject?.items) { |
169 | 178 | const itemsSorted = this.showObject.items |
@@ -220,12 +229,18 @@ export default { |
220 | 229 | </script> |
221 | 230 |
|
222 | 231 | <style lang="scss" scoped> |
| 232 | +
|
| 233 | +.show-external-link { |
| 234 | + text-decoration: underline; |
| 235 | +} |
| 236 | +
|
223 | 237 | .show-image { |
224 | 238 | min-width: 300px; |
225 | 239 | max-width: 360px; |
226 | 240 | } |
227 | 241 | .show-infos { |
228 | 242 | margin-bottom: 1rem; |
| 243 | + font-style: italic; |
229 | 244 | } |
230 | 245 | .language { |
231 | 246 | display: inline-block; |
|
0 commit comments