diff options
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/src/actions/enterCredentialsAction.ts | 13 | ||||
-rw-r--r-- | apps/files_external/src/views/CredentialsDialog.vue | 2 |
2 files changed, 12 insertions, 3 deletions
diff --git a/apps/files_external/src/actions/enterCredentialsAction.ts b/apps/files_external/src/actions/enterCredentialsAction.ts index 50698d1e83a..580f15ad876 100644 --- a/apps/files_external/src/actions/enterCredentialsAction.ts +++ b/apps/files_external/src/actions/enterCredentialsAction.ts @@ -59,8 +59,10 @@ async function setCredentials(node: Node, login: string, password: string): Prom return true } +export const ACTION_CREDENTIALS_EXTERNAL_STORAGE = 'credentials-external-storage' + export const action = new FileAction({ - id: 'credentials-external-storage', + id: ACTION_CREDENTIALS_EXTERNAL_STORAGE, displayName: () => t('files', 'Enter missing credentials'), iconSvgInline: () => LoginSvg, @@ -93,7 +95,14 @@ export const action = new FileAction({ )) if (login && password) { - return await setCredentials(node, login, password) + try { + await setCredentials(node, login, password) + showSuccess(t('files_external', 'Credentials successfully set')) + } catch (error) { + showError(t('files_external', 'Error while setting credentials: {error}', { + error: (error as Error).message, + })) + } } return null diff --git a/apps/files_external/src/views/CredentialsDialog.vue b/apps/files_external/src/views/CredentialsDialog.vue index 86ff533f4b3..1d506628f6d 100644 --- a/apps/files_external/src/views/CredentialsDialog.vue +++ b/apps/files_external/src/views/CredentialsDialog.vue @@ -76,7 +76,7 @@ export default defineComponent({ computed: { dialogButtons() { return [{ - label: t('files_external', 'Submit'), + label: t('files_external', 'Confirm'), type: 'primary', nativeType: 'submit', }] |