Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
da8b0d7
Add CallKit Docs
Aug 18, 2025
321bc61
modify
Aug 18, 2025
d32fe58
modify
Aug 18, 2025
f88899c
add callkit sidebar
Wster11 Aug 18, 2025
7fbd85e
Merge pull request #2 from Wster11/callkitSidebar
haoxiuwen Aug 18, 2025
9389ef2
modify
Aug 19, 2025
15befd9
modify README
Aug 19, 2025
44c9d08
modify
Aug 19, 2025
8fb823c
modify Web Docs
Aug 19, 2025
9242166
modify
Aug 19, 2025
1fc866f
modify
Aug 19, 2025
c71a753
modify
Aug 19, 2025
61bd1ac
Add Historical Docs
Aug 19, 2025
d2d010f
Add design guides
Aug 19, 2025
39aa363
modify
Aug 19, 2025
10e95d2
modify
Aug 19, 2025
93244eb
modify
Aug 19, 2025
715bfa7
modify
Aug 19, 2025
a2aade3
modify
Aug 20, 2025
55976b0
modify
Aug 20, 2025
59519d9
Modify docs
Aug 20, 2025
b9a7353
modify
Aug 21, 2025
68d361c
modify
Aug 21, 2025
ab4574f
update detail styles
Wster11 Aug 21, 2025
de1eebd
modify
Aug 22, 2025
403f201
modify
Aug 22, 2025
9360210
modify
Aug 22, 2025
cb332c6
modify
Aug 22, 2025
2dfdc21
modify
Aug 22, 2025
1416057
modify
Aug 22, 2025
967e94d
modify
Aug 22, 2025
d7b5775
commit
Aug 22, 2025
d109178
modify
Aug 22, 2025
5070e13
modify
Aug 22, 2025
3b98a38
modify
Aug 22, 2025
465a4ca
modify
Aug 22, 2025
cf2641e
modify
Aug 22, 2025
76865d3
modify
Aug 22, 2025
72e8873
modify
Aug 22, 2025
059a314
Modify
Aug 23, 2025
2bd3df6
modify
Aug 23, 2025
d77901e
Add iOS and Web images
Aug 23, 2025
3a30e6a
modify
Aug 23, 2025
fbbf8ce
modify
Aug 23, 2025
3087468
Modify
Aug 24, 2025
0c2e33c
modify
Aug 24, 2025
a40e340
modify
Aug 25, 2025
e0b37bf
modify
Aug 25, 2025
42c2903
modify
Aug 25, 2025
41bca7f
modify
Aug 25, 2025
038c719
modify
Aug 25, 2025
4e0d876
modify
Aug 25, 2025
0cc9961
modify
Aug 25, 2025
75d5dae
Merge pull request #3 from Wster11/dropdown
haoxiuwen Aug 25, 2025
3f36882
modify
Aug 25, 2025
5ac3ad3
modify
Aug 25, 2025
1b9821d
modify
Aug 25, 2025
bd72e62
modify
Aug 25, 2025
2c144a1
modify
Aug 25, 2025
952ea34
modify
Aug 25, 2025
ccfd9d0
modify
Aug 25, 2025
d03a5c1
modify
Aug 25, 2025
546aff5
modify
Aug 26, 2025
fd88138
modify
Aug 26, 2025
c08d61f
modify
Aug 26, 2025
64b56fe
modify
Aug 26, 2025
246a713
modify
Aug 26, 2025
e325edf
modify
Aug 26, 2025
f5e667c
modify
Aug 26, 2025
04ea71c
modify
Aug 26, 2025
f4cd1ee
modify
Aug 27, 2025
e023ba6
modify
Aug 27, 2025
182bca4
modify
Aug 27, 2025
4002864
modify
Aug 27, 2025
4432724
modify
Aug 27, 2025
a2b7e40
modify
Aug 28, 2025
8b29154
modify
Aug 28, 2025
36fb660
modify
Aug 28, 2025
76e070b
modify
Aug 28, 2025
31d5134
modify
Aug 28, 2025
0a9e072
modify
Aug 28, 2025
1c0314f
modify
Aug 28, 2025
6696b4f
modify
Aug 28, 2025
c56748d
modify
Aug 28, 2025
5f5254c
modify
Aug 28, 2025
4279784
modify
Aug 28, 2025
eb57a8a
modify
Aug 28, 2025
b18e36b
modify
Aug 28, 2025
ed28e63
modify
Sep 1, 2025
11a748d
modify
Sep 1, 2025
f14c734
modify
Sep 1, 2025
e1a2b44
modify
Sep 1, 2025
76dfeeb
modify
Sep 1, 2025
1d9085a
modify
Sep 1, 2025
7ab5c70
modify
Sep 1, 2025
40cd4a9
modify
Sep 1, 2025
35f2b87
modify
Sep 1, 2025
07a0542
modify
Sep 2, 2025
9b6a121
modify
Sep 2, 2025
4de715c
modify
Sep 3, 2025
07ddaf4
modify
Sep 3, 2025
2d179d6
modify
Sep 4, 2025
6cd7e2e
modify
Sep 4, 2025
d2dbc24
modify
Sep 4, 2025
cd5545b
modify
Sep 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 165 additions & 0 deletions docs/.vuepress/components/CallKitSwitch.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
<script lang="ts" setup>
import { ref, watch, computed } from "vue";
import { useRoute, useRouter } from "vue-router";

const PLATFORM_ICON_MAP = {
android: {
icon: "/icon-Android.svg",
activeIcon: "/icon-Android-hover.svg"
},
ios: {
icon: "/icon-iOS.svg",
activeIcon: "/icon-iOS-hover.svg"
},
web: {
icon: "/icon-web.svg",
activeIcon: "/icon-web-hover.png"
},
harmonyos: {
icon: "/icon-harmonyos.svg",
activeIcon: "/icon-harmonyos-hover.svg"
},
windows: {
icon: "/icon-windows.svg",
activeIcon: "/icon-windows-hover.svg"
},
["react-native"]: {
icon: "/icon-ReactNative.svg",
activeIcon: "/icon-ReactNative-hover.svg"
},
flutter: {
icon: "/icon-flutter.svg",
activeIcon: "/icon-flutter-hover.png"
},
unity: {
icon: "/icon-unity.svg",
activeIcon: "/icon-unity-hover.svg"
},
uniapp: {
icon: "/icon-uni-app.svg",
activeIcon: "/icon-uni-app.svg"
},
applet: {
icon: "/icon-mini-program.svg",
activeIcon: "/icon-mini-program-hover.svg"
},
["server-side"]: {
icon: "/icon-platform.svg",
activeIcon: "/icon-platform-hover.svg"
}
};

const options = [
{
label: "平台",
options: [
{
value: "android",
label: "Android"
},
{
value: "ios",
label: "iOS"
},
{
value: "web",
label: "Web"
}
]
}
];

const platform = ref("android");
const platformIcon = computed(
() => PLATFORM_ICON_MAP[platform.value]?.activeIcon
);
const route = useRoute();
const router = useRouter();
watch(
() => route.path,
() => {
if (route.path.indexOf("/callkit") == 0) {
const splitRoute = route.path.split("/");
platform.value = splitRoute[2];
}
},
{ immediate: true }
);

// 切换平台,如果有相同路径的route就直接跳转
const onChange = (platform) => {
const nextPlatformDocRouters = router.options.routes
.filter(
(item) =>
item.hasOwnProperty("name") &&
item?.path.indexOf(`/callkit/${platform}`) == 0
)
.map((item) => item.path);

let newPath = route.path.split("/");
newPath[2] = platform;
const nextPathPath = newPath.join("/");

if (nextPlatformDocRouters.indexOf(nextPathPath) > -1) {
router.push(nextPathPath);
} else {
router.push(`/callkit/${platform}/product_overview.html`);
}
};
</script>

<template>
<el-select v-model="platform" @change="onChange" placeholder="请选择">
<template #prefix>
<img width="20" height="20" :src="platformIcon" />
</template>
<el-option-group
v-for="group in options"
:key="group.label"
:label="group.label"
>
<el-option
v-for="item in group.options"
:key="item.value"
:label="item.label"
:value="item.value"
class="option-content"
>
<span class="label-icon">
<img
class="default"
width="20"
height="20"
:src="PLATFORM_ICON_MAP[item.value]?.icon"
/>
<img
class="active"
width="20"
height="20"
:src="PLATFORM_ICON_MAP[item.value]?.activeIcon"
/>
</span>
<span>{{ item.label }}</span>
</el-option>
</el-option-group>
</el-select>
</template>

<style lang="scss" scope>
.option-content:hover .default {
display: none;
}

.option-content .active {
display: none;
}

.option-content:hover .active {
display: inline-block;
}

.label-icon {
vertical-align: sub;
padding-right: 5px;
}
</style>
8 changes: 8 additions & 0 deletions docs/.vuepress/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@
import PlatformSwitch from './PlatformSwitch.vue'
import PrivateSwitch from './PrivateSwitch.vue'
import UIKitSwitch from './UIKitSwitch.vue'
import CallKitSwitch from './CallKitSwitch.vue'
import { usePageData } from '@vuepress/client'
import { ref, watch } from 'vue'

const pageData = usePageData()
const showPlatformSwitch = ref(false)
const showPrivateSwitch = ref(false)
const showUIKitSwitch = ref(false)
const showCallKitSwitch = ref(false)
watch(pageData, ()=> {
const pagePath = pageData.value.path
showPrivateSwitch.value = pagePath.indexOf('/private/') == 0
showPlatformSwitch.value = pagePath.indexOf('/document/') == 0
showUIKitSwitch.value = pagePath.indexOf('/uikit/') == 0
showCallKitSwitch.value = pagePath.indexOf('/callkit/') == 0
}, {immediate:true})


Expand All @@ -37,6 +40,11 @@
<UIKitSwitch />
</ClientOnly>
</div>
<div v-show="showCallKitSwitch" class="platform-switch">
<ClientOnly>
<CallKitSwitch />
</ClientOnly>
</div>
</template>
</Sidebar>
</template>
Expand Down
20 changes: 20 additions & 0 deletions docs/.vuepress/navbar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,26 @@ export const zhNavbar = navbar([
}
]
},
{
text: 'CallKit',
children: [
{
text: 'Android',
icon: '/icon-Android.svg',
link: '/callkit/android/product_overview.html'
},
{
text: 'iOS',
icon: '/icon-iOS.svg',
link: '/callkit/ios/product_overview.html'
},
{
text: 'Web',
icon: '/icon-web.svg',
link: '/callkit/web/product_overview.html'
},
]
},
{
text: 'SDK/REST 集成',
children: [
Expand Down
Binary file removed docs/.vuepress/public/.vuepress - 快捷方式.lnk
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.vuepress/public/images/console/content_moderation.png
Binary file modified docs/.vuepress/public/images/console/push_activation.png
Binary file modified docs/.vuepress/public/images/console/server_api_activation.png
Binary file modified docs/.vuepress/public/images/console/translation_activation.png
Binary file modified docs/.vuepress/public/images/console/translation_statistics.png
134 changes: 134 additions & 0 deletions docs/.vuepress/sidebar/callkit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
import path from "node:path";
import fs from "node:fs";

const getSubDirectories = (dir) =>
fs
.readdirSync(dir)
.filter((item) => fs.statSync(path.join(dir, item)).isDirectory());
const CALL_DOC_PATH = path.resolve(__dirname, "../../callkit");
const callKitPlatformList = getSubDirectories(CALL_DOC_PATH);

const callKitSidebar = [
{
/*
text: 分组标题
children: 分组导航列表
text: 显示的文本
link: 链接地址
show: 不存在或者值为 true 时,菜单显示;存在并且值为 false 时,菜单不显示
only: 数组形式,只有在数组中的平台下显示
except: 数组形式,除了数组中指定的平台外都显示
collapsible: 子菜单是否允许展开/收起,true: 允许; false: 不允许。请参考「子菜单示例」
children: 子菜单。请参考「子菜单示例」
*/
text: "产品介绍",
collapsible: true,
children: [
{ text: "产品概述", link: "product_overview.html" },
{ text: "开通服务", link: "product_activation.html" },
{ text: "购买指南", link: "product_purchase.html" }
]
},
{
text: "快速开始",
collapsible: true,
children: [
{ text: "跑通示例项目", link: "sample_runthrough.html" },
{ text: "快速开始", link: "quickstart.html" }
]
},
{
text: "集成文档",
collapsible: true,
children: [
{ text: "CallKit 架构", link: "architecture.html" },
{ text: "集成 CallKit", link: "integration.html" },
{ text: "权限", link: "permission.html", only: ["android"] },
{
text: "使用 LiveCommunicationKit", link: "livecommunicationkit.html", only: ["ios"]
},
{ text: "画中画", link: "picture_in_picture.html", only: ["ios"] },
{ text: "使用 Telecom", link: "telecom.html", only: ["android"] },
{ text: "来电通知和悬浮窗", link: "float_top.html", only: ["android"] },
{ text: "自定义资源", link: "customization.html" },
{ text: "通话信令", link: "signaling.html" },
{ text: "API 概览", link: "api_overview.html" },
{
text: "常见问题",
collapsible: true,
children: [
{ text: "常见问题", link: "common_issue.html" },
]
}
]
},
{
text: "设计文档",
collapsible: true,
children: [{ text: "设计指南", link: "design_guide.html" }]
},
{
text: "历史文档",
collapsible: true,
children: [{ text: "历史文档", link: "easecallkit.html" }]
}
];

function buildCallKitSidebar() {
const result = {};
callKitPlatformList.forEach((platform) => {
const key = `/callkit/${platform}/`;
result[key] = callKitSidebar
.map((sidebar) =>
handleSidebarItem(platform, sidebar, CALL_DOC_PATH, "callkit")
)
.filter((s) => s);
});
return result;
}

function linkExists(platform: string, link: string, docPath: string): boolean {
try {
const filePath = `${docPath}/${platform}/${link.replace(/.html$/, ".md")}`;
return fs.existsSync(filePath);
} catch (e) {
console.error(`Error checking file existence: ${e}`);
return false;
}
}

function handleSidebarItem(platform, sidebar, docPath, kitType) {
const hasChildren =
sidebar.hasOwnProperty("children") && sidebar.children.length > 0;
const hasOnly = sidebar.hasOwnProperty("only") && sidebar.only.length > 0;
const hasExcept =
sidebar.hasOwnProperty("except") && sidebar.except.length > 0;

let needThisPlatform = true;
if (hasOnly) {
needThisPlatform = sidebar.only.indexOf(platform) > -1;
}
if (hasExcept) {
needThisPlatform = sidebar.except.indexOf(platform) == -1;
}

if (!needThisPlatform) {
return null;
}

if (hasChildren) {
let newchildren = sidebar.children
.map((s) => handleSidebarItem(platform, s, docPath, kitType))
.filter((s) => s);
if (newchildren.length > 0) {
return { ...sidebar, children: newchildren };
}
} else {
if (linkExists(platform, sidebar.link, docPath)) {
const newLink = `/${kitType}/${platform}/${sidebar.link}`;
return { ...sidebar, link: newLink };
}
}
}

export const CALL_KIT_SIDEBAR = buildCallKitSidebar();
2 changes: 2 additions & 0 deletions docs/.vuepress/sidebar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { sidebar } from "vuepress-theme-hope";
import { DOC_SIDEBAR } from "./document";
import { CHAT_UIKIT_SIDEBAR, CHATROOM_UIKIT_SIDEBAR } from "./uikit";
import { PRIVATE_IM_SIDEBAR, PRIVATE_MEDIA_SIDEBAR } from "./private";
import { CALL_KIT_SIDEBAR } from "./callkit";
import { PUSH_SIDEBAR } from "./push";

export const zhSidebar = sidebar({
Expand Down Expand Up @@ -589,6 +590,7 @@ export const zhSidebar = sidebar({
...DOC_SIDEBAR,
...CHAT_UIKIT_SIDEBAR,
...CHATROOM_UIKIT_SIDEBAR,
...CALL_KIT_SIDEBAR,
"/private/im/": PRIVATE_IM_SIDEBAR,
"/private/media/": PRIVATE_MEDIA_SIDEBAR,
"/push": PUSH_SIDEBAR,
Expand Down
12 changes: 11 additions & 1 deletion docs/.vuepress/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,14 @@ $fade-amount: 20; // 每级字体颜色变淡的递减值
}
}
}
}
}

.hint-container.details {
padding: 12px;
background: var(--bg-color-back);
border: 1px solid var(--border-color-dark);
}

.hint-container.details summary::before {
display: none;
}
Loading