From b63cba4a5ba57a683d9c5eba23c1b9f3c73d91d8 Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Tue, 14 Apr 2026 10:36:59 +0900 Subject: [PATCH] always show match button --- lua/wikis/commons/Match/Util.lua | 12 ------------ lua/wikis/commons/Widget/Match/PageButton.lua | 5 +---- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/lua/wikis/commons/Match/Util.lua b/lua/wikis/commons/Match/Util.lua index fa3b231ad36..a141faf06bd 100644 --- a/lua/wikis/commons/Match/Util.lua +++ b/lua/wikis/commons/Match/Util.lua @@ -49,18 +49,6 @@ function MatchUtil.shouldShowStreams(match) return isWithinDisplayThreshold(match.timestamp) end ----@param match MatchGroupUtilMatch ----@return boolean -function MatchUtil.shouldShowMatchDetails(match) - if match.phase == 'finished' or match.phase == 'ongoing' then - return true - elseif not match.timestamp then - return false - end - - return isWithinDisplayThreshold(match.timestamp) -end - ---@param match MatchGroupUtilMatch ---@return boolean function MatchUtil.isMatchCloseToStart(match) diff --git a/lua/wikis/commons/Widget/Match/PageButton.lua b/lua/wikis/commons/Widget/Match/PageButton.lua index a85781134da..eaa37db1c8c 100644 --- a/lua/wikis/commons/Widget/Match/PageButton.lua +++ b/lua/wikis/commons/Widget/Match/PageButton.lua @@ -10,7 +10,6 @@ local Lua = require('Module:Lua') local I18n = Lua.import('Module:I18n') local Info = Lua.import('Module:Info', {loadData = true}) local Logic = Lua.import('Module:Logic') -local MatchUtil = Lua.import('Module:Match/Util') local Component = Lua.import('Module:Widget/Component') local Button = Lua.import('Module:Widget/Basic/Button') @@ -38,8 +37,6 @@ local function MatchPageButton(props) return nil end - local showMatchDetails = MatchUtil.shouldShowMatchDetails(match) - -- Original Match Id must be used to link match page if it exists. -- It can be different from the matchId when shortened brackets are used. local matchId = match.extradata.originalmatchid or match.matchId @@ -48,7 +45,7 @@ local function MatchPageButton(props) if Logic.isNotEmpty(match.bracketData.matchPage) then return Button{ - classes = { 'match-page-button', (not showMatchDetails) and 'show-when-logged-in' or nil}, + classes = {'match-page-button'}, title = 'View match details', variant = props.buttonType, size = 'sm',