Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Rathoz committed Jan 17, 2025
1 parent 62e0d56 commit 897102d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/widget/standings/widget_standings_ffa.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ function StandingsFfaWidget:render()
local standings = self.props.standings
local roundCount = #standings.rounds

local hasRoundSelector = roundCount > 1

return DataTable{
wrapperClasses = {'toggle-area', 'toggle-area-' .. roundCount},
classes = {'wikitable-bordered', 'wikitable-striped'},
Expand All @@ -50,15 +52,15 @@ function StandingsFfaWidget:render()
children = {
HtmlWidgets.Span{
css = {
['margin-left'] = '-70px',
['vertical-align'] = 'middle',
['margin-left'] = hasRoundSelector and '-70px' or nil,
},
children = standings.section
},
RoundSelector{
hasRoundSelector and RoundSelector{
rounds = roundCount,
hasEnded = standings.rounds[#standings.rounds].finished,
},
} or nil,
},
}},
-- Column Header
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function RoundSelectorWidget:render()
return Button{
children = roundTitle,
variant = 'primary',
size = 'sm',
classes = {'toggle-area-button'},
attributes = {['data-toggle-area-btn'] = roundIndex},
}
Expand All @@ -57,6 +58,7 @@ function RoundSelectorWidget:render()
Button{
children = finalRoundTitle(),
variant = 'primary',
size = 'sm',
classes = {'dropdown-box-button'},
},
HtmlWidgets.Div{
Expand Down

0 comments on commit 897102d

Please sign in to comment.