Skip to content

Commit a664be0

Browse files
author
Eduards Sizovs
committed
show 404 for videos that are not uploaded
1 parent 7fb9baf commit a664be0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

vue/src/Watch.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
article.message.is-danger
66
.message-header
77
p Error
8-
.message-body {{error}}
8+
.message-body {{ error }}
99
section.section
1010
.container
1111
.columns
@@ -25,7 +25,7 @@
2525
WatchingNow(:video="video" v-if="video.objectID" :minimumWatching="1")
2626
span(v-if="video.series")
2727
br
28-
router-link.mr-4(v-for="(serie, index) in video.series" :key="serie" :to="{ name: 'video', params: { id: serie } }" v-bind:class="{'has-text-grey' : serie === id}") Part {{index + 1}}
28+
router-link.mr-4(v-for="(serie, index) in video.series" :key="serie" :to="{ name: 'video', params: { id: serie } }" v-bind:class="{ 'has-text-grey': serie === id }") Part {{ index + 1 }}
2929
br
3030
span.mr-4(v-for="(speakerTwitter, speakerIndex) in video.speakerTwitters")
3131
router-link(:to="'/@' + speakerTwitter") {{ video.speakerNames[speakerIndex] }}
@@ -48,6 +48,7 @@
4848
position: relative;
4949
padding-bottom: 51.6%;
5050
height: 0;
51+
5152
iframe {
5253
position: absolute;
5354
top: 0;
@@ -78,7 +79,7 @@ export default {
7879
required: true
7980
}
8081
},
81-
data: function() {
82+
data: function () {
8283
return {
8384
error: undefined,
8485
video: {
@@ -102,7 +103,7 @@ export default {
102103
})
103104
.catch(
104105
() =>
105-
(this.error = "Could not fetch video. Is it uploaded to DevTube?")
106+
window.location.href = "https://dev.tube/404.html"
106107
);
107108
}
108109
},

0 commit comments

Comments
 (0)