Skip to content

Commit

Permalink
fix: S-mart 应用不能在页面上修改基本信息、可见范围展示修复
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 13469
  • Loading branch information
leafage-collb committed Jul 30, 2024
1 parent b63d498 commit c0f563c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions webfe/package_vue/src/components/authentication-info.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
</span>
</template>
</bk-table-column>
<bk-table-column :label="$t('操作')" :width="120">
<bk-table-column :label="$t('操作')" :width="localLanguage === 'en' ? 150 : 120">
<template slot-scope="props">
<a
v-bk-tooltips.light="disabledTooltipsConfig"
Expand Down Expand Up @@ -287,7 +287,7 @@
:disabled="!option.enabled"
>
<span>{{ option.bk_app_secret }}</span>
({{ option.enabled ? $t('创建时间:') + smartTime(option.created_at, 'smartShorten') : $t('已禁用') }})
({{ option.enabled ? `${$t('创建时间')}: ` + smartTime(option.created_at, 'smartShorten') : $t('已禁用') }})
</bk-option>
<div
slot="extension"
Expand Down Expand Up @@ -423,6 +423,9 @@ export default {
isAddNewSecret() {
return this.appSecretList.length < 2;
},
localLanguage() {
return this.$store.state.localLanguage;
},
},
watch: {
appCode() {
Expand Down
2 changes: 1 addition & 1 deletion webfe/package_vue/src/language/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ export default {
申请记录: 'APP Record',
基本信息: 'Basic Information',
'基本信息-title': 'Basic information',
'应用名称等基本信息请在“app.yaml”文件中配置': 'For basic information such as the APP name, please configure it in the "app.yaml" file',
'应用名称等基本信息请在应用描述文件 app_desc.yaml 中配置': 'Please configure basic information such as the application name in the application description file app_desc.yaml',
'管理员、开发者和运营者可以修改应用名称等基本信息': 'Administrators, developers and operators can modify basic information such as the APP name',
应用logo: 'APP logo',
更换图片: 'Change',
Expand Down
2 changes: 1 addition & 1 deletion webfe/package_vue/src/language/lang/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ export default {
申请记录: '申请记录',
基本信息: '基本信息',
'基本信息-title': '基本信息',
'应用名称等基本信息请在“app.yaml”文件中配置': '应用名称等基本信息请在“app.yaml”文件中配置',
'应用名称等基本信息请在应用描述文件 app_desc.yaml 中配置': '应用名称等基本信息请在应用描述文件 app_desc.yaml 中配置',
'管理员、开发者和运营者可以修改应用名称等基本信息': '管理员、开发者和运营者可以修改应用名称等基本信息',
应用logo: '应用logo',
更换图片: '更换图片',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
v-if="isSmartApp"
class="info"
>
{{ $t('应用名称等基本信息请在“app.yaml”文件中配置') }}
{{ $t('应用名称等基本信息请在应用描述文件 app_desc.yaml 中配置') }}
</div>
<div
v-else
Expand Down Expand Up @@ -296,6 +296,7 @@ export default {
return this.curAppInfo.role.name !== 'operator';
},
isBasicInfoEditable() {
if (this.isSmartApp) return false;
return ['administrator', 'operator'].indexOf(this.curAppInfo.role.name) !== -1;
},
formRemoveValidated() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export default {
handler(newVal) {
this.baseInfo = cloneDeep(newVal);
},
deep: true,
immediate: true,
},
},
Expand Down

0 comments on commit c0f563c

Please sign in to comment.