Skip to content

Commit a293e1c

Browse files
jackshen310shenxiaojie.316
and
shenxiaojie.316
authored
Feat/realtime quickstart (#198)
* feat: add github source link * refactor: redesign UI with Ant Design layout system * feat: add config validation and translate settings labels to Chinese * feat: UI/UX improvements to realtime-websocket example * feat(ui): implement responsive header and improve layout * feat: add default audio mute option and improve audio handling * chore: Publish feat/realtime-quickstart * fix: unit test * chore: Publish feat/realtime-quickstart * chore: Publish feat/realtime-quickstart * chore: remove unpkg * chore: Publish feat/realtime-quickstart * chore: Publish feat/realtime-quickstart * chore: Publish feat/realtime-quickstart * chore: Publish feat/realtime-quickstart --------- Co-authored-by: shenxiaojie.316 <[email protected]>
1 parent 586adad commit a293e1c

25 files changed

+933
-227
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@coze/api",
5+
"comment": "UI/UX improvements to realtime-websocket example",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@coze/api",
10+
"email": "[email protected]"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@coze/api",
5+
"comment": "add default audio mute option and improve audio handling",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@coze/api",
10+
"email": "[email protected]"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@coze/api",
5+
"comment": "unit test",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@coze/api",
10+
"email": "[email protected]"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@coze/api",
5+
"comment": "remove unpkg",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@coze/api",
10+
"email": "[email protected]"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@coze/api",
5+
"comment": "remove unpkg",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@coze/api",
10+
"email": "[email protected]"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@coze/api",
5+
"comment": "Publish feat/realtime-quickstart",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@coze/api",
10+
"email": "[email protected]"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@coze/realtime-api",
5+
"comment": "UI/UX improvements to realtime-websocket example",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@coze/realtime-api",
10+
"email": "[email protected]"
11+
}

examples/realtime-websocket/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
5+
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>Realtime WebSocket</title>
88
</head>
9+
910
<body>
1011
<div id="root"></div>
1112
<script type="module" src="/src/main.tsx"></script>
Lines changed: 136 additions & 0 deletions
Loading
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/* 添加到您的CSS文件中,例如 App.css 或 index.css */
2+
.responsive-header {
3+
width: 100%;
4+
}
5+
6+
.header-content {
7+
display: flex;
8+
justify-content: space-between;
9+
align-items: center;
10+
width: 100%;
11+
}
12+
13+
.header-left {
14+
display: flex;
15+
align-items: center;
16+
}
17+
18+
.header-right {
19+
display: flex;
20+
align-items: center;
21+
}
22+
23+
.settings-button {
24+
position: fixed;
25+
right: 160px;
26+
top: 14px;
27+
z-index: 1;
28+
}
29+
/* 移动端响应式设计 */
30+
@media screen and (max-width: 576px) {
31+
.responsive-header {
32+
height: 90px;
33+
}
34+
.settings-button {
35+
position: fixed;
36+
right: 160px;
37+
top: 48px;
38+
z-index: 1;
39+
}
40+
.header-content {
41+
flex-direction: column;
42+
align-items: flex-start;
43+
padding-bottom: 8px;
44+
}
45+
46+
.header-left {
47+
width: 100%;
48+
height: 48px;
49+
}
50+
51+
.header-left h3 {
52+
line-height: 48px;
53+
}
54+
55+
.header-right {
56+
width: 100%;
57+
justify-content: flex-end;
58+
height: 40px;
59+
}
60+
61+
/* 调整按钮和标题在移动端的样式 */
62+
.header-left button {
63+
height: 48px;
64+
}
65+
}

0 commit comments

Comments
 (0)