Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/daas/src/i18n/langs/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ export default {
application_show_menu: 'Show to the menu',
application_true: 'Yes',
application_false: 'No',
application_client_id_placeholder: 'Can be left empty, system will auto-generate',
//api 监控
application_create: 'Create Client',
application_edit: 'Edit client',
api_monitor_total_totalCount: 'Total number of APIs',
Expand Down
1 change: 1 addition & 0 deletions apps/daas/src/i18n/langs/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export default {
application_true: '是',
application_false: '否',
application_create: '创建客户端',
application_client_id_placeholder: '可留空,系统将自动生成',
application_edit: '编辑客户端',
//api 监控
api_monitor_total_totalCount: 'API总数',
Expand Down
1 change: 1 addition & 0 deletions apps/daas/src/i18n/langs/zh-TW.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export default {
application_true: '是',
application_false: '否',
application_create: '創建客戶端',
application_client_id_placeholder: '可留空,系統將自動生成',
application_edit: '編輯客戶端',
//api 监控
api_monitor_total_totalCount: 'API總數',
Expand Down
10 changes: 10 additions & 0 deletions apps/daas/src/views/api-page/Applications.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default {
roles: [],
createForm: {
clientName: '',
clientId: '',
grantTypes: [],
clientSecret: '',
scopes: [],
Expand Down Expand Up @@ -63,6 +64,7 @@ export default {
this.createDialogVisible = true
this.createForm = {
clientName: '',
clientId: '',
grantTypes: ['implicit', 'client_credentials'],
clientSecret: '',
scopes: [],
Expand Down Expand Up @@ -112,6 +114,11 @@ export default {
params.redirectUris = params.redirectUrisStr?.split(',') || []
delete params.redirectUrisStr

// 如果clientId为空,则不传递该字段
if (!params.clientId || params.clientId.trim() === '') {
delete params['clientId']
}

this.$refs.form.validate((valid) => {
if (valid) {
method(params).then(() => {
Expand Down Expand Up @@ -335,6 +342,9 @@ export default {
>
<ElInput v-model="createForm.clientName" />
</ElFormItem>
<ElFormItem :label="$t('application_header_id')" prop="clientId">
<ElInput v-model="createForm.clientId" :placeholder="$t('application_client_id_placeholder')"></ElInput>
</ElFormItem>
<ElFormItem
:label="$t('application_header_grant_type')"
required
Expand Down