Actually shorten list of contributors

This commit is contained in:
pietervdvn 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 {UIElement} from "../UIElement";
import * as contributors from "../../assets/contributors.json"
/**
* The attribution panel shown on mobile
*/
@ -70,13 +71,17 @@ export default class AttributionPanel extends Combine {
private static CodeContributors(): UIElement {
const total = contributors.contributors.length;
const filtered = contributors.contributors
.splice(10, total - 10)
.map(c => c.contributor)
let filtered = contributors.contributors
.splice(10, total - 10);
let contribsStr = filtered.map(c => c.contributor)
.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 {