diff --git a/common/locales/ar.json b/common/locales/ar.json index bb05265..904e4d9 100644 --- a/common/locales/ar.json +++ b/common/locales/ar.json @@ -4,7 +4,7 @@ "diceMatch.match": "مطابقة", "diceMatch.matching": "جارٍ البحث...", "diceMatch.winnerReceives": "الفائز يحصل على", - "diceMatch.feeNote": "يدفع اللاعب الفائز رسوم معاملة 5%", + "diceMatch.feeNote": "", "diceMatch.unknownOpponent": "?", "diceMatch.win": "فوز", "diceMatch.coins": "عملات", @@ -18,7 +18,7 @@ "diceMatch.apiUnavailable": "واجهة لعبة النرد غير متاحة", "diceMatch.selectStake": "اختر قيمة الرهان", "diceMatch.requestFailed": "فشل الطلب", - "diceMatch.configFeeNote": "الرسوم {fee}%", + "diceMatch.configFeeNote": "Tickets {fee}%", "rockGame.pageTitle": "حجر ورقة مقص", "rockGame.pageLabel": "لعبة حجر ورقة مقص", "rockGame.start": "ابدأ", @@ -38,7 +38,7 @@ "rockGame.playAgain": "العب مرة أخرى", "rockGame.changeLanguage": "تغيير اللغة", "rockGame.selectStake": "اختر قيمة الرهان", - "rockGame.configFeeNote": "الرسوم {fee}%", + "rockGame.configFeeNote": "Tickets {fee}%", "rockGame.apiUnavailable": "واجهة RPS غير متاحة", "rockGame.refundNote": "إذا لم ينضم أحد إلى لعبة حجر ورقة مقص، سيتم رد العملات خلال 10 دقائق.", "roomReward.pageTitle": "فعالية مكافآت الغرفة", diff --git a/common/locales/en.json b/common/locales/en.json index 6ffca58..5bd9ec2 100644 --- a/common/locales/en.json +++ b/common/locales/en.json @@ -4,7 +4,7 @@ "diceMatch.match": "Match", "diceMatch.matching": "Matching...", "diceMatch.winnerReceives": "The winner receives", - "diceMatch.feeNote": "The winning player pays a 5% transaction fee", + "diceMatch.feeNote": "", "diceMatch.unknownOpponent": "?", "diceMatch.win": "Win", "diceMatch.coins": "Coins", @@ -18,7 +18,7 @@ "diceMatch.apiUnavailable": "Dice API unavailable", "diceMatch.selectStake": "Select a stake", "diceMatch.requestFailed": "Request failed", - "diceMatch.configFeeNote": "Fee {fee}%", + "diceMatch.configFeeNote": "Tickets {fee}%", "rockGame.pageTitle": "Rock Paper Scissors", "rockGame.pageLabel": "Rock paper scissors", "rockGame.start": "START", @@ -38,7 +38,7 @@ "rockGame.playAgain": "Play again", "rockGame.changeLanguage": "Change language", "rockGame.selectStake": "Select a stake", - "rockGame.configFeeNote": "Fee {fee}%", + "rockGame.configFeeNote": "Tickets {fee}%", "rockGame.apiUnavailable": "RPS API unavailable", "rockGame.refundNote": "If no one joins the rock-paper-scissors game, the coins will be refunded in 10 minutes.", "roomReward.pageTitle": "Room Reward Event", diff --git a/common/locales/es.json b/common/locales/es.json index ff49f30..6e76c7c 100644 --- a/common/locales/es.json +++ b/common/locales/es.json @@ -4,7 +4,7 @@ "diceMatch.match": "Emparejar", "diceMatch.matching": "Emparejando...", "diceMatch.winnerReceives": "El ganador recibe", - "diceMatch.feeNote": "El jugador ganador paga una comisión del 5%", + "diceMatch.feeNote": "", "diceMatch.unknownOpponent": "?", "diceMatch.win": "Victoria", "diceMatch.coins": "Monedas", @@ -18,7 +18,7 @@ "diceMatch.apiUnavailable": "API del juego de dados no disponible", "diceMatch.selectStake": "Selecciona una apuesta", "diceMatch.requestFailed": "Error de solicitud", - "diceMatch.configFeeNote": "Comisión {fee}%", + "diceMatch.configFeeNote": "Tickets {fee}%", "rockGame.pageTitle": "Piedra, papel o tijeras", "rockGame.pageLabel": "Piedra, papel o tijeras", "rockGame.start": "INICIAR", @@ -38,7 +38,7 @@ "rockGame.playAgain": "Jugar otra vez", "rockGame.changeLanguage": "Cambiar idioma", "rockGame.selectStake": "Selecciona una apuesta", - "rockGame.configFeeNote": "Comisión {fee}%", + "rockGame.configFeeNote": "Tickets {fee}%", "rockGame.apiUnavailable": "API de RPS no disponible", "rockGame.refundNote": "Si nadie se une al juego de piedra, papel o tijeras, las monedas se reembolsarán en 10 minutos.", "roomReward.pageTitle": "Evento de recompensas de sala", diff --git a/common/locales/id.json b/common/locales/id.json index caade2c..64d4dcd 100644 --- a/common/locales/id.json +++ b/common/locales/id.json @@ -4,7 +4,7 @@ "diceMatch.match": "Match", "diceMatch.matching": "Mencari...", "diceMatch.winnerReceives": "Pemenang menerima", - "diceMatch.feeNote": "Pemain yang menang membayar biaya transaksi 5%", + "diceMatch.feeNote": "", "diceMatch.unknownOpponent": "?", "diceMatch.win": "Menang", "diceMatch.coins": "Koin", diff --git a/common/locales/tr.json b/common/locales/tr.json index 4d161cb..37f958e 100644 --- a/common/locales/tr.json +++ b/common/locales/tr.json @@ -4,7 +4,7 @@ "diceMatch.match": "Eşleş", "diceMatch.matching": "Eşleşiyor...", "diceMatch.winnerReceives": "Kazanan alır", - "diceMatch.feeNote": "Kazanan oyuncu %5 işlem ücreti öder", + "diceMatch.feeNote": "", "diceMatch.unknownOpponent": "?", "diceMatch.win": "Kazan", "diceMatch.coins": "Coin", diff --git a/common/locales/zh.json b/common/locales/zh.json index 4f4e038..484f0db 100644 --- a/common/locales/zh.json +++ b/common/locales/zh.json @@ -4,7 +4,7 @@ "diceMatch.match": "匹配", "diceMatch.matching": "匹配中...", "diceMatch.winnerReceives": "获胜者可获得", - "diceMatch.feeNote": "获胜玩家需支付 5% 交易手续费", + "diceMatch.feeNote": "", "diceMatch.unknownOpponent": "?", "diceMatch.win": "胜利", "diceMatch.coins": "金币", diff --git a/game/rock/index.html b/game/rock/index.html index 8a7f204..e7252f9 100644 --- a/game/rock/index.html +++ b/game/rock/index.html @@ -1799,7 +1799,10 @@ > START -
Fee 5%
+ @@ -3030,10 +3033,7 @@ function totalFeeBPSForMatch(match) { var config = state.config || {}; - var feeBPS = numberFromFields(match, [ - 'fee_bps', - 'feeBps', - ]); + var feeBPS = numberFromFields(match, ['fee_bps', 'feeBps']); var poolBPS = numberFromFields(match, [ 'pool_bps', 'poolBps', @@ -3152,18 +3152,34 @@ } function renderFeeNote(config) { - var hasConfig = !!config; - var totalFee = hasConfig - ? (Number(config.fee_bps || 0) + - Number(config.pool_bps || 0)) / - 100 - : 5; + var note = document.querySelector('.rps-refund-note'); + if (!note) return; + var feeBPS = numberFromFields(config, [ + 'fee_bps', + 'feeBps', + ]); + var poolBPS = numberFromFields(config, [ + 'pool_bps', + 'poolBps', + ]); + // 费率必须来自后端配置;没有明确字段时隐藏,避免把历史兜底 5% 当成真实规则展示。 + if (feeBPS === null && poolBPS === null) { + setText(note, ''); + note.style.display = 'none'; + return; + } + var totalFee = + Math.max( + 0, + Math.min(10000, (feeBPS || 0) + (poolBPS || 0)) + ) / 100; setText( - document.querySelector('.rps-refund-note'), - i18nFormat('rockGame.configFeeNote', 'Fee {fee}%', { + note, + i18nFormat('rockGame.configFeeNote', 'Tickets {fee}%', { fee: totalFee, }) ); + note.style.display = ''; } function pollMatch(matchID) { diff --git a/game/touzi/index.html b/game/touzi/index.html index a4d8b5c..29f533c 100644 --- a/game/touzi/index.html +++ b/game/touzi/index.html @@ -2336,10 +2336,8 @@
- The winning player pays a 5% transaction fee -
+ style="display: none" + >