Skip to content

Commit

Permalink
feat(front): 7.2问题优化汇总(closed #357)
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 14230
  • Loading branch information
hyunfa authored and wyyalt committed Aug 7, 2024
1 parent 968a513 commit 56c6933
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 12 deletions.
5 changes: 4 additions & 1 deletion web/src/components/Auth/AuthPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</div>
<p class="empty-footer">
<i18n path="快速了解GSEkit">
<span>{{ appName }}</span>
<span>{{ app_name }}</span>
<bk-button text theme="primary" class="reset-icon-btn" @click="handleClick('official')">
<span class="flex-content">
{{ $t('白皮书文档') }}<i class="ml6 gsekit-icon gsekit-icon-jump-fill"></i>
Expand All @@ -60,6 +60,9 @@ export default {
},
computed: {
...mapState(['bizId', 'appName']),
app_name() {
return this.$store.state.platform.i18n.name || this.appName
},
},
methods: {
...mapActions('iam', ['ajaxGetAuthApplyInfo']),
Expand Down
7 changes: 5 additions & 2 deletions web/src/components/Empty/EmptyProcess.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<div class="empty-process-container">
<div class="flex-top"></div>
<div class="empty-process-content" v-if="isEmptyPage">
<p class="empty-title">{{ $t('接入GSEKit进程管理', [appName]) }}</p>
<p class="empty-title">{{ $t('接入GSEKit进程管理', [app_name]) }}</p>
<p class="empty-sub-title">
<i18n tag="p" path="欢迎使用GSEKit">
<span>{{ appName }}</span>
<span>{{ app_name }}</span>
<bk-button text theme="primary" class="reset-icon-btn" @click="handleClick('document')">
<span class="flex-content">
{{ $t('帮助文档') }}<i class="gsekit-icon gsekit-icon-jump-fill"></i>
Expand Down Expand Up @@ -77,6 +77,9 @@ export default {
isEmptyPage() {
return this.emptyType === 'page';
},
app_name() {
return this.$store.state.platform.i18n.name || this.appName
},
},
methods: {
handleClick(type) {
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div class="bk-option-content-default">
<div class="bk-option-name">
<span class="gsekit-icon gsekit-icon-logout-fill"></span>
<span class="text">{{ $t('注销') }}</span>
<span class="text">{{ $t('退出登录') }}</span>
</div>
</div>
</div>
Expand Down Expand Up @@ -70,7 +70,7 @@ export default {
};
},
computed: {
...mapState(['username', 'appName']),
...mapState(['username', 'appName', 'language']),
showStaticRouter() {
return this.$store.state.showStaticRouter;
},
Expand Down
2 changes: 1 addition & 1 deletion web/src/language/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default {
静态文件加载失败请刷新页面重试: 'Static file loading failed, please refresh the page and try again',
// 首页
首页: 'Home',
注销: 'Logout',
退出登录: 'Sign out',
// 进程管理
进程状态: 'Process Status',
进程管理: 'Process Manage',
Expand Down
2 changes: 1 addition & 1 deletion web/src/language/lang/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default {
静态文件加载失败请刷新页面重试: '静态文件加载失败,请刷新页面重试',
// 首页
首页: '首页',
注销: '注销',
退出登录: '退出登录',
// 进程管理
进程状态: '进程状态',
进程管理: '进程管理',
Expand Down
15 changes: 10 additions & 5 deletions web/src/store/modules/platform-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,23 @@ export default {
},
actions: {
async getConfig(context) {
const url = `${window.PROJECT_CONFIG?.BKPAAS_SHARED_RES_URL}/gsekit/base.js`
const config = await getPlatformConfig(url, {
const defaults = {
name: 'GSEKit',
nameEn: 'GSEKit',
appLogo: logoSrc,
brandName: '腾讯蓝鲸智云',
brandName: '蓝鲸智云',
brandNameEn: 'BlueKing',
favicon: logoSrc,
helperLink: window.PROJECT_CONFIG.BKAPP_NAV_HELPER_URL,
helperText: window.i18n.t('联系BK助手'),
});

}
let config;
if (window.PROJECT_CONFIG?.BKPAAS_SHARED_RES_URL) {
const url = `${window.PROJECT_CONFIG?.BKPAAS_SHARED_RES_URL}/gsekit/base.js`;
config = await getPlatformConfig(url, defaults);
} else {
config = await getPlatformConfig(defaults);
}
context.commit('updatePlatformConfig', config);
}
}
Expand Down

0 comments on commit 56c6933

Please sign in to comment.