refacto: simplify tops wordings
This commit is contained in:
parent
b784040b69
commit
37d264d717
@ -17,7 +17,7 @@ return [
|
||||
['name' => 'episodes#list', 'url' => '/episodes/list', 'verb' => 'GET'],
|
||||
['name' => 'podcast#index', 'url' => '/podcast', 'verb' => 'GET'],
|
||||
['name' => 'search#index', 'url' => '/search', 'verb' => 'GET'],
|
||||
['name' => 'toplist#hot', 'url' => '/toplist/hot', 'verb' => 'GET'],
|
||||
['name' => 'toplist#new', 'url' => '/toplist/new', 'verb' => 'GET'],
|
||||
['name' => 'tops#hot', 'url' => '/tops/hot', 'verb' => 'GET'],
|
||||
['name' => 'tops#new', 'url' => '/tops/new', 'verb' => 'GET'],
|
||||
],
|
||||
];
|
||||
|
@ -10,7 +10,7 @@ use OCP\AppFramework\Controller;
|
||||
use OCP\AppFramework\Http\JSONResponse;
|
||||
use OCP\IRequest;
|
||||
|
||||
class ToplistController extends Controller
|
||||
class TopsController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
IRequest $request,
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<NcAppContent :class="episode ? 'margin' : ''">
|
||||
<NcAppContent :class="episode ? 'padding' : ''">
|
||||
<slot />
|
||||
</NcAppContent>
|
||||
</template>
|
||||
@ -21,7 +21,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.margin {
|
||||
.padding {
|
||||
padding-bottom: 6rem;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<NcAppNavigation :class="episode ? 'margin' : ''">
|
||||
<NcAppNavigation :class="episode ? 'padding' : ''">
|
||||
<slot />
|
||||
<template #list>
|
||||
<slot name="list" />
|
||||
@ -27,7 +27,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.margin {
|
||||
.padding {
|
||||
padding-bottom: 6rem;
|
||||
}
|
||||
</style>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<h2>{{ title }}</h2>
|
||||
<Loading v-if="loading" />
|
||||
<ul v-if="!loading">
|
||||
<li v-for="top in items" :key="top.link">
|
||||
<li v-for="top in tops" :key="top.link">
|
||||
<router-link :to="toUrl(top.link)">
|
||||
<img :src="top.imageUrl" :title="top.author">
|
||||
</router-link>
|
||||
@ -32,8 +32,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
items: [],
|
||||
loading: true,
|
||||
tops: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -49,15 +49,10 @@ export default {
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
toUrl,
|
||||
async loadList() {
|
||||
try {
|
||||
this.loading = true
|
||||
const toplist = await axios.get(generateUrl(`/apps/repod/toplist/${this.type}`))
|
||||
this.items = toplist.data
|
||||
const tops = await axios.get(generateUrl(`/apps/repod/tops/${this.type}`))
|
||||
this.tops = tops.data
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
showError(t('repod', 'Could not fetch tops'))
|
||||
@ -65,6 +60,8 @@ export default {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toUrl,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user