Skip to content

Commit

Permalink
Introduce the UI & bind properties to show the invalid credentials wa…
Browse files Browse the repository at this point in the history
…rning
  • Loading branch information
LSViana committed Oct 16, 2024
1 parent 8053b72 commit 327c16c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions components/applications/worklog-tracker/WlWorklogAuthForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<label for="password">Password</label>
<WlInput id="password" v-model="password" label="Password" type="password" placeholder="••••••••"/>
<WlButton variant="primary" type="submit">Login</WlButton>
<div v-if="props.invalidCredentials" class="flex items-center justify-center gap-2 text-warning-400">
<WlTriangleExclamationIcon/>
<span>Invalid credentials</span>
</div>
</form>
</div>
</template>
Expand All @@ -16,11 +20,17 @@ import { ref } from 'vue'
import WlButton from '~/components/experiments/forms-input/buttons/WlButton.vue'
import WlInput from '~/components/experiments/forms-input/input/WlInput.vue'
import WlTriangleExclamationIcon from '~/components/shared/icons/static/WlTriangleExclamationIcon.vue'
type Props = {
invalidCredentials: boolean;
}
type Emits = {
(e: 'login', email: string, password: string): void
}
const props = defineProps<Props>()
const emit = defineEmits<Emits>()
const email = ref('')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/>
<WlWorklogList :selected-index="selectedIndex" :items="worklogList.value" @select="listeners.select"/>
</template>
<WlWorklogAuthForm v-else @login="listeners.login"/>
<WlWorklogAuthForm v-else :invalid-credentials="worklogAuth.invalidCredentials.value" @login="listeners.login"/>
</template>

<script setup lang="ts">
Expand Down

0 comments on commit 327c16c

Please sign in to comment.