|
54 | 54 | :params="credentialParamsForProvider(item.key)" |
55 | 55 | :label-format="credentialLabelFormat" |
56 | 56 | :extra-opts="credentialExtraOpts(openclawProviderCredentialId[item.key])" |
57 | | - :selectProps="{ placeholder: $t('common.tips.select', [$t('aice.container_secret')]) }" |
| 57 | + :selectProps="{ placeholder: $t('common.tips.select', [$t('aice.container_secret')]), optionLabelProp: 'label' }" |
58 | 58 | @change="val => onProviderCredentialChange(item.key, val)" /> |
59 | 59 | </a-form-item> |
60 | 60 | <a-form-item :label="$t('aice.container_secret.export_keys')" :extra="$t('aice.container_secret.export_keys_tip')"> |
|
159 | 159 | :params="credentialParamsForChannel(section.sectionKey)" |
160 | 160 | :label-format="credentialLabelFormat" |
161 | 161 | :extra-opts="credentialExtraOpts(openclawChannelCredentialId[section.sectionKey])" |
162 | | - :selectProps="{ placeholder: $t('common.tips.select', [$t('aice.container_secret')]) }" |
| 162 | + :selectProps="{ placeholder: $t('common.tips.select', [$t('aice.container_secret')]), optionLabelProp: 'label' }" |
163 | 163 | @change="val => onChannelCredentialChange(section.sectionKey, val)" /> |
164 | 164 | </a-form-item> |
165 | 165 | <a-form-item :label="$t('aice.container_secret.export_keys')" :extra="$t('aice.container_secret.export_keys_tip')"> |
@@ -542,6 +542,9 @@ export default { |
542 | 542 | this.ensureProviderState(labelKey) |
543 | 543 | const cred = p.credential || {} |
544 | 544 | if (cred.id) { |
| 545 | + if (cred.name) { |
| 546 | + this.$set(this.credentialNameMap, String(cred.id), cred.name) |
| 547 | + } |
545 | 548 | this.$set(this.openclawProviderCredentialMode, labelKey, 'existing') |
546 | 549 | this.$set(this.openclawProviderCredentialId, labelKey, cred.id) |
547 | 550 | const exportKeys = cred.export_keys || [] |
@@ -570,6 +573,9 @@ export default { |
570 | 573 | this.ensureChannelState(key) |
571 | 574 | const cred = item.credential || {} |
572 | 575 | if (cred.id) { |
| 576 | + if (cred.name) { |
| 577 | + this.$set(this.credentialNameMap, String(cred.id), cred.name) |
| 578 | + } |
573 | 579 | this.$set(this.openclawChannelCredentialMode, key, 'existing') |
574 | 580 | this.$set(this.openclawChannelCredentialId, key, cred.id) |
575 | 581 | const exportKeys = cred.export_keys || [] |
@@ -599,6 +605,9 @@ export default { |
599 | 605 | const cred = item.credential || item || {} |
600 | 606 | const id = cred.id |
601 | 607 | if (id) { |
| 608 | + if (cred.name) { |
| 609 | + this.$set(this.credentialNameMap, String(id), cred.name) |
| 610 | + } |
602 | 611 | this.$set(this.openclawChannelCredentialMode, key, 'existing') |
603 | 612 | this.$set(this.openclawChannelCredentialId, key, id) |
604 | 613 | const exportKeys = cred.export_keys || [] |
@@ -656,6 +665,11 @@ export default { |
656 | 665 | if (!credentialId) return [] |
657 | 666 | const manager = new this.$Manager('credentials', 'v1') |
658 | 667 | const { data } = await manager.get({ id: credentialId }) |
| 668 | + const idStr = String(credentialId) |
| 669 | + const credName = data && data.name |
| 670 | + if (credName) { |
| 671 | + this.$set(this.credentialNameMap, idStr, credName) |
| 672 | + } |
659 | 673 | const blob = data?.blob |
660 | 674 | let obj = blob |
661 | 675 | if (typeof blob === 'string') { |
|
0 commit comments