统一聊天室游戏通知胶囊样式

This commit is contained in:
pllx
2026-04-29 14:35:52 +08:00
parent 092b51cd95
commit 3672140987
2 changed files with 318 additions and 45 deletions
+10 -8
View File
@@ -140,9 +140,9 @@ function buildIdiomAnswerButton(roundId, hint, rewardGold, rewardExp, typeLabel,
btn.dataset.quizEnded = "0";
btn.textContent = "🎯 立即答题";
btn.style.cssText =
"padding:4px 12px;background:linear-gradient(135deg,#7c3aed,#a78bfa);" +
"color:#fff;border:none;border-radius:999px;font-size:11px;cursor:pointer;" +
"font-weight:700;line-height:1.2;vertical-align:middle;box-shadow:0 4px 10px rgba(124,58,237,.18);";
"display:inline-flex;align-items:center;gap:4px;padding:2px 9px;background:linear-gradient(135deg,#7c3aed,#a78bfa);" +
"color:#fff;border:1px solid #7c3aed;border-radius:999px;font-size:11px;cursor:pointer;" +
"font-weight:700;line-height:1;vertical-align:middle;box-shadow:0 2px 6px rgba(124,58,237,.14);";
return btn;
}
@@ -211,12 +211,13 @@ export function disableIdiomAnswerButtons(roundId = 0, endedText = "本回合已
button.dataset.quizEnded = "1";
button.style.background = "linear-gradient(135deg,#94a3b8,#cbd5e1)";
button.style.color = "#f8fafc";
button.style.border = "1px solid #94a3b8";
button.style.cursor = "not-allowed";
button.style.boxShadow = "none";
button.style.opacity = ".92";
button.style.padding = "4px 12px";
button.style.padding = "2px 9px";
button.style.fontSize = "11px";
button.style.lineHeight = "1.2";
button.style.lineHeight = "1";
button.title = endedText;
button.textContent = "已结束";
syncQuizWinnerLabel(button, winnerUsername);
@@ -236,12 +237,13 @@ function syncQuizAnswerButtons(activeRoundIds) {
button.dataset.quizEnded = "0";
button.style.background = "linear-gradient(135deg,#7c3aed,#a78bfa)";
button.style.color = "#fff";
button.style.border = "1px solid #7c3aed";
button.style.cursor = "pointer";
button.style.boxShadow = "0 4px 10px rgba(124,58,237,.18)";
button.style.boxShadow = "0 2px 6px rgba(124,58,237,.14)";
button.style.opacity = "1";
button.style.padding = "4px 12px";
button.style.padding = "2px 9px";
button.style.fontSize = "11px";
button.style.lineHeight = "1.2";
button.style.lineHeight = "1";
button.title = "";
button.textContent = "🎯 立即答题";
syncQuizWinnerLabel(button, "");