feat(game): 更新游戏页面功能和认证刷新机制
- 将开发环境代理目标从 192.168.1.5 改为 127.0.0.1 - 重构 auth.ts 文件中的代码缩进格式 - 实现自动令牌刷新机制,支持 JWT 过期时间检测 - 添加 WebSocket 连接的令牌强制刷新逻辑 - 新增 WindSquare 组件显示方位风向图标 - 实现动态座位风向计算和显示功能 - 优化 WebSocket URL 构建方式,移除查询参数中的令牌传递 - 添加登录失效时自动跳转到登录页面的功能 - 限制玩家名称显示长度为4个字符 - 改进 WebSocket 错误处理和重连机制
This commit is contained in:
@@ -746,225 +746,6 @@ button:disabled {
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.table-watermark {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 24px;
|
||||
transform: translateX(-50%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
color: rgba(244, 240, 220, 0.82);
|
||||
text-align: center;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.table-watermark span {
|
||||
font-size: 12px;
|
||||
color: #f7e4b0;
|
||||
}
|
||||
|
||||
.table-watermark strong {
|
||||
font-size: 26px;
|
||||
letter-spacing: 2px;
|
||||
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.table-watermark small {
|
||||
font-size: 12px;
|
||||
color: #bdd8ca;
|
||||
}
|
||||
|
||||
.player-badge {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-width: 154px;
|
||||
padding: 9px 12px;
|
||||
border-radius: 16px;
|
||||
border: 1px solid rgba(248, 226, 173, 0.24);
|
||||
background:
|
||||
linear-gradient(180deg, rgba(43, 52, 73, 0.84), rgba(17, 22, 34, 0.82)),
|
||||
radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 40%);
|
||||
box-shadow:
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.08),
|
||||
0 12px 28px rgba(0, 0, 0, 0.24);
|
||||
}
|
||||
|
||||
.avatar-panel {
|
||||
position: relative;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.player-badge.seat-top {
|
||||
top: 20px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.player-badge.seat-right {
|
||||
right: -20px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%) rotate(90deg);
|
||||
}
|
||||
|
||||
.player-badge.seat-bottom {
|
||||
bottom: 20px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.player-badge.seat-left {
|
||||
left: -20px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%) rotate(90deg);
|
||||
}
|
||||
|
||||
.player-badge.is-turn {
|
||||
border-color: rgba(244, 222, 163, 0.72);
|
||||
}
|
||||
|
||||
.player-badge.offline {
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.avatar-card {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid rgba(255, 248, 215, 0.32);
|
||||
background:
|
||||
linear-gradient(145deg, #b3e79c, #4eaf4a 46%, #2f7e28 100%);
|
||||
color: #f7fff7;
|
||||
font-weight: 800;
|
||||
box-shadow:
|
||||
inset 0 2px 4px rgba(255, 255, 255, 0.18),
|
||||
0 6px 14px rgba(0, 0, 0, 0.22);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.avatar-card img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.player-badge.seat-right .avatar-card img {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.player-badge.seat-left .avatar-card img {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.player-meta p {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: #eef5ff;
|
||||
}
|
||||
|
||||
.player-meta strong {
|
||||
font-size: 15px;
|
||||
color: #ffd85c;
|
||||
text-shadow: 0 0 10px rgba(255, 216, 92, 0.2);
|
||||
}
|
||||
|
||||
.dealer-mark,
|
||||
.missing-mark {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 999px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.dealer-mark {
|
||||
position: absolute;
|
||||
right: -8px;
|
||||
bottom: -6px;
|
||||
background: linear-gradient(180deg, #ffe38a 0%, #f1b92e 100%);
|
||||
color: #5f3200;
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
|
||||
}
|
||||
|
||||
.missing-mark {
|
||||
margin-left: auto;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(180deg, rgba(114, 219, 149, 0.2) 0%, rgba(21, 148, 88, 0.34) 100%);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.16);
|
||||
}
|
||||
|
||||
.missing-mark img {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.missing-mark span {
|
||||
color: #effff5;
|
||||
}
|
||||
|
||||
.wall {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.22));
|
||||
}
|
||||
|
||||
.wall img {
|
||||
display: block;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.wall-top,
|
||||
.wall-bottom {
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.wall-left,
|
||||
.wall-right {
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.wall-top {
|
||||
top: 154px;
|
||||
}
|
||||
|
||||
.wall-top img,
|
||||
.wall-bottom img {
|
||||
width: 24px;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.wall-right {
|
||||
right: 132px;
|
||||
}
|
||||
|
||||
.wall-left {
|
||||
left: 132px;
|
||||
}
|
||||
|
||||
.wall-left img,
|
||||
.wall-right img {
|
||||
width: 36px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.wall-bottom {
|
||||
bottom: 176px;
|
||||
}
|
||||
|
||||
.center-deck {
|
||||
position: absolute;
|
||||
|
||||
Reference in New Issue
Block a user