Readd AdapatativeList
This commit is contained in:
parent
1eeb718a88
commit
eb680fc932
22
src/components/Atoms/AdaptativeList.vue
Normal file
22
src/components/Atoms/AdaptativeList.vue
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<template>
|
||||||
|
<ul :class="episode ? 'margin' : ''">
|
||||||
|
<slot />
|
||||||
|
</ul>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'AdaptativeList',
|
||||||
|
computed: {
|
||||||
|
episode() {
|
||||||
|
return this.$store.state.player.episode
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.margin {
|
||||||
|
margin-bottom: 6rem;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<Loading v-if="loading" />
|
<Loading v-if="loading" />
|
||||||
<ul v-if="!loading">
|
<AdaptativeList v-if="!loading">
|
||||||
<NcListItem v-for="feed in feeds"
|
<NcListItem v-for="feed in feeds"
|
||||||
:key="feed.link"
|
:key="feed.link"
|
||||||
:details="moment(feed.fetchedAtUnix*1000).fromNow()"
|
:details="moment(feed.fetchedAtUnix*1000).fromNow()"
|
||||||
@ -16,12 +16,13 @@
|
|||||||
{{ feed.author }}
|
{{ feed.author }}
|
||||||
</template>
|
</template>
|
||||||
</NcListItem>
|
</NcListItem>
|
||||||
</ul>
|
</AdaptativeList>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { NcAvatar, NcListItem } from '@nextcloud/vue'
|
import { NcAvatar, NcListItem } from '@nextcloud/vue'
|
||||||
|
import AdaptativeList from '../Atoms/AdaptativeList.vue'
|
||||||
import Loading from '../Atoms/Loading.vue'
|
import Loading from '../Atoms/Loading.vue'
|
||||||
import axios from '@nextcloud/axios'
|
import axios from '@nextcloud/axios'
|
||||||
import { debounce } from '../../utils/debounce.js'
|
import { debounce } from '../../utils/debounce.js'
|
||||||
@ -32,6 +33,7 @@ import { showError } from '@nextcloud/dialogs'
|
|||||||
export default {
|
export default {
|
||||||
name: 'Search',
|
name: 'Search',
|
||||||
components: {
|
components: {
|
||||||
|
AdaptativeList,
|
||||||
Loading,
|
Loading,
|
||||||
NcAvatar,
|
NcAvatar,
|
||||||
NcListItem,
|
NcListItem,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="currentEpisode ? 'margin' : ''">
|
<div>
|
||||||
<Loading v-if="loading" />
|
<Loading v-if="loading" />
|
||||||
<ul v-if="!loading">
|
<AdaptativeList v-if="!loading">
|
||||||
<NcListItem v-for="episode in episodes"
|
<NcListItem v-for="episode in episodes"
|
||||||
:key="episode.episodeGuid"
|
:key="episode.episodeGuid"
|
||||||
:active="isCurrentEpisode(episode)"
|
:active="isCurrentEpisode(episode)"
|
||||||
@ -33,12 +33,13 @@
|
|||||||
</NcActionButton>
|
</NcActionButton>
|
||||||
</template>
|
</template>
|
||||||
</NcListItem>
|
</NcListItem>
|
||||||
</ul>
|
</AdaptativeList>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { NcActionButton, NcAvatar, NcListItem } from '@nextcloud/vue'
|
import { NcActionButton, NcAvatar, NcListItem } from '@nextcloud/vue'
|
||||||
|
import AdaptativeList from '../Atoms/AdaptativeList.vue'
|
||||||
import Loading from '../Atoms/Loading.vue'
|
import Loading from '../Atoms/Loading.vue'
|
||||||
import PlayButton from 'vue-material-design-icons/Play.vue'
|
import PlayButton from 'vue-material-design-icons/Play.vue'
|
||||||
import StopButton from 'vue-material-design-icons/Stop.vue'
|
import StopButton from 'vue-material-design-icons/Stop.vue'
|
||||||
@ -51,6 +52,7 @@ import { showError } from '@nextcloud/dialogs'
|
|||||||
export default {
|
export default {
|
||||||
name: 'Episodes',
|
name: 'Episodes',
|
||||||
components: {
|
components: {
|
||||||
|
AdaptativeList,
|
||||||
Loading,
|
Loading,
|
||||||
NcActionButton,
|
NcActionButton,
|
||||||
NcAvatar,
|
NcAvatar,
|
||||||
@ -101,8 +103,4 @@ export default {
|
|||||||
.ended {
|
.ended {
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.margin {
|
|
||||||
margin-bottom: 6rem;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<NcAppNavigation :class="currentEpisode ? 'margin' : ''">
|
<NcAppNavigation>
|
||||||
<NcAppContentList>
|
<NcAppContentList>
|
||||||
<router-link to="/">
|
<router-link to="/">
|
||||||
<NcAppNavigationNew :text="t('Add a podcast')">
|
<NcAppNavigationNew :text="t('Add a podcast')">
|
||||||
@ -9,17 +9,18 @@
|
|||||||
</NcAppNavigationNew>
|
</NcAppNavigationNew>
|
||||||
</router-link>
|
</router-link>
|
||||||
<Loading v-if="loading" />
|
<Loading v-if="loading" />
|
||||||
<ul v-if="!loading">
|
<AdaptativeList v-if="!loading">
|
||||||
<Item v-for="subscriptionUrl of subscriptions"
|
<Item v-for="subscriptionUrl of subscriptions"
|
||||||
:key="subscriptionUrl"
|
:key="subscriptionUrl"
|
||||||
:url="subscriptionUrl" />
|
:url="subscriptionUrl" />
|
||||||
</ul>
|
</AdaptativeList>
|
||||||
</NcAppContentList>
|
</NcAppContentList>
|
||||||
</NcAppNavigation>
|
</NcAppNavigation>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { NcAppContentList, NcAppNavigation, NcAppNavigationNew } from '@nextcloud/vue'
|
import { NcAppContentList, NcAppNavigation, NcAppNavigationNew } from '@nextcloud/vue'
|
||||||
|
import AdaptativeList from '../Atoms/AdaptativeList.vue'
|
||||||
import Item from './Item.vue'
|
import Item from './Item.vue'
|
||||||
import Loading from '../Atoms/Loading.vue'
|
import Loading from '../Atoms/Loading.vue'
|
||||||
import Plus from 'vue-material-design-icons/Plus.vue'
|
import Plus from 'vue-material-design-icons/Plus.vue'
|
||||||
@ -28,6 +29,7 @@ import { showError } from '@nextcloud/dialogs'
|
|||||||
export default {
|
export default {
|
||||||
name: 'Subscriptions',
|
name: 'Subscriptions',
|
||||||
components: {
|
components: {
|
||||||
|
AdaptativeList,
|
||||||
Item,
|
Item,
|
||||||
Loading,
|
Loading,
|
||||||
NcAppContentList,
|
NcAppContentList,
|
||||||
@ -60,9 +62,3 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.margin {
|
|
||||||
margin-bottom: 6rem;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user