-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(match2): standardize BR game details
- Loading branch information
Showing
9 changed files
with
49 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
components/widget/match/summary/ffa/widget_match_summary_ffa_game_details.lua.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
-- @Liquipedia | ||
-- wiki=commons | ||
-- page=Module:Widget/Match/Summary/Ffa/GameDetails | ||
-- | ||
-- Please see https://github.com/Liquipedia/Lua-Modules to contribute | ||
-- | ||
|
||
local Class = require('Module:Class') | ||
local Lua = require('Module:Lua') | ||
local Page = require('Module:Page') | ||
|
||
local Widget = Lua.import('Module:Widget') | ||
local HtmlWidgets = Lua.import('Module:Widget/Html/All') | ||
local ContentItemContainer = Lua.import('Module:Widget/Match/Summary/Ffa/ContentItemContainer') | ||
local IconWidget = Lua.import('Module:Widget/Image/Icon/Fontawesome') | ||
local CountdownIcon = Lua.import('Module:Widget/Match/Summary/Ffa/CountdownIcon') | ||
local GameCountdown = Lua.import('Module:Widget/Match/Summary/Ffa/GameCountdown') | ||
|
||
---@class MatchSummaryFfaGameDetails: Widget | ||
---@operator call(table): MatchSummaryFfaGameDetails | ||
local MatchSummaryFfaGameDetails = Class.new(Widget) | ||
|
||
---@return Widget | ||
function MatchSummaryFfaGameDetails:render() | ||
local game = self.props.game | ||
assert(game, 'No game provided') | ||
|
||
return ContentItemContainer{contentClass = 'panel-content__game-schedule', items = { | ||
{ | ||
icon = CountdownIcon{game = game}, | ||
content = GameCountdown{game = game}, | ||
}, | ||
game.map and { | ||
icon = IconWidget{iconName = 'map'}, | ||
content = HtmlWidgets.Span{children = Page.makeInternalLink(game.map)}, | ||
} or nil, | ||
}} | ||
end | ||
|
||
return MatchSummaryFfaGameDetails |