Continue to work on Discover
All checks were successful
repod / nextcloud-25 (push) Successful in 34s
repod / nextcloud-27 (push) Successful in 33s
repod / nodejs (push) Successful in 1m22s

This commit is contained in:
Michel Roux 2023-07-03 08:42:00 +02:00
parent b09e8a5ef2
commit 1f84c2c598
2 changed files with 24 additions and 9 deletions

View File

@ -1,5 +1,11 @@
<template> <template>
<fragment> <fragment>
<p class="more">
<span>{{ t('repod', 'Discover') }}</span>
<NcButton v-if="showMore" @click="more">
{{ t('repod', 'More') }}
</NcButton>
</p>
<p> <p>
<NcLoadingIcon v-if="loading" /> <NcLoadingIcon v-if="loading" />
<ul v-if="!loading" class="tops"> <ul v-if="!loading" class="tops">
@ -7,11 +13,7 @@
<img :src="top.artworkUrl100" :alt="top.artistName" :title="top.artistName"> <img :src="top.artworkUrl100" :alt="top.artistName" :title="top.artistName">
</li> </li>
</ul> </ul>
</p> <span class="caption">{{ t('repod', 'Suggests by iTunes') }}</span>
<p>
<NcButton v-if="showMore" @click="more">
{{ t('repod', 'More') }}
</NcButton>
</p> </p>
</fragment> </fragment>
</template> </template>
@ -53,7 +55,7 @@ export default {
this.tops = top.data this.tops = top.data
} catch (e) { } catch (e) {
console.error(e) console.error(e)
showError(t('repod', 'Could not fetch subscriptions')) showError(t('repod', 'Could not fetch tops'))
} }
this.loading = false this.loading = false
@ -78,4 +80,16 @@ export default {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
.more {
display: flex;
justify-content: space-between;
align-items: center;
}
.caption {
float: right;
font-size: small;
margin: .5rem;
}
</style> </style>

View File

@ -1,11 +1,11 @@
<template> <template>
<div class="main"> <div class="main">
<p> <p>
<NcTextField :label="t('repod', 'Find a podcast')" value=""> <NcTextField :value.sync="search" :label="t('repod', 'Find a podcast')">
<Magnify /> <Magnify />
</NcTextField> </NcTextField>
</p> </p>
<Top /> <Top v-if="!search" />
</div> </div>
</template> </template>
@ -23,6 +23,7 @@ export default {
}, },
data() { data() {
return { return {
search: '',
} }
}, },
computed: { computed: {
@ -39,6 +40,6 @@ export default {
margin: 11px 55px; margin: 11px 55px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 2rem; gap: 1rem;
} }
</style> </style>