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
6 changes: 5 additions & 1 deletion src/lang/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@
"view-symbol": "View symbol",
"view-sample-code": "View sample code"
},
"view-more": "View more"
"view-more": "View more",
"hero": {
"title": "Developer Documentation",
"copy": "Browse the latest API reference."
}
},
"declarations": {
"hide-other-declarations": "Hide other declarations",
Expand Down
6 changes: 5 additions & 1 deletion src/lang/locales/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@
"view-symbol": "記号を表示",
"view-sample-code": "サンプルコードを表示"
},
"view-more": "さらに表示"
"view-more": "さらに表示",
"hero": {
"title": "デベロッパドキュメント",
"copy": "最新のAPIリファレンスを閲覧できます。"
}
},
"declarations": {
"hide-other-declarations": "ほかの宣言を非表示",
Expand Down
6 changes: 5 additions & 1 deletion src/lang/locales/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@
"view-symbol": "기호 보기",
"view-sample-code": "샘플 코드 보기"
},
"view-more": "더 보기"
"view-more": "더 보기",
"hero": {
"title": "개발자 문서",
"copy": "최신 API 레퍼런스를 확인하세요."
}
},
"declarations": {
"hide-other-declarations": "다른 선언 가리기",
Expand Down
6 changes: 5 additions & 1 deletion src/lang/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@
"view-symbol": "查看符号",
"view-sample-code": "查看示例代码"
},
"view-more": "查看更多"
"view-more": "查看更多",
"hero": {
"title": "开发者文档",
"copy": "浏览最新的 API 参考。"
}
},
"declarations": {
"hide-other-declarations": "隐藏其他声明",
Expand Down
2 changes: 2 additions & 0 deletions src/mixins/indexDataFetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ export default {
interfaceLanguages,
references = {},
} = await fetchData(this.indexDataPath);
const topLevelNodes = Object.values(interfaceLanguages || {}).flat();
const flatChildren = Object.freeze(flattenNavigationIndex(interfaceLanguages));
IndexStore.setFlatChildren(flatChildren);
IndexStore.setTopLevelNodes(topLevelNodes);
IndexStore.setTechnologyProps(extractTechnologyProps(interfaceLanguages));
IndexStore.setReferences(references);
IndexStore.setIncludedArchiveIdentifiers(includedArchiveIdentifiers);
Expand Down
9 changes: 9 additions & 0 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ import {
import ServerError from 'theme/views/ServerError.vue';
import NotFound from 'theme/views/NotFound.vue';

export const homeRoute = {
path: '/',
name: 'home-index',
component: () => import(
/* webpackChunkName: "home-index" */ 'theme/views/Index.vue'
),
};

export const fallbackRoutes = [
{
path: '*',
Expand Down Expand Up @@ -54,6 +62,7 @@ export const pagesRoutes = [
];

export default [
homeRoute,
...pagesRoutes,
...fallbackRoutes,
];
5 changes: 3 additions & 2 deletions src/setup-utils/SwiftDocCRenderRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ import {
restoreScrollOnReload,
scrollBehavior,
} from 'docc-render/utils/router-utils';
import routes, { fallbackRoutes } from 'docc-render/routes';
import { homeRoute, pagesRoutes, fallbackRoutes } from 'docc-render/routes';
import { baseUrl } from 'docc-render/utils/theme-settings';
import { addPrefixedRoutes } from 'docc-render/utils/route-utils';

const defaultRoutes = [
...addPrefixedRoutes(routes),
homeRoute,
...addPrefixedRoutes(pagesRoutes),
...fallbackRoutes,
];

Expand Down
5 changes: 5 additions & 0 deletions src/stores/IndexStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
export default {
state: {
flatChildren: null,
topLevelNodes: [],
references: {},
apiChanges: null,
apiChangesVersion: null,
Expand All @@ -21,6 +22,7 @@ export default {
},
reset() {
this.state.flatChildren = null;
this.state.topLevelNodes = [];
this.state.references = {};
this.state.apiChanges = null;
this.state.apiChangesVersion = null;
Expand All @@ -35,6 +37,9 @@ export default {
setReferences(references) {
this.state.references = references;
},
setTopLevelNodes(nodes) {
this.state.topLevelNodes = nodes || [];
},
setApiChanges(diff) {
this.state.apiChanges = diff;
},
Expand Down
Loading