mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update DiscoverComponent
This commit is contained in:
parent
5446593623
commit
f9362d43a9
1 changed files with 7 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<section class="d-none d-md-flex mb-md-2 pt-2 discover-bar" style="width:auto; overflow: auto hidden;" v-if="categories.length > 0">
|
<section class="d-none d-md-flex mb-md-2 pt-2 discover-bar" style="width:auto; overflow: auto hidden;" v-if="categories.length > 0">
|
||||||
<a class="text-decoration-none bg-transparent border border-success rounded d-inline-flex align-items-center justify-content-center mr-3 card-disc" href="/discover/loops">
|
<a v-if="config.ab.loops == true" class="text-decoration-none bg-transparent border border-success rounded d-inline-flex align-items-center justify-content-center mr-3 card-disc" href="/discover/loops">
|
||||||
<p class="text-success lead font-weight-bold mb-0">Loops</p>
|
<p class="text-success lead font-weight-bold mb-0">Loops</p>
|
||||||
</a>
|
</a>
|
||||||
<!-- <a class="text-decoration-none rounded d-inline-flex align-items-center justify-content-center mr-3 box-shadow card-disc" href="/discover/personal" style="background: rgb(255, 95, 109);">
|
<!-- <a class="text-decoration-none rounded d-inline-flex align-items-center justify-content-center mr-3 box-shadow card-disc" href="/discover/personal" style="background: rgb(255, 95, 109);">
|
||||||
|
@ -52,6 +52,7 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
config: {},
|
||||||
posts: {},
|
posts: {},
|
||||||
trending: {},
|
trending: {},
|
||||||
categories: {},
|
categories: {},
|
||||||
|
@ -80,6 +81,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
fetchData() {
|
fetchData() {
|
||||||
|
axios.get('/api/v2/config')
|
||||||
|
.then((res) => {
|
||||||
|
let data = res.data;
|
||||||
|
this.config = data;
|
||||||
|
});
|
||||||
axios.get('/api/v2/discover/posts')
|
axios.get('/api/v2/discover/posts')
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
let data = res.data;
|
let data = res.data;
|
||||||
|
|
Loading…
Reference in a new issue