Use a slot for displaying the loading indicator content

This commit is contained in:
Bnyro
2023-03-13 14:39:07 +01:00
parent cc48fe8e27
commit ae855c2bac
7 changed files with 41 additions and 45 deletions

View File

@@ -1,7 +1,7 @@
<template>
<ErrorHandler v-if="channel && channel.error" :message="channel.message" :error="channel.error" />
<div v-if="channel" v-show="!channel.error">
<LoadingIndicatorPage :show-content="channel != null && !channel.error">
<div class="flex justify-center place-items-center">
<img height="48" width="48" class="rounded-full m-1" :src="channel.avatarUrl" />
<h1 v-text="channel.name" />
@@ -61,24 +61,21 @@
hide-channel
/>
</div>
</div>
<div v-else>
<LoadingIndicator />
</div>
</LoadingIndicatorPage>
</template>
<script>
import ErrorHandler from "./ErrorHandler.vue";
import ContentItem from "./ContentItem.vue";
import WatchOnYouTubeButton from "./WatchOnYouTubeButton.vue";
import LoadingIndicator from "./LoadingIndicator.vue";
import LoadingIndicatorPage from "./LoadingIndicatorPage.vue";
export default {
components: {
ErrorHandler,
ContentItem,
WatchOnYouTubeButton,
LoadingIndicator,
LoadingIndicatorPage,
},
data() {
return {