Skip to content

Commit

Permalink
fix: migrate to file upload structure with .url
Browse files Browse the repository at this point in the history
  • Loading branch information
genofire committed Mar 10, 2023
1 parent 558db2c commit d69599a
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/components/AdminDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}"
>
<v-list-item-avatar color="black">
<v-img v-if="channel.logo" :src="channel.logo" contain />
<v-img v-if="channel.logo" :src="channel.logo.url" contain />
<span v-else>{{ channel.title.slice(0, 2) }}</span>
</v-list-item-avatar></router-link
>
Expand Down Expand Up @@ -75,7 +75,7 @@
:to="{ name: 'AdminChannel', params: { channelid: channel.id } }"
>
<v-list-item-avatar color="black" size="24" class="mr-8">
<v-img v-if="channel.logo" :src="channel.logo" contain />
<v-img v-if="channel.logo" :src="channel.logo.url" contain />
<span v-else>{{ channel.title.slice(0, 2) }}</span>
</v-list-item-avatar>
<v-list-item-content>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Poster.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<v-img
v-if="showPreview"
v-ripple="{ class: 'neutral--text', center: true }"
:src="video.preview"
:src="video.preview.url"
class="white--text align-end"
gradient="to bottom, rgba(0,0,0,0), rgba(0,0,0,.5)"
height="100%"
Expand Down Expand Up @@ -47,7 +47,7 @@
<v-img
v-if="!showPreview"
v-ripple="{ class: 'neutral--text', center: true }"
:src="video.poster"
:src="video.poster.url"
class="white--text align-end"
gradient="to bottom, rgba(0,0,0,0), rgba(0,0,0,.5)"
height="100%"
Expand All @@ -72,7 +72,7 @@
<v-img
v-else
v-ripple="{ class: 'neutral--text', center: true }"
:src="video.poster"
:src="video.poster.url"
class="white--text align-end"
gradient="to bottom, rgba(0,0,0,0), rgba(0,0,0,.5)"
height="100%"
Expand Down
2 changes: 1 addition & 1 deletion src/components/VideoPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
// Disabled as source is now passed as a prop from parent component
// source: this.source,
options: {
image: this.poster,
image: this.poster.url,
autoStart: this.autostart,
sources: this.sources,
},
Expand Down
2 changes: 1 addition & 1 deletion src/views/Admin/ChannelEvents.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<tr v-for="item in list" :key="item.id">
<td>
<v-avatar v-if="item.logo" size="32px">
<img :src="item.logo" />
<img :src="item.logo.url" />
</v-avatar>
</td>
<td>{{ item.name }}</td>
Expand Down
2 changes: 1 addition & 1 deletion src/views/Admin/ChannelLive.vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default {
api.Channels.GetStream(this.channelid).then(
(resp) => {
this.video = resp.data;
if (this.video.poster == "") {
if (this.video.poster) {
this.video.poster = resp.data.channel.logo;
}
},
Expand Down
5 changes: 3 additions & 2 deletions src/views/Admin/ChannelProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
style="width: 200px"
>
<v-avatar class="ma-4" rounded="0" height="128" width="128">
<v-img v-if="channel.logo" :src="channel.logo" contain />
<v-img v-if="channel.logo" :src="channel.logo.url" contain />
</v-avatar>
<v-btn fab depressed @click="showUploadDialog = true" class="mt-2">
<v-icon> mdi-pencil </v-icon>
Expand All @@ -63,7 +63,8 @@
@input="enableSave = true"
/>
<v-text-field
v-model.lazy="channel.logo"
v-if="channel.logo"
v-model.lazy="channel.logo.url"
:color="darkMode ? 'grey lighten-3' : 'grey darken-2'"
label="Logo URL"
outlined
Expand Down
2 changes: 1 addition & 1 deletion src/views/Admin/ChannelRecordings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
>
<template #item.poster="{ item }">
<v-img
:src="item.poster"
:src="item.poster.url"
alt="Poster"
height="56"
max-width="100"
Expand Down
2 changes: 1 addition & 1 deletion src/views/Main/Live.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default {
api.Channels.GetStream(this.id).then(
(resp) => {
this.video = resp.data;
if (this.video.poster == "") {
if (this.video.poster) {
this.video.poster = resp.data.channel.logo;
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/views/Single.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default {
return api.Channels.GetStream(this.id).then(
(resp) => {
this.video = resp.data;
if (this.video.poster == "") {
if (this.video.poster) {
this.video.poster = resp.data.channel.logo;
}
},
Expand Down

0 comments on commit d69599a

Please sign in to comment.