Skip to content

Commit

Permalink
feat(frontend): 添加产品文档入口 #8572
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 26634
  • Loading branch information
royalpioneer committed Dec 12, 2024
1 parent acd943e commit 700e879
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
15 changes: 14 additions & 1 deletion dbm-ui/frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
@click="handleShowSystemVersionLog">
{{ t('版本日志') }}
</div>
<div
class="item"
@click="linkToDoc">
{{ t('产品文档') }}
</div>
</template>
</BkPopover>
<BkPopover
Expand Down Expand Up @@ -64,7 +69,7 @@
import { useSQLTaskNotify } from '@hooks';
import { useUserProfile } from '@stores';
import { useSystemEnviron, useUserProfile } from '@stores';
import DbRouterView from '@components/db-router-view/Index.vue';
import LocaleSwitch from '@components/locale-switch/Index.vue';
Expand All @@ -83,6 +88,7 @@
const userProfileStore = useUserProfile();
userProfileStore.fetchProfile();
const { t, locale } = useI18n();
const systemEnvironStore = useSystemEnviron();
const documentTitles: Record<string, string> = {
en: 'DBM | Tencent BlueKing',
Expand Down Expand Up @@ -111,6 +117,13 @@
isShowSystemVersionLog.value = true;
};
const linkToDoc = () => {
const url = systemEnvironStore.urls.BK_HELPER_URL;
if (url) {
window.open(url, '_blank');
}
};
const handleSignOut = () => {
InfoBox({
title: t('确认退出登录'),
Expand Down
1 change: 1 addition & 0 deletions dbm-ui/frontend/src/locales/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -3714,5 +3714,6 @@
"% 不能单独使用": "% 不能单独使用",
"访问 DB 名必须合法": "访问 DB 名必须合法",
"请输入访问DB名_以字母开头_支持 % 通配符 或 % 单独使用代表ALL_多个使用英文逗号_分号或换行分隔": "请输入访问DB名,以字母开头,支持 % 通配符 或 % 单独使用代表ALL。多个使用英文逗号、分号或换行分隔",
"产品文档": "产品文档",
"这行勿动!新增翻译请在上一行添加!": ""
}

0 comments on commit 700e879

Please sign in to comment.