mirror of
https://github.com/BeamMP/BeamMP-Website.git
synced 2026-12-01 02:04:40 +00:00
Add event standings pages and an Events link
BeamMP now runs community events with combined leaderboards, and the site had nowhere to show them. This adds an Events page listing each event and an event page with live standings, a driver search, the servers taking part and the event rules. Standings come from the API's public events routes, so no key is ever in the browser. The page keeps the last good results on screen if a refresh fails and says the connection was lost rather than going blank. Events with an uploaded banner show it behind the card and the page header, with an overlay so the text stays readable; events without one look as plain cards. The helpers the two pages share live beside them in views/events rather than in lib, since nothing else uses them. The Events link sits before Servers in the desktop and mobile menus. All of the new text is translated into the seven site languages using literal keys, so the locale checks can see every one. The translations are machine written and want a native speaker's review. src/lib/config.js is included because the pages need the API address from it: it is the one place that reads the window.__ENV__ the container writes at start, with the real services as the defaults.
This commit is contained in:
1 parent
1488e3bbdb
commit
38955dcbfe
14 files changed
+931
-7
No files matched your search
+58
-1
@@ -22,7 +22,8 @@
|
||||
"light": "明亮主题",
|
||||
"dark": "黑暗主题",
|
||||
"system": "跟随系统"
|
||||
}
|
||||
},
|
||||
"events": "赛事"
|
||||
},
|
||||
"footer": {
|
||||
"support_on_patreon": "Patreon",
|
||||
@@ -274,6 +275,62 @@
|
||||
},
|
||||
"thank_you": "我们正在共同打造一个独特的作品—真诚感谢您成为BeamMP社区的一员!"
|
||||
}
|
||||
},
|
||||
"events": {
|
||||
"title": "赛事",
|
||||
"description": "查看 BeamMP 赛事的最新排名,汇总所有参赛服务器的成绩。",
|
||||
"loading": "正在加载赛事…",
|
||||
"empty": "尚未创建任何赛事。",
|
||||
"viewTop": "查看前 {count} 名 →",
|
||||
"ranked": "已排名车手: {count}",
|
||||
"servers": "服务器: {count}",
|
||||
"back": "← 全部赛事",
|
||||
"loadingEvent": "正在加载赛事…",
|
||||
"standings": "总排名",
|
||||
"topDrivers": "前 {count} 名车手",
|
||||
"statDrivers": "已排名车手",
|
||||
"statLaps": "已记录圈数",
|
||||
"statServers": "服务器",
|
||||
"statPlace": "第 {count} 名",
|
||||
"standingsTitle": "排名",
|
||||
"search": "搜索车手…",
|
||||
"pos": "名次",
|
||||
"driver": "车手",
|
||||
"bestLap": "最佳圈速",
|
||||
"gap": "差距",
|
||||
"pen": "罚",
|
||||
"server": "服务器",
|
||||
"leader": "领先",
|
||||
"noMatch": "没有匹配的车手。",
|
||||
"waiting": "正在等待赛事服务器的首批成绩。",
|
||||
"sources": "服务器来源",
|
||||
"lastResult": "最近成绩:{when}",
|
||||
"none": "暂无",
|
||||
"noServers": "尚无服务器加入。",
|
||||
"live": "服务器上报圈速后自动更新。",
|
||||
"lost": "连接已断开,正在重试…",
|
||||
"lastShown": "显示最近收到的成绩。",
|
||||
"rules": "赛事规则",
|
||||
"r1t": "仅限注册车手。",
|
||||
"r1": "访客不计入排名。",
|
||||
"r2t": "按记录计时。",
|
||||
"r2": "处罚由游戏服务器执行;显示的是其上报的时间。",
|
||||
"r3t": "每位车手一个名次。",
|
||||
"r3": "取所有赛事服务器中的最佳圈速。",
|
||||
"r4t": "审核。",
|
||||
"r4": "工作人员可在审核后排除车手。",
|
||||
"status": {
|
||||
"qualifying": "排位赛",
|
||||
"live": "直播赛事",
|
||||
"upcoming": "即将开始",
|
||||
"finished": "已结束"
|
||||
},
|
||||
"errors": {
|
||||
"notFound": "此赛事不可用。",
|
||||
"rateLimited": "请求过多,稍后重试。",
|
||||
"unavailable": "赛事成绩暂不可用。",
|
||||
"timeout": "连接超时,正在自动重试。"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user