Lint/prettify

This commit is contained in:
dragongoose
2023-08-18 13:39:26 -04:00
parent f87b235abe
commit 06b77d686c
13 changed files with 177 additions and 149 deletions

View File

@ -25,7 +25,10 @@ export default {
methods: {
filterSearches(toFilter: string) {
const categories = this.$refs.categoryItem
const wantedTags: string[] = toFilter.toLowerCase().split(',').filter((v) => v.toLowerCase())
const wantedTags: string[] = toFilter
.toLowerCase()
.split(',')
.filter((v) => v.toLowerCase())
for (let category of categories as any) {
let tagElements = category.getElementsByTagName('span')
@ -49,18 +52,18 @@ export default {
}
},
async getNextCategory() {
let bottomOfWindow =
document.documentElement.scrollTop + window.innerHeight ===
document.documentElement.offsetHeight
if (bottomOfWindow && this.data) {
const cursor = this.data[this.data.length - 1].cursor
if (!cursor) return
const res = await getEndpoint('api/discover?cursor=' + cursor)
let bottomOfWindow =
document.documentElement.scrollTop + window.innerHeight ===
document.documentElement.offsetHeight
if (bottomOfWindow && this.data) {
const cursor = this.data[this.data.length - 1].cursor
if (!cursor) return
const res = await getEndpoint('api/discover?cursor=' + cursor)
for (let category of res) {
this.data.push(category)
}
for (let category of res) {
this.data.push(category)
}
}
}
},
async mounted() {
@ -142,6 +145,5 @@ export default {
<category-preview :category-data="category"></category-preview>
</li>
</ul>
</div>
</template>