Skip to content

Commit 7a7b596

Browse files
xbsura11000100111010101100111
authored andcommitted
feat: support client Id edit
1 parent 7cc6f45 commit 7a7b596

File tree

5 files changed

+9449
-5802
lines changed

5 files changed

+9449
-5802
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ export default {
230230
application_false: 'No',
231231
application_create: 'Create Client',
232232
application_edit: 'Edit client',
233+
application_client_id_placeholder: 'Can be left empty, system will auto-generate',
234+
//api 监控
233235
api_monitor_total_totalCount: 'Total number of APIs',
234236
api_monitor_total_warningApiCount: 'Total API Access',
235237
api_monitor_total_warningVisitCount: 'Total API Access Warning',
@@ -466,10 +468,10 @@ export default {
466468
setting_Default_Limit: 'The number of rows returned by the default query',
467469
setting_Max_Limit: 'Maximum number of rows returned by the query',
468470
setting_Desensitize_API_request_parameters:
469-
471+
470472
'Desensitize API request parameters',
471473
'setting_Timeout_period_for_API_access_to_the_database_(millisecond)':
472-
474+
473475
'The timeout period for API access to the database (millisecond)',
474476
setting_Send_batch_size: 'Number of packed data',
475477
setting_hint_Send_batch_size: 'Number of packed data',

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

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

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ export default {
226226
application_false: '否',
227227
application_create: '創建客戶端',
228228
application_edit: '編輯客戶端',
229+
application_client_id_placeholder: '可留空,系統將自動生成',
229230
//api 监控
230231
api_monitor_total_totalCount: 'API總數',
231232
api_monitor_total_warningApiCount: '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" size="mini" :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)