Actually shorten list of contributors
This commit is contained in:
parent
806a91c6fa
commit
1900140dd5
1 changed files with 15 additions and 10 deletions
|
@ -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
|
||||
*/
|
||||
|
@ -67,19 +68,23 @@ export default class AttributionPanel extends Combine {
|
|||
this.SetStyle("max-width: calc(100vw - 5em); width: 40em;")
|
||||
}
|
||||
|
||||
private static CodeContributors() : UIElement{
|
||||
private static CodeContributors(): UIElement {
|
||||
|
||||
const total = contributors.contributors.length;
|
||||
const filtered = contributors.contributors
|
||||
.splice(10, total - 10)
|
||||
.map(c => c.contributor)
|
||||
.join(", ")
|
||||
|
||||
|
||||
return Translations.t.general.attribution.codeContributionsBy.Subs({contributors: filtered, hiddenCount: total - 10});
|
||||
let filtered = contributors.contributors
|
||||
.splice(10, total - 10);
|
||||
|
||||
let contribsStr = filtered.map(c => c.contributor)
|
||||
.join(", ")
|
||||
|
||||
|
||||
return Translations.t.general.attribution.codeContributionsBy.Subs({
|
||||
contributors: contribsStr,
|
||||
hiddenCount: total - 10
|
||||
});
|
||||
}
|
||||
|
||||
private static IconAttribution(iconPath: string) : UIElement{
|
||||
|
||||
private static IconAttribution(iconPath: string): UIElement {
|
||||
if (iconPath.startsWith("http")) {
|
||||
iconPath = "." + new URL(iconPath).pathname;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue