Actually shorten list of contributors

This commit is contained in:
Pieter Vander Vennet 2021-05-19 23:29:23 +02:00
parent 806a91c6fa
commit 1900140dd5

View file

@ -12,6 +12,7 @@ import Link from "../Base/Link";
import {VariableUiElement} from "../Base/VariableUIElement"; import {VariableUiElement} from "../Base/VariableUIElement";
import {UIElement} from "../UIElement"; import {UIElement} from "../UIElement";
import * as contributors from "../../assets/contributors.json" import * as contributors from "../../assets/contributors.json"
/** /**
* The attribution panel shown on mobile * The attribution panel shown on mobile
*/ */
@ -70,13 +71,17 @@ export default class AttributionPanel extends Combine {
private static CodeContributors(): UIElement { private static CodeContributors(): UIElement {
const total = contributors.contributors.length; const total = contributors.contributors.length;
const filtered = contributors.contributors let filtered = contributors.contributors
.splice(10, total - 10) .splice(10, total - 10);
.map(c => c.contributor)
let contribsStr = filtered.map(c => c.contributor)
.join(", ") .join(", ")
return Translations.t.general.attribution.codeContributionsBy.Subs({contributors: filtered, hiddenCount: total - 10}); return Translations.t.general.attribution.codeContributionsBy.Subs({
contributors: contribsStr,
hiddenCount: total - 10
});
} }
private static IconAttribution(iconPath: string): UIElement { private static IconAttribution(iconPath: string): UIElement {