mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	Add loading indicators
This commit is contained in:
		
							parent
							
								
									d823853b0d
								
							
						
					
					
						commit
						889a410cbd
					
				
					 5 changed files with 28 additions and 3 deletions
				
			
		| 
						 | 
					@ -62,18 +62,23 @@
 | 
				
			||||||
            />
 | 
					            />
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div v-else>
 | 
				
			||||||
 | 
					        <LoadingIndicator />
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import ErrorHandler from "./ErrorHandler.vue";
 | 
					import ErrorHandler from "./ErrorHandler.vue";
 | 
				
			||||||
import ContentItem from "./ContentItem.vue";
 | 
					import ContentItem from "./ContentItem.vue";
 | 
				
			||||||
import WatchOnYouTubeButton from "./WatchOnYouTubeButton.vue";
 | 
					import WatchOnYouTubeButton from "./WatchOnYouTubeButton.vue";
 | 
				
			||||||
 | 
					import LoadingIndicator from "./LoadingIndicator.vue";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
    components: {
 | 
					    components: {
 | 
				
			||||||
        ErrorHandler,
 | 
					        ErrorHandler,
 | 
				
			||||||
        ContentItem,
 | 
					        ContentItem,
 | 
				
			||||||
        WatchOnYouTubeButton,
 | 
					        WatchOnYouTubeButton,
 | 
				
			||||||
 | 
					        LoadingIndicator,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    data() {
 | 
					    data() {
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -24,21 +24,26 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <hr />
 | 
					    <hr />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <div class="video-grid">
 | 
					    <div v-if="videos.length != 0" class="video-grid">
 | 
				
			||||||
        <template v-for="video in videos" :key="video.url">
 | 
					        <template v-for="video in videos" :key="video.url">
 | 
				
			||||||
            <VideoItem v-if="shouldShowVideo(video)" :is-feed="true" :item="video" />
 | 
					            <VideoItem v-if="shouldShowVideo(video)" :is-feed="true" :item="video" />
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div v-else>
 | 
				
			||||||
 | 
					        <LoadingIndicator />
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import VideoItem from "./VideoItem.vue";
 | 
					import VideoItem from "./VideoItem.vue";
 | 
				
			||||||
import SortingSelector from "./SortingSelector.vue";
 | 
					import SortingSelector from "./SortingSelector.vue";
 | 
				
			||||||
 | 
					import LoadingIndicator from "./LoadingIndicator.vue";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
    components: {
 | 
					    components: {
 | 
				
			||||||
        VideoItem,
 | 
					        VideoItem,
 | 
				
			||||||
        SortingSelector,
 | 
					        SortingSelector,
 | 
				
			||||||
 | 
					        LoadingIndicator,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    data() {
 | 
					    data() {
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -47,10 +47,14 @@
 | 
				
			||||||
            />
 | 
					            />
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div v-else>
 | 
				
			||||||
 | 
					        <LoadingIndicator />
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import ErrorHandler from "./ErrorHandler.vue";
 | 
					import ErrorHandler from "./ErrorHandler.vue";
 | 
				
			||||||
 | 
					import LoadingIndicator from "./LoadingIndicator.vue";
 | 
				
			||||||
import VideoItem from "./VideoItem.vue";
 | 
					import VideoItem from "./VideoItem.vue";
 | 
				
			||||||
import WatchOnYouTubeButton from "./WatchOnYouTubeButton.vue";
 | 
					import WatchOnYouTubeButton from "./WatchOnYouTubeButton.vue";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -59,6 +63,7 @@ export default {
 | 
				
			||||||
        ErrorHandler,
 | 
					        ErrorHandler,
 | 
				
			||||||
        VideoItem,
 | 
					        VideoItem,
 | 
				
			||||||
        WatchOnYouTubeButton,
 | 
					        WatchOnYouTubeButton,
 | 
				
			||||||
 | 
					        LoadingIndicator,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    data() {
 | 
					    data() {
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,19 +18,24 @@
 | 
				
			||||||
        </i18n-t>
 | 
					        </i18n-t>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <div v-if="results" class="video-grid">
 | 
					    <div v-if="results != null && results.items.length != 0" class="video-grid">
 | 
				
			||||||
        <template v-for="result in results.items" :key="result.url">
 | 
					        <template v-for="result in results.items" :key="result.url">
 | 
				
			||||||
            <ContentItem :item="result" height="94" width="168" />
 | 
					            <ContentItem :item="result" height="94" width="168" />
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div v-else>
 | 
				
			||||||
 | 
					        <LoadingIndicator />
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import ContentItem from "./ContentItem.vue";
 | 
					import ContentItem from "./ContentItem.vue";
 | 
				
			||||||
 | 
					import LoadingIndicator from "./LoadingIndicator.vue";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
    components: {
 | 
					    components: {
 | 
				
			||||||
        ContentItem,
 | 
					        ContentItem,
 | 
				
			||||||
 | 
					        LoadingIndicator,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    data() {
 | 
					    data() {
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,17 +3,22 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <hr />
 | 
					    <hr />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <div class="video-grid">
 | 
					    <div v-if="videos.length != 0" class="video-grid">
 | 
				
			||||||
        <VideoItem v-for="video in videos" :key="video.url" :item="video" height="118" width="210" />
 | 
					        <VideoItem v-for="video in videos" :key="video.url" :item="video" height="118" width="210" />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div v-else>
 | 
				
			||||||
 | 
					        <LoadingIndicator />
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
 | 
					import LoadingIndicator from "./LoadingIndicator.vue";
 | 
				
			||||||
import VideoItem from "./VideoItem.vue";
 | 
					import VideoItem from "./VideoItem.vue";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
    components: {
 | 
					    components: {
 | 
				
			||||||
        VideoItem,
 | 
					        VideoItem,
 | 
				
			||||||
 | 
					        LoadingIndicator,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    data() {
 | 
					    data() {
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue