From e2791c9de3e0bc9776c2e41e4eacba83d6751edc Mon Sep 17 00:00:00 2001 From: Ricardo Mendes Date: Fri, 8 Nov 2024 00:56:46 +0000 Subject: [PATCH] repeat large image for decklist images view We're already loading the large image for the topmost one, might as well not load the other sizes for the copies underneath. --- app/components/decklist/images.gjs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/app/components/decklist/images.gjs b/app/components/decklist/images.gjs index f745646..24d2e17 100644 --- a/app/components/decklist/images.gjs +++ b/app/components/decklist/images.gjs @@ -3,6 +3,7 @@ import CardLinkTo from '../card/link-to'; import Icon from '../icon'; import { get } from '@ember/helper'; import gt from 'ember-truth-helpers/helpers/gt'; +import { Range } from 'netrunnerdb/helpers/range'; export default class DecklistImages extends Component { cardsByType = (cardType) => { @@ -33,22 +34,12 @@ export default class DecklistImages extends Component {
- {{card.title}} - {{#if (gt (get @decklist.cardSlots card.id) 1)}} + {{#each (Range (get @decklist.cardSlots card.id))}} {{card.title}} - {{/if}} - {{#if (gt (get @decklist.cardSlots card.id) 2)}} - {{card.title}} - {{/if}} + {{/each}}