Skip to content

Commit

Permalink
fix: backwards compatibility for kalert (#1484)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidma415 authored Apr 15, 2024
1 parent 33c3c2e commit 4c9e648
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/ErrorMessage.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template>
<!-- NOTE: alert-message is added for backwards compatibility of host apps that arent using kongponents alpha -->
<KAlert
:alert-message="errorMessage"
appearance="danger"
class="kong-auth-error-message error-message"
data-testid="kong-auth-error-message"
Expand Down
2 changes: 2 additions & 0 deletions src/components/ForgotPasswordForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<ErrorMessage :error="error" />
</div>
<div v-else-if="currentState.matches('success')">
<!-- NOTE: alert-message is added for backwards compatibility of host apps that arent using kongponents alpha -->
<KAlert
:alert-message="successText"
appearance="info"
class="form-error"
data-testid="kong-auth-forgot-password-success-message"
Expand Down
6 changes: 6 additions & 0 deletions src/components/LoginForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
</div>

<div v-else-if="currentState.matches('reset_password')" class="form-error">
<!-- NOTE: alert-message is added for backwards compatibility of host apps that arent using kongponents alpha -->
<KAlert
:alert-message="messages.login.passwordResetSuccess"
appearance="success"
class="justify-content-center"
data-testid="kong-auth-login-password-reset-message"
Expand All @@ -51,7 +53,9 @@
</div>

<div v-else-if="currentState.matches('confirmed_email')" class="form-error">
<!-- NOTE: alert-message is added for backwards compatibility of host apps that arent using kongponents alpha -->
<KAlert
:alert-message="messages.login.confirmedEmailSuccess"
appearance="success"
class="justify-content-center"
data-testid="kong-auth-login-confirmed-email-message"
Expand All @@ -60,7 +64,9 @@
</div>

<div v-else-if="currentState.matches('from_register')" class="form-error">
<!-- NOTE: alert-message is added for backwards compatibility of host apps that arent using kongponents alpha -->
<KAlert
:alert-message="registerSuccessText"
appearance="success"
class="justify-content-center"
data-testid="kong-auth-login-register-success-message"
Expand Down

0 comments on commit 4c9e648

Please sign in to comment.