From 333a7d93b2b8dafeefb3cc20760e2608daf749fe Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sat, 24 Oct 2020 15:43:40 +0200 Subject: [PATCH] add top 100 stations blurhashes --- src/components/Main.vue | 10 ++++++++++ src/components/Table.vue | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/Main.vue b/src/components/Main.vue index 9c10e15..011e277 100644 --- a/src/components/Main.vue +++ b/src/components/Main.vue @@ -51,6 +51,7 @@ export default { tableData: [], offset: 0, pageLoading: false, + blurHashes: require('../assets/blurHashes.json'), }), provide: { player: { @@ -163,6 +164,15 @@ export default { }) .done(function(data) { 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.offset += 20 }) diff --git a/src/components/Table.vue b/src/components/Table.vue index 47ae330..a590064 100644 --- a/src/components/Table.vue +++ b/src/components/Table.vue @@ -19,7 +19,7 @@ class="stationIcon" width="32" height="32" - hash="LdHfL}oJR$WBKnfi%3ofT0kCM{ay" + :hash="station.blurHash" :src="station.favicon">