Skip to content

Commit 4c9e648

Browse files
authored
fix: backwards compatibility for kalert (#1484)
1 parent 33c3c2e commit 4c9e648

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

src/components/ErrorMessage.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<template>
2+
<!-- NOTE: alert-message is added for backwards compatibility of host apps that arent using kongponents alpha -->
23
<KAlert
4+
:alert-message="errorMessage"
35
appearance="danger"
46
class="kong-auth-error-message error-message"
57
data-testid="kong-auth-error-message"

src/components/ForgotPasswordForm.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
<ErrorMessage :error="error" />
55
</div>
66
<div v-else-if="currentState.matches('success')">
7+
<!-- NOTE: alert-message is added for backwards compatibility of host apps that arent using kongponents alpha -->
78
<KAlert
9+
:alert-message="successText"
810
appearance="info"
911
class="form-error"
1012
data-testid="kong-auth-forgot-password-success-message"

src/components/LoginForm.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@
4242
</div>
4343

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

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

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

0 commit comments

Comments
 (0)