mirror of
https://github.com/VueTubeApp/VueTube
synced 2025-01-03 14:11:08 +00:00
show loading wheel on search
This commit is contained in:
parent
18b6e78012
commit
2c60c8c6cf
2 changed files with 14 additions and 4 deletions
|
@ -5,6 +5,7 @@
|
|||
<v-icon size="100">mdi-alert-circle</v-icon>
|
||||
<h1 class="grey--text">An error occured!</h1>
|
||||
<v-btn to="/">Reload Application</v-btn>
|
||||
<v-btn to="/logs">Show Logs</v-btn>
|
||||
|
||||
|
||||
<div style="margin-top: 5em; color: #999; font-size: 0.75em;">
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
<template>
|
||||
<div>
|
||||
|
||||
<center style="padding-top: 3em;" v-if="videos == null">
|
||||
<v-progress-circular
|
||||
size="50"
|
||||
indeterminate
|
||||
color="primary"
|
||||
/>
|
||||
</center>
|
||||
|
||||
<v-list-item v-for="(video, index) in videos" :key="index">
|
||||
<v-card class="entry">
|
||||
<v-card-title v-text="video.raw.compactVideoRenderer.title.runs[0].text" />
|
||||
|
@ -25,14 +34,14 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
videos: []
|
||||
videos: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const searchQuestion = this.$route.query.q
|
||||
|
||||
const vm = this;
|
||||
this.$youtube.search(searchQuestion, (data) => {
|
||||
console.log(data)
|
||||
vm.videos = data;
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue