Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 7 additions & 3 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types';
import { themes as prismThemes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';

const config: Config = {
title: 'Copper App SDK',
Expand All @@ -18,7 +18,7 @@ const config: Config = {

i18n: {
defaultLocale: 'en',
locales: ['en'],
locales: ['en', 'zh-Hant'],
},

themes: ['classic'],
Expand All @@ -38,6 +38,10 @@ const config: Config = {
navbar: {
title: 'Copper App SDK',
items: [
{
type: 'localeDropdown',
position: 'right',
},
{
label: 'Copper',
href: 'https://copper.com',
Expand Down
289 changes: 289 additions & 0 deletions i18n/zh-Hant/code.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,289 @@
{
"theme.ErrorPageContent.title": {
"message": "此頁已當機。",
"description": "The title of the fallback page when the page crashed"
},
"theme.blog.archive.title": {
"message": "歷史文章",
"description": "The page & hero title of the blog archive page"
},
"theme.blog.archive.description": {
"message": "歷史文章",
"description": "The page & hero description of the blog archive page"
},
"theme.BackToTopButton.buttonAriaLabel": {
"message": "回到頂部",
"description": "The ARIA label for the back to top button"
},
"theme.blog.paginator.navAriaLabel": {
"message": "部落格文章列表分頁導覽",
"description": "The ARIA label for the blog pagination"
},
"theme.blog.paginator.newerEntries": {
"message": "較新的文章",
"description": "The label used to navigate to the newer blog posts page (previous page)"
},
"theme.blog.paginator.olderEntries": {
"message": "較舊的文章",
"description": "The label used to navigate to the older blog posts page (next page)"
},
"theme.blog.post.paginator.navAriaLabel": {
"message": "部落格文章分頁導覽",
"description": "The ARIA label for the blog posts pagination"
},
"theme.blog.post.paginator.newerPost": {
"message": "較新一篇",
"description": "The blog post button label to navigate to the newer/previous post"
},
"theme.blog.post.paginator.olderPost": {
"message": "較舊一篇",
"description": "The blog post button label to navigate to the older/next post"
},
"theme.blog.post.plurals": {
"message": "{count} 篇文章",
"description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.blog.tagTitle": {
"message": "{nPosts} 含有標籤「{tagName}」",
"description": "The title of the page for a blog tag"
},
"theme.tags.tagsPageLink": {
"message": "檢視所有標籤",
"description": "The label of the link targeting the tag list page"
},
"theme.colorToggle.ariaLabel": {
"message": "切換淺色/暗黑模式(當前為{mode})",
"description": "The ARIA label for the navbar color mode toggle"
},
"theme.colorToggle.ariaLabel.mode.dark": {
"message": "暗黑模式",
"description": "The name for the dark color mode"
},
"theme.colorToggle.ariaLabel.mode.light": {
"message": "淺色模式",
"description": "The name for the light color mode"
},
"theme.docs.breadcrumbs.navAriaLabel": {
"message": "頁面路徑",
"description": "The ARIA label for the breadcrumbs"
},
"theme.docs.DocCard.categoryDescription.plurals": {
"message": "{count} 個項目",
"description": "The default description for a category card in the generated index about how many items this category includes"
},
"theme.docs.paginator.navAriaLabel": {
"message": "文件選項卡",
"description": "The ARIA label for the docs pagination"
},
"theme.docs.paginator.previous": {
"message": "上一頁",
"description": "The label used to navigate to the previous doc"
},
"theme.docs.paginator.next": {
"message": "下一頁",
"description": "The label used to navigate to the next doc"
},
"theme.docs.tagDocListPageTitle.nDocsTagged": {
"message": "{count} 篇文件帶有標籤",
"description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.docs.tagDocListPageTitle": {
"message": "{nDocsTagged}「{tagName}」",
"description": "The title of the page for a docs tag"
},
"theme.docs.versionBadge.label": {
"message": "版本:{versionLabel}"
},
"theme.docs.versions.unreleasedVersionLabel": {
"message": "此為 {siteTitle} {versionLabel} 版尚未發行的文件。",
"description": "The label used to tell the user that he's browsing an unreleased doc version"
},
"theme.docs.versions.unmaintainedVersionLabel": {
"message": "此為 {siteTitle} {versionLabel} 版的文件,現已不再積極維護。",
"description": "The label used to tell the user that he's browsing an unmaintained doc version"
},
"theme.docs.versions.latestVersionSuggestionLabel": {
"message": "最新的文件請參閱 {latestVersionLink} ({versionLabel})。",
"description": "The label used to tell the user to check the latest version"
},
"theme.docs.versions.latestVersionLinkLabel": {
"message": "最新版本",
"description": "The label used for the latest version suggestion link label"
},
"theme.common.editThisPage": {
"message": "編輯此頁",
"description": "The link label to edit the current page"
},
"theme.common.headingLinkTitle": {
"message": "{heading}的直接連結",
"description": "Title for link to heading"
},
"theme.lastUpdated.atDate": {
"message": "於 {date} ",
"description": "The words used to describe on which date a page has been last updated"
},
"theme.lastUpdated.byUser": {
"message": "由 {user} ",
"description": "The words used to describe by who the page has been last updated"
},
"theme.lastUpdated.lastUpdatedAtBy": {
"message": "最後{byUser}{atDate}更新",
"description": "The sentence used to display when a page has been last updated, and by who"
},
"theme.NotFound.title": {
"message": "找不到頁面",
"description": "The title of the 404 page"
},
"theme.navbar.mobileVersionsDropdown.label": {
"message": "選擇版本",
"description": "The label for the navbar versions dropdown on mobile view"
},
"theme.tags.tagsListLabel": {
"message": "標籤:",
"description": "The label alongside a tag list"
},
"theme.admonition.caution": {
"message": "警告",
"description": "The default label used for the Caution admonition (:::caution)"
},
"theme.admonition.danger": {
"message": "危險",
"description": "The default label used for the Danger admonition (:::danger)"
},
"theme.admonition.info": {
"message": "信息",
"description": "The default label used for the Info admonition (:::info)"
},
"theme.admonition.note": {
"message": "備註",
"description": "The default label used for the Note admonition (:::note)"
},
"theme.admonition.tip": {
"message": "提示",
"description": "The default label used for the Tip admonition (:::tip)"
},
"theme.admonition.warning": {
"message": "warning",
"description": "The default label used for the Warning admonition (:::warning)"
},
"theme.AnnouncementBar.closeButtonAriaLabel": {
"message": "關閉",
"description": "The ARIA label for close button of announcement bar"
},
"theme.blog.sidebar.navAriaLabel": {
"message": "最近部落格文章導覽",
"description": "The ARIA label for recent posts in the blog sidebar"
},
"theme.CodeBlock.copied": {
"message": "複製成功",
"description": "The copied button label on code blocks"
},
"theme.CodeBlock.copyButtonAriaLabel": {
"message": "複製代碼至剪貼簿",
"description": "The ARIA label for copy code blocks button"
},
"theme.CodeBlock.copy": {
"message": "複製",
"description": "The copy button label on code blocks"
},
"theme.CodeBlock.wordWrapToggle": {
"message": "切換自動換行",
"description": "The title attribute for toggle word wrapping button of code block lines"
},
"theme.DocSidebarItem.expandCategoryAriaLabel": {
"message": "Expand sidebar category '{label}'",
"description": "The ARIA label to expand the sidebar category"
},
"theme.DocSidebarItem.collapseCategoryAriaLabel": {
"message": "Collapse sidebar category '{label}'",
"description": "The ARIA label to collapse the sidebar category"
},
"theme.NavBar.navAriaLabel": {
"message": "主導航",
"description": "The ARIA label for the main navigation"
},
"theme.NotFound.p1": {
"message": "我們沒有您要找的頁面。",
"description": "The first paragraph of the 404 page"
},
"theme.NotFound.p2": {
"message": "請聯絡原始連結來源網站的所有者,並通知他們連結已毀損。",
"description": "The 2nd paragraph of the 404 page"
},
"theme.navbar.mobileLanguageDropdown.label": {
"message": "選擇語言",
"description": "The label for the mobile language switcher dropdown"
},
"theme.TOCCollapsible.toggleButtonLabel": {
"message": "本頁導覽",
"description": "The label used by the button on the collapsible TOC component"
},
"theme.blog.post.readMore": {
"message": "閱讀更多",
"description": "The label used in blog post item excerpts to link to full blog posts"
},
"theme.blog.post.readMoreLabel": {
"message": "閱讀 {title} 全文",
"description": "The ARIA label for the link to full blog posts from excerpts"
},
"theme.blog.post.readingTime.plurals": {
"message": "閱讀時間約 {readingTime} 分鐘",
"description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.docs.breadcrumbs.home": {
"message": "主頁面",
"description": "The ARIA label for the home page in the breadcrumbs"
},
"theme.docs.sidebar.collapseButtonTitle": {
"message": "收起側邊欄",
"description": "The title attribute for collapse button of doc sidebar"
},
"theme.docs.sidebar.collapseButtonAriaLabel": {
"message": "收起側邊欄",
"description": "The title attribute for collapse button of doc sidebar"
},
"theme.docs.sidebar.navAriaLabel": {
"message": "文件側邊欄",
"description": "The ARIA label for the sidebar navigation"
},
"theme.docs.sidebar.closeSidebarButtonAriaLabel": {
"message": "Close navigation bar",
"description": "The ARIA label for close button of mobile sidebar"
},
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": {
"message": "← 回到主選單",
"description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"
},
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": {
"message": "Toggle navigation bar",
"description": "The ARIA label for hamburger menu button of mobile navigation"
},
"theme.docs.sidebar.expandButtonTitle": {
"message": "展開側邊欄",
"description": "The ARIA label and title attribute for expand button of doc sidebar"
},
"theme.docs.sidebar.expandButtonAriaLabel": {
"message": "展開側邊欄",
"description": "The ARIA label and title attribute for expand button of doc sidebar"
},
"theme.ErrorPageContent.tryAgain": {
"message": "重試",
"description": "The label of the button to try again rendering when the React error boundary captures an error"
},
"theme.common.skipToMainContent": {
"message": "跳至主要内容",
"description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"
},
"theme.tags.tagsPageTitle": {
"message": "標籤",
"description": "The title of the tag list page"
},
"theme.unlistedContent.title": {
"message": "未列出頁",
"description": "The unlisted content banner title"
},
"theme.unlistedContent.message": {
"message": "此頁面未列出。搜索引擎不會對其索引,只有擁有直接連結的用戶才能訪問。",
"description": "The unlisted content banner message"
}
}
6 changes: 6 additions & 0 deletions i18n/zh-Hant/docusaurus-plugin-content-docs/current.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"version.label": {
"message": "當前",
"description": "The label for version current"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# 配置

如何配置嵌入式應用:
1. 添加至
2. 位置
3. 可選的進階配置

![嵌入式應用設定](./images/embedded-app-setting.png)

## 支援的實體
Copper 支援 5 種實體,使用者可以在這些實體中添加嵌入式應用:
1. 潛在客戶
2. 人員
3. 公司
4. 銷售管道記錄
5. 專案

## 支援的位置
Copper 支援 5 種位置,使用者可以在這些位置查看嵌入式應用:
1. 側邊欄
2. 活動面板
3. 操作列
4. 個人資料
5. 左側導航

## 可選的進階配置
### html5Mode
典型嵌入式應用的 URL 會是:
```
https://your-url.com/?location=sidebar&origin=...&instanceId=...
```

如果使用者指定 `html5Mode: true`,URL 將變為:
```
https://your-url.com/sidebar?origin=...&instanceId=...
```

### refreshOnContextUpdate
默認情況下,在 Copper 應用中切換到新路由時,會向嵌入式應用發送事件。使用者現在可以使用以下代碼:
```javascript
sdk.on('contextUpdated', function () {
// 這裡是處理事件的代碼
})
```
除了處理事件外,使用者還可以通過將可選的進階配置設置為 `refreshOnContextUpdate: true` 來刷新嵌入式應用。每次應用變更路由/上下文時,嵌入式應用將會刷新。

### voip
通過設置可選的進階配置:`voip: true`,Copper 中的所有電話號碼現在變為可點擊。當使用者點擊電話號碼時,他們將能夠訂閱一個名為 `phoneNumberClicked` 的事件。
```javascript
sdk.on('phoneNumberClicked', function ({ number }) {
// 對電話號碼進行處理
})
```

### allowHttp
默認情況下,Copper 不允許在嵌入式應用中使用 http URL。然而,設置可選的進階配置 `allowHttp: true` 將允許使用者將 http URL 嵌入到嵌入式應用中。

如果瀏覽器仍然阻止使用者查看 http URL,可以按照以下步驟解除阻擋:
1. 點擊瀏覽器地址欄右側的小圖標
2. 點擊「允許運行不安全的腳本」

### verifyServer
這允許使用者驗證他們的父幀實際上是 Copper。請參見更多細節:[安全範例](examples#安全範例)。
Loading