Skip to content

Commit a4bb70d

Browse files
authored
Merge pull request #520 from tapdata/TAP-9676-support-client-id-4.12
fix(TAP-9676): [to 4.12]support client Id edit
2 parents 28501cc + 94707dd commit a4bb70d

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

apps/daas/src/i18n/langs/en.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ export default {
228228
application_show_menu: 'Show to the menu',
229229
application_true: 'Yes',
230230
application_false: 'No',
231+
application_client_id_placeholder: 'Can be left empty, system will auto-generate',
232+
//api 监控
231233
application_create: 'Create Client',
232234
application_edit: 'Edit client',
233235
api_monitor_total_totalCount: 'Total number of APIs',

apps/daas/src/i18n/langs/zh-CN.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ export default {
225225
application_true: '是',
226226
application_false: '否',
227227
application_create: '创建客户端',
228+
application_client_id_placeholder: '可留空,系统将自动生成',
228229
application_edit: '编辑客户端',
229230
//api 监控
230231
api_monitor_total_totalCount: 'API总数',

apps/daas/src/i18n/langs/zh-TW.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ export default {
225225
application_true: '是',
226226
application_false: '否',
227227
application_create: '創建客戶端',
228+
application_client_id_placeholder: '可留空,系統將自動生成',
228229
application_edit: '編輯客戶端',
229230
//api 监控
230231
api_monitor_total_totalCount: 'API總數',

apps/daas/src/views/api-page/Applications.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export default {
3030
roles: [],
3131
createForm: {
3232
clientName: '',
33+
clientId: '',
3334
grantTypes: [],
3435
clientSecret: '',
3536
scopes: [],
@@ -63,6 +64,7 @@ export default {
6364
this.createDialogVisible = true
6465
this.createForm = {
6566
clientName: '',
67+
clientId: '',
6668
grantTypes: ['implicit', 'client_credentials'],
6769
clientSecret: '',
6870
scopes: [],
@@ -112,6 +114,11 @@ export default {
112114
params.redirectUris = params.redirectUrisStr?.split(',') || []
113115
delete params.redirectUrisStr
114116
117+
// 如果clientId为空,则不传递该字段
118+
if (!params.clientId || params.clientId.trim() === '') {
119+
delete params['clientId']
120+
}
121+
115122
this.$refs.form.validate((valid) => {
116123
if (valid) {
117124
method(params).then(() => {
@@ -335,6 +342,9 @@ export default {
335342
>
336343
<ElInput v-model="createForm.clientName" />
337344
</ElFormItem>
345+
<ElFormItem :label="$t('application_header_id')" prop="clientId">
346+
<ElInput v-model="createForm.clientId" :placeholder="$t('application_client_id_placeholder')"></ElInput>
347+
</ElFormItem>
338348
<ElFormItem
339349
:label="$t('application_header_grant_type')"
340350
required

0 commit comments

Comments
 (0)