토너먼트와 베팅장 하이라이트하기. (모바일에서 dropdown-item에서는 아직 적용 못함)

This commit is contained in:
2022-03-16 12:09:29 -07:00
parent f0e4f51c50
commit 596fa9ccc8
4 changed files with 31 additions and 16 deletions
+16
View File
@@ -167,6 +167,20 @@ function commandButton(array $opts = [])
$templates = new \League\Plates\Engine(__DIR__ . '/templates');
$showSecret = false;
$permission = checkSecretPermission($me);
$btnClassForTournament = $opts['btnClass'];
if ($opts['isTournamentActive']) {
if ($btnClassForTournament != 'dropdown-item') {
$btnClassForTournament = 'toolbarButton2';
}
}
$btnClassForBetting = $opts['btnClass'];
if ($opts['isBettingActive']) {
if ($btnClassForTournament != 'dropdown-item') {
$btnClassForBetting = 'toolbarButton2';
}
}
if ($permission >= 1) {
$showSecret = true;
} else if ($me['officer_level'] == 0) {
@@ -180,6 +194,8 @@ function commandButton(array $opts = [])
'nationLevel' => $nation['level'],
'showSecret' => $showSecret,
'permission' => $permission,
'btnClassForTournament' => $btnClassForTournament,
'btnClassForBetting' => $btnClassForBetting,
], $opts));
}