From c01f022edeff020f7401fea559f7c55b896d1380 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Wed, 31 Jan 2018 18:25:41 +0200 Subject: [PATCH] Fix props passing for now --- client/src/ui/components/bd/BdBadge.vue | 6 +++--- client/src/ui/profilebadges.js | 28 +++++++++++++------------ 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/client/src/ui/components/bd/BdBadge.vue b/client/src/ui/components/bd/BdBadge.vue index c151627d..83ae045d 100644 --- a/client/src/ui/components/bd/BdBadge.vue +++ b/client/src/ui/components/bd/BdBadge.vue @@ -11,9 +11,9 @@ diff --git a/client/src/ui/profilebadges.js b/client/src/ui/profilebadges.js index 948fe15a..0aa9bf74 100644 --- a/client/src/ui/profilebadges.js +++ b/client/src/ui/profilebadges.js @@ -29,8 +29,8 @@ export default class { } static inject(userid) { - const contributor = this.contributors.find(c => c.id == userid); - if (!contributor) return; + const c = this.contributors.find(c => c.id === userid); + if (!c) return; setTimeout(() => { let hasBadges = false; @@ -41,13 +41,15 @@ export default class { root = document.querySelector('[class*="headerInfo"]'); } + const { developer, contributor, webdev } = c; + VueInjector.inject( root, DOM.createElement('div', null, 'bdprofilebadges'), { BdBadge }, - `` + `` ); - }, 200); + }, 400); } static filter(mutation) { @@ -56,15 +58,15 @@ export default class { static get contributors() { return [ - { 'id': 81388395867156480, 'webdev': true, 'developer': true, 'contributor': true }, // Jiiks - { 'id': 98003542823944192, 'webdev': false, 'developer': true, 'contributor': true }, // Pohky - { 'id': 138850472541814784, 'webdev': true, 'developer': false, 'contributor': true }, // Hammock - { 'id': 249746236008169473, 'webdev': false, 'developer': true, 'contributor': true }, // Zerebos - { 'id': 125367412370440192, 'webdev': false, 'developer': true, 'contributor': true }, // Pierce - { 'id': 284056145272766465, 'webdev': false, 'developer': false, 'contributor': true }, // Samuel Elliott - { 'id': 184021060562321419, 'webdev': false, 'developer': false, 'contributor': true }, // Lilian Tedone - { 'id': 76052829285916672, 'webdev': false, 'developer': false, 'contributor': true }, // samfun123 - { 'id': 171005991272316937, 'webdev': false, 'developer': false, 'contributor': true }, // samogot + { 'id': '81388395867156480', 'webdev': true, 'developer': true, 'contributor': true }, // Jiiks + { 'id': '98003542823944192', 'webdev': false, 'developer': true, 'contributor': true }, // Pohky + { 'id': '138850472541814784', 'webdev': true, 'developer': false, 'contributor': true }, // Hammock + { 'id': '249746236008169473', 'webdev': false, 'developer': true, 'contributor': true }, // Zerebos + { 'id': '125367412370440192', 'webdev': false, 'developer': true, 'contributor': true }, // Pierce + { 'id': '284056145272766465', 'webdev': false, 'developer': false, 'contributor': true }, // Samuel Elliott + { 'id': '184021060562321419', 'webdev': false, 'developer': false, 'contributor': true }, // Lilian Tedone + { 'id': '76052829285916672', 'webdev': false, 'developer': false, 'contributor': true }, // samfun123 + { 'id': '171005991272316937', 'webdev': false, 'developer': false, 'contributor': true }, // samogot ]; }