Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion lua/wikis/commons/OpponentDisplay.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
-- @Liquipedia
-- page=Module:OpponentDisplay
Expand Down Expand Up @@ -196,6 +196,8 @@
---@field showFaction boolean?
---@field showTbd boolean?
---@field additionalClasses string[]?
---@field image string?
---@field imagedark string?

--[[
Displays an opponent as a block element. The width of the component is
Expand All @@ -221,6 +223,8 @@
template = opponent.template or 'tbd',
additionalClasses = props.additionalClasses,
note = props.note,
image = props.image,
imagedark = props.imagedark,
})
elseif opponent.type == Opponent.literal then
return OpponentDisplay.BlockLiteral({
Expand Down Expand Up @@ -277,7 +281,8 @@
its layout context, and not of the team name. The team is specified by template.
]]
---@param props {flip: boolean?, overflow: OverflowModes?, showLink: boolean?,
---style: teamStyle?, template: string, additionalClasses: string[]?, note: string|number?}
---style: teamStyle?, template: string, additionalClasses: string[]?, note: string|number?,
---image: string?, imagedark: string?}
---@return Widget
function OpponentDisplay.BlockTeamContainer(props)
local style = props.style or 'standard'
Expand All @@ -290,6 +295,8 @@
noLink = not props.showLink,
additionalClasses = props.additionalClasses,
note = props.note,
image = props.image,
imagedark = props.imagedark,
}
end

Expand Down
5 changes: 4 additions & 1 deletion lua/wikis/commons/TeamParticipants/Parse/Wiki.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
-- @Liquipedia
-- page=Module:TeamParticipants/Parse/Wiki
Expand All @@ -21,7 +21,8 @@

local TeamParticipantsWikiParser = {}

---@alias TeamParticipant {opponent: standardOpponent, notes: {text: string, highlighted: boolean}[], aliases: string[],
---@alias TeamParticipant {opponent: standardOpponent, image: string?, imagedark: string?,
---notes: {text: string, highlighted: boolean}[], aliases: string[],
---qualification: QualificationStructure?, shouldImportFromDb: boolean, date: integer,
---potentialQualifiers: standardOpponent[]?, warnings: string[]?}

Expand Down Expand Up @@ -176,6 +177,8 @@

return {
opponent = opponent,
image = input.image,
imagedark = input.imagedark,
qualification = qualification,
aliases = Array.flatMap(aliases, function(alias)
return TeamTemplate.queryHistoricalNames(alias)
Expand Down
4 changes: 4 additions & 0 deletions lua/wikis/commons/Widget/Participants/Team/Header.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
-- @Liquipedia
-- page=Module:Widget/Participants/Team/Header
Expand Down Expand Up @@ -61,6 +61,8 @@
opponent = participant.opponent,
teamStyle = 'bracket',
additionalClasses = opponentClasses,
image = participant.image,
imagedark = participant.imagedark,
}
}
},
Expand All @@ -71,6 +73,8 @@
opponent = participant.opponent,
teamStyle = 'standard',
additionalClasses = opponentClasses,
image = participant.image,
imagedark = participant.imagedark,
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions lua/wikis/commons/Widget/TeamDisplay/Block.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
-- @Liquipedia
-- page=Module:Widget/TeamDisplay/Block
Expand Down Expand Up @@ -30,6 +30,8 @@
---@field style teamStyle
---@field dq boolean?
---@field note string|number?
---@field image string?
---@field imagedark string?

---@class BlockTeamWidget: Widget
---@operator call(BlockTeamParameters): BlockTeamWidget
Expand Down Expand Up @@ -61,8 +63,8 @@
end
local flip = self.flip

local imageLight = Logic.emptyOr(teamTemplate.image, teamTemplate.legacyimage)
local imageDark = Logic.emptyOr(teamTemplate.imagedark, teamTemplate.legacyimagedark)
local imageLight = Logic.emptyOr(self.props.image, teamTemplate.image, teamTemplate.legacyimage)
local imageDark = Logic.emptyOr(self.props.imagedark, teamTemplate.imagedark, teamTemplate.legacyimagedark)

return Div{
classes = Array.extend('block-team', self.props.additionalClasses, flip and 'flipped' or nil),
Expand Down
Loading