diff --git a/src/components/generic/ALinkCollectionEditor.vue b/src/components/generic/ALinkCollectionEditor.vue index f1538125f84e08de5006bc9c5d7670208c64f0e0..a708eff7fa6cbf8aacd5543cbcdfef566c426933 100644 --- a/src/components/generic/ALinkCollectionEditor.vue +++ b/src/components/generic/ALinkCollectionEditor.vue @@ -1,6 +1,6 @@ <template> <fieldset> - <ul class="tw-flex tw-flex-col tw-gap-3 tw-p-0 tw-m-0 *:tw-block"> + <ul class="tw-flex tw-flex-col tw-gap-3 tw-p-0 tw-m-0 *:tw-block empty:tw-hidden"> <li v-for="(link, index) in links" :key="index"> <ALinkEditor v-model="links[index]" @@ -15,6 +15,7 @@ <ALinkEditor v-model="newLink" @check="maybeAddLink" /> </li> </ul> + <p v-if="disabled && links.length === 0">{{ t('link.noneSet') }}</p> </fieldset> </template> @@ -23,6 +24,7 @@ import { MappedErrorDetail } from '@rokoli/bnb' import { DefaultArray, ErrorDetailArray } from '@rokoli/bnb/drf' import { nextTick, ref } from 'vue' +import { useI18n } from '@/i18n' import { Link } from '@/types' import ALinkEditor from '@/components/generic/ALinkEditor.vue' @@ -34,6 +36,7 @@ const props = defineProps<{ }>() const emit = defineEmits<{ save: [] }>() +const { t } = useI18n() const newLink = ref<Link>({ typeId: null, url: '' }) async function maybeAddLink() { diff --git a/src/i18n/de.js b/src/i18n/de.js index 61b24d8b239d571f552a40f664eff96b6dc0af7c..68a9759f166f873c8f90a5b4db650f896d4ecc72 100644 --- a/src/i18n/de.js +++ b/src/i18n/de.js @@ -350,6 +350,7 @@ export default { link: { urlExample: 'z.B. https://aura.radio', + noneSet: 'Es wurden keine Links zugewiesen.', fields: { typeId: 'Linktyp', url: 'Web Adresse', diff --git a/src/i18n/en.js b/src/i18n/en.js index 976ffe9a79f342d83c46c17dbc36501c75a6da49..e4ac7217651cc555f3cc76357c44bf973d1072c8 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -351,6 +351,7 @@ export default { link: { urlExample: 'i.e. https://aura.radio', + noneSet: 'No links have been assigned.', fields: { typeId: 'Link type', url: 'Web Address',