From 301e38683068b38d0d8eba9c4cf32b7ef6b50a3c Mon Sep 17 00:00:00 2001 From: Konrad Mohrfeldt <km@roko.li> Date: Thu, 30 May 2024 14:55:50 +0200 Subject: [PATCH] feat: add profile search refs #219 --- src/Pages/ProfileList.vue | 17 +++++++++++++++++ src/i18n/de.js | 2 ++ src/i18n/en.js | 2 ++ 3 files changed, 21 insertions(+) diff --git a/src/Pages/ProfileList.vue b/src/Pages/ProfileList.vue index d380baaf..44b22470 100644 --- a/src/Pages/ProfileList.vue +++ b/src/Pages/ProfileList.vue @@ -1,6 +1,22 @@ <template> <PageHeader :title="t('profileList.title')" /> + <div class="tw-flex tw-gap-6 tw-justify-end tw-items-center tw-mb-6"> + <FormGroup class="tw-m-0"> + <template #iconLeft="attrs"> + <icon-system-uicons-search v-bind="attrs" /> + </template> + <template #default="attrs"> + <input + v-model="searchTerm" + v-bind="attrs" + :aria-label="t('profileList.searchLabel')" + :placeholder="t('profileList.searchPlaceholder')" + /> + </template> + </FormGroup> + </div> + <ATable v-model:page="page" v-model:items-per-page="profilesPerPage" @@ -63,6 +79,7 @@ import PageHeader from '@/components/PageHeader.vue' import { useI18n } from '@/i18n' import AColorBadge from '@/components/generic/AColorBadge.vue' import Image from '@/components/generic/Image.vue' +import FormGroup from '@/components/generic/FormGroup.vue' const { t } = useI18n() const hostStore = useHostStore() diff --git a/src/i18n/de.js b/src/i18n/de.js index 4e5a925b..25192165 100644 --- a/src/i18n/de.js +++ b/src/i18n/de.js @@ -247,6 +247,8 @@ export default { profileList: { title: 'Profile', + searchLabel: 'Suche nach Namen', + searchPlaceholder: 'Name des Profils...', }, profileDetails: { diff --git a/src/i18n/en.js b/src/i18n/en.js index ff507ee7..ec1d7a19 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -247,6 +247,8 @@ export default { profileList: { title: 'Profiles', + searchLabel: 'Search by name', + searchPlaceholder: 'Name of the profile...', }, profileDetails: { -- GitLab