Closed mfreeman451 closed 2 years ago
I didn't understood! How are you getting the images on the web for those?
ohk got it! Though some of the images are not labelled properly so need to figure out proper way to get right images for networks in the app.
Which one of them is the latest one? I think we'll be using the networks one, right? Also how are you constructing the image url on the web? I had a look at the docs for networks and most of the networks don't have data that matches directly with the asset/image names stored. Are you using any reg-ex there?
data: () => ({
avatar_urls: {
'foxla.com': '/networks/foxla.jpg',
'losangeles.cbslocal.com': '/networks/cbsla.jpg',
'nbclosangeles.com': '/networks/nbclosangeles.jpg',
'abc7.com': '/networks/abc7.jpg',
'ktla.com': '/networks/ktla.jpg',
'broadcastify.com': '/networks/broadcastify.jpg',
'audio12.broadcastify.com': '/networks/broadcastify.jpg',
'facebook.com': '/networks/facebook.jpg',
'm.facebook.com': '/networks/facebook.jpg',
'wsvn.com': '/networks/wsvn.jpg',
'twitter.com': '/networks/twitter.svg',
'nbcmiami.com': '/networks/nbc6.jpg',
'iheart.com': '/networks/iheart.jpg',
'kdoc.tv': '/networks/kdoc.jpg',
'youtube.com': '/networks/youtube.jpg',
'youtu.be': '/networks/youtube.jpg',
'pscp.tv': '/networks/periscope.png',
'fox10phoenix.com': '/networks/fox10.png',
'kfor.com': '/networks/kfor.jpg',
'kctv5.com': '/networks/kctv5.jpg',
'fox4news.com': '/networks/fox4.jpg',
'nbcdfw.com': '/networks/nbcdfw.jpg',
'khou.com': '/networks/khou.jpg',
'wesh.com': '/networks/wesh.jpg',
'cbs8.com': '/networks/cbs8.png',
'abc13.com': '/networks/abc13.png',
'wsoctv.com': '/networks/wsoc.png',
'news9.com': '/networks/news9.jpg',
},
}),
methods: {
checkAvatars (toCheck) {
try {
return this.avatar_urls[new URL(toCheck).hostname.replace('www.', '')]
} catch {
return this.avatar_urls[toCheck]
}
},
Any suggestions on better ways to share common data structures like this between applications?
Any suggestions on better ways to share common data structures like this between applications?
Will think on that!
Updated in PR #172 for dev.
We need to grab the images that we're using in the web repo for the network and media folks and bring it into the flutter code base. In the web this should be converted into a sprite css, I'm not sure what the best way to do this in flutter is.