add top 100 stations blurhashes

This commit is contained in:
Jonas Heinrich 2020-10-24 15:43:40 +02:00
parent 26d494a696
commit 333a7d93b2
2 changed files with 11 additions and 1 deletions

View File

@ -51,6 +51,7 @@ export default {
tableData: [], tableData: [],
offset: 0, offset: 0,
pageLoading: false, pageLoading: false,
blurHashes: require('../assets/blurHashes.json'),
}), }),
provide: { provide: {
player: { player: {
@ -163,6 +164,15 @@ export default {
}) })
.done(function(data) { .done(function(data) {
vm.pageLoading = false vm.pageLoading = false
for (let i = 0; i < data.length; i++) {
const obj = data[i]
let blurHash = vm.blurHashes[obj.stationuuid]
if (!blurHash) {
blurHash = 'L1TSUA?bj[?b~qfQfQj[ayfQfQfQ'
}
data[i].blurHash = blurHash
}
console.log(data)
vm.tableData = vm.tableData.concat(data) vm.tableData = vm.tableData.concat(data)
vm.offset += 20 vm.offset += 20
}) })

View File

@ -19,7 +19,7 @@
class="stationIcon" class="stationIcon"
width="32" width="32"
height="32" height="32"
hash="LdHfL}oJR$WBKnfi%3ofT0kCM{ay" :hash="station.blurHash"
:src="station.favicon"> :src="station.favicon">
<span :class="{ 'icon-starred': stationsFavored.includes(idx) }" /> <span :class="{ 'icon-starred': stationsFavored.includes(idx) }" />
</blur-hash-image> </blur-hash-image>