Skip to content

Commit

Permalink
Merge pull request #35 from FlowingSPDG/master
Browse files Browse the repository at this point in the history
fixed flag view at /mymatches
  • Loading branch information
Shugo Kawamura authored Dec 27, 2019
2 parents 913dc93 + 70181da commit e608565
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions web/src/components/MyMatches.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
<td v-if="match"><a :href="'/match/'+match.id">{{match.id}}</a></td>

<td v-if="matchinfo[match.id]">
{{matchinfo[match.id].team1.flag}}
<img :src="get_flag_link(matchinfo[match.id].team1)" />
<router-link :to="'/team/'+match.team1_id">{{matchinfo[match.id].team1.name}}</router-link>
</td>

<td v-if="matchinfo[match.id]">
{{matchinfo[match.id].team2.flag}}
<img :src="get_flag_link(matchinfo[match.id].team2)" />
<router-link :to="'/team/'+match.team2_id">{{matchinfo[match.id].team2.name}}</router-link>
</td>

Expand Down Expand Up @@ -130,6 +130,13 @@ export default {
console.log(res.data)
resolve(res.data)
})
},
get_flag_link: function (team) {
if (team.flag === '') {
return `/static/img/_unknown.png`
}
// return `<img src="/static/img/valve_flags/${team.flag}" width="24" height="16">`
return `/static/img/valve_flags/${team.flag}.png`
}
}
}
Expand Down

0 comments on commit e608565

Please sign in to comment.