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