Skip to content

Commit

Permalink
complete RelayTour.Info.website rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Sep 24, 2024
1 parent 658993b commit 42d4ff7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions modules/relay/src/main/RelayTourForm.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ final class RelayTourForm(langList: lila.core.i18n.LangList):
private val fideTcMapping: Mapping[FideTC] = typeIn[FideTC](FideTC.values.toSet)

private val infoMapping = mapping(
"format" -> optional(cleanText(maxLength = 80)),
"tc" -> optional(cleanText(maxLength = 80)),
"fideTc" -> optional(fideTcMapping),
"location" -> optional(cleanText(maxLength = 80)),
"players" -> optional(cleanText(maxLength = 120)),
"websiteOfficial" -> optional(url.field),
"standings" -> optional(url.field)
"format" -> optional(cleanText(maxLength = 80)),
"tc" -> optional(cleanText(maxLength = 80)),
"fideTc" -> optional(fideTcMapping),
"location" -> optional(cleanText(maxLength = 80)),
"players" -> optional(cleanText(maxLength = 120)),
"website" -> optional(url.field),
"standings" -> optional(url.field)
)(RelayTour.Info.apply)(unapply)

private val pinnedStreamMapping = mapping(
Expand Down
2 changes: 1 addition & 1 deletion modules/relay/src/main/ui/FormUi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ final class FormUi(helpers: Helpers, ui: RelayUi, tourUi: RelayTourUi):
)(form3.input(_)),
form3.split(
form3.group(
form("info.websiteOfficial"),
form("info.website"),
"Official Website",
help = frag("External website URL").some,
half = true
Expand Down
2 changes: 1 addition & 1 deletion ui/analyse/src/study/relay/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export interface RelayTourInfo {
fideTc?: string;
location?: string;
players?: string;
websiteOfficial?: string;
website?: string;
standings?: string;
}

Expand Down
4 changes: 2 additions & 2 deletions ui/analyse/src/study/relay/relayTourView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ const showInfo = (i: RelayTourInfo, dates?: RelayTourDates) => {
)
.filter(defined);

i.websiteOfficial &&
contents.push(h('div.relay-tour__info__websiteOfficial', [h('img', { attrs: { src: site.asset.flairSrc('objects.link') } }), h('a', { attrs: { href: i.websiteOfficial, target: '_blank' } }, 'Official Website')]));
i.website &&
contents.push(h('div.relay-tour__info__website', [h('img', { attrs: { src: site.asset.flairSrc('objects.link') } }), h('a', { attrs: { href: i.website, target: '_blank' } }, 'Official Website')]));

i.standings &&
contents.push(h('div.relay-tour__info__standings', [h('img', { attrs: { src: site.asset.flairSrc('activity.sports-medal') } }), h('a', { attrs: { href: i.standings, target: '_blank' } }, 'Standings')]));
Expand Down

0 comments on commit 42d4ff7

Please sign in to comment.