feat(core): Show Public API key value only once (no-changelog) (#10126)

This commit is contained in:
Ricardo Espinoza
2024-07-29 14:13:54 -04:00
committed by GitHub
parent de50ef7590
commit cf70b06545
7 changed files with 42 additions and 14 deletions

View File

@@ -43,11 +43,13 @@
:copy-button-text="$locale.baseText('generic.clickToCopy')"
:toast-title="$locale.baseText('settings.api.view.copy.toast')"
:redact-value="true"
:disable-copy="isRedactedApiKey"
:hint="!isRedactedApiKey ? $locale.baseText('settings.api.view.copy') : ''"
@copy="onCopy"
/>
</div>
</n8n-card>
<div :class="$style.hint">
<div v-if="!isRedactedApiKey" :class="$style.hint">
<n8n-text size="small">
{{
$locale.baseText(`settings.api.view.${swaggerUIEnabled ? 'tryapi' : 'more-details'}`)
@@ -146,6 +148,9 @@ export default defineComponent({
isPublicApiEnabled(): boolean {
return this.settingsStore.isPublicApiEnabled;
},
isRedactedApiKey(): boolean {
return this.apiKey.includes('*');
},
},
methods: {
onUpgrade() {