"use strict" import Time from './../../common/Time.js' export default { name: 'game-teaser', props: { game: Object, }, template: `
`, computed: { style() { const url = this.game.imageUrl.replace('uploads/', 'uploads/r/') + '-375x210.webp' return { 'background-image': `url("${url}")`, } }, }, methods: { time(start, end) { const icon = end ? '🏁' : '⏳' const from = start; const to = end || Time.timestamp() const timeDiffStr = Time.timeDiffStr(from, to) return `${icon} ${timeDiffStr}` }, }, }