Skip to content

Commit

Permalink
Merge pull request #96 from our-mini-games/feat-Chinese-chess
Browse files Browse the repository at this point in the history
fix: 更新服务版本,修复交换阵营UI未转换问题
  • Loading branch information
humandetail authored Jan 9, 2024
2 parents 3f10eae + 43ae083 commit f37cf4c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/Chinese-chess/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@ant-design/icons-vue": "^6.1.0",
"@vitejs/plugin-vue": "^4.5.2",
"ant-design-vue": "4.1.0",
"chinese-chess-service": "^0.0.27",
"chinese-chess-service": "^0.0.28",
"lodash.clonedeep": "^4.5.0",
"socket.io-client": "^4.7.2",
"vue": "^3.2.41"
Expand Down
10 changes: 10 additions & 0 deletions packages/Chinese-chess/src/pages/OnlineGame/GameAsideChat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@
<a-input
v-model:value="msg"
allow-clear
class="msg-input"
placeholder="按「回车」键发送"
style="width: 70%"
@keydown="handleInputKeydown"
/>
<a-button
type="primary"
class="btn-send"
style="width: 30%"
@click="handleSend"
>
Expand Down Expand Up @@ -103,6 +105,7 @@ const handleSend = () => {
padding: 16px;
.chat-item {
& + .chat-item {
margin-top: 8px;
}
Expand All @@ -112,10 +115,12 @@ const handleSend = () => {
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 700;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' !important;
}
.content {
word-break: break-all;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' !important;
}
&.is-self {
Expand All @@ -136,5 +141,10 @@ const handleSend = () => {
}
}
}
:deep(.msg-input *),
:deep(.btn-send *) {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' !important;
}
}
</style>
1 change: 1 addition & 0 deletions packages/Chinese-chess/src/pages/OnlineGame/GameMain.vue
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ watch(context, () => {
const handleContextChange = (context: GameContext, gameInterface: ReturnType<typeof createGameInterface>) => {
if (context.status === GameStatus.Playing || context.status === GameStatus.Finished) {
gameInterface.clearAll()
gameInterface.setRotate(currentUserCamp.value === Camp.BLACK ? Math.PI : 0)
gameInterface.drawChessPieces(context.chessPieces)
if (context.activePiece) {
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f37cf4c

Please sign in to comment.