mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-12 16:10:30 +02:00
fix(editor): Allow users to logout of dynamic creds in chathub (#29117)
This commit is contained in:
parent
1d325a20ca
commit
b1ddbf26b0
|
|
@ -549,6 +549,7 @@
|
|||
"chatHub.chat.header.button.editAgent": "Edit Agent",
|
||||
"chatHub.chat.header.button.newChat": "New Chat",
|
||||
"chatHub.chat.header.button.openWorkflow": "Open Workflow",
|
||||
"chatHub.chat.header.button.manageConnections": "Manage connections",
|
||||
"chatHub.chat.prompt.microphone.accessDenied": "Microphone access denied",
|
||||
"chatHub.chat.prompt.microphone.allowAccess": "Please allow microphone access to use voice input",
|
||||
"chatHub.chat.prompt.microphone.noSpeech": "No speech detected. Please try again",
|
||||
|
|
|
|||
|
|
@ -715,12 +715,16 @@ function onFilesDropped(files: File[]) {
|
|||
:show-artifact-icon="
|
||||
artifacts.allArtifacts.value.length > 0 && artifacts.isViewerCollapsed.value
|
||||
"
|
||||
:has-dynamic-credentials="dynamicCreds.hasDynamicCredentials.value"
|
||||
@select-model="handleSelectModel"
|
||||
@edit-custom-agent="handleEditAgent"
|
||||
@create-custom-agent="openNewAgentCreator"
|
||||
@select-credential="selectCredential"
|
||||
@open-workflow="handleOpenWorkflow"
|
||||
@reopen-artifact="artifacts.handleOpenViewer"
|
||||
@toggle-dynamic-credentials="
|
||||
isDynamicCredentialsDrawerOpen = !isDynamicCredentialsDrawerOpen
|
||||
"
|
||||
/>
|
||||
|
||||
<N8nScrollArea
|
||||
|
|
|
|||
|
|
@ -13,11 +13,18 @@ import { useI18n } from '@n8n/i18n';
|
|||
import { computed, useTemplateRef, watch, ref } from 'vue';
|
||||
import { useChatStore } from '../chat.store';
|
||||
|
||||
const { selectedModel, credentials, readyToShowModelSelector, showArtifactIcon } = defineProps<{
|
||||
const {
|
||||
selectedModel,
|
||||
credentials,
|
||||
readyToShowModelSelector,
|
||||
showArtifactIcon,
|
||||
hasDynamicCredentials,
|
||||
} = defineProps<{
|
||||
selectedModel: ChatModelDto | null;
|
||||
credentials: CredentialsMap | null;
|
||||
readyToShowModelSelector: boolean;
|
||||
showArtifactIcon: boolean;
|
||||
hasDynamicCredentials: boolean;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
|
@ -28,6 +35,7 @@ const emit = defineEmits<{
|
|||
selectCredential: [provider: ChatHubProvider, credentialId: string | null];
|
||||
openWorkflow: [workflowId: string];
|
||||
reopenArtifact: [];
|
||||
toggleDynamicCredentials: [];
|
||||
}>();
|
||||
|
||||
const modelSelectorRef = useTemplateRef('modelSelectorRef');
|
||||
|
|
@ -110,6 +118,16 @@ defineExpose({
|
|||
icon="panel-right"
|
||||
@click="emit('reopenArtifact')"
|
||||
/>
|
||||
<N8nIconButton
|
||||
v-if="hasDynamicCredentials"
|
||||
variant="subtle"
|
||||
size="small"
|
||||
icon="key-round"
|
||||
:title="i18n.baseText('chatHub.chat.header.button.manageConnections')"
|
||||
:aria-label="i18n.baseText('chatHub.chat.header.button.manageConnections')"
|
||||
data-testid="manage-dynamic-credentials-button"
|
||||
@click="emit('toggleDynamicCredentials')"
|
||||
/>
|
||||
<N8nButton
|
||||
v-if="showOpenWorkflow"
|
||||
variant="subtle"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user