UNPKG

@yuebai008/cli

Version:

Command line interface for rapid qg-minigame development

1 lines 772 B
import*as i18n from"../../core/i18n/i18n.js";import{AffectedResourcesView}from"./AffectedResourcesView.js";const UIStrings={nElements:"{n, plural, =1 {# element} other {# elements}}"},str_=i18n.i18n.registerUIStrings("panels/issues/AffectedElementsView.ts",UIStrings),i18nString=i18n.i18n.getLocalizedString.bind(void 0,str_);export class AffectedElementsView extends AffectedResourcesView{async#e(e){let t=0;for(const s of e)await this.#t(s),t++;this.updateAffectedResourceCount(t)}getResourceNameWithCount(e){return i18nString(UIStrings.nElements,{n:e})}async#t(e){const t=await this.createElementCell(e,this.issue.getCategory()),s=document.createElement("tr");s.appendChild(t),this.affectedResources.appendChild(s)}update(){this.clear(),this.#e(this.issue.elements())}}