-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from beabee-communityrm/feat/newsletter-group-…
…settings feat: add groups to membership builder
- Loading branch information
Showing
12 changed files
with
200 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,36 @@ | ||
<!-- eslint-disable vue/no-mutating-props --> | ||
<template> | ||
<div> | ||
<div v-for="(link, i) in modelValue" :key="i" class="mb-4 flex gap-4"> | ||
<AppRepeatable | ||
:model-value="modelValue" | ||
:new-item="() => ({ text: '', url: '' })" | ||
:add-label="t('adminSettings.general.footer.otherLinks.add')" | ||
> | ||
<template #default="{ item }"> | ||
<div class="flex-1"> | ||
<AppInput | ||
v-model="modelValue[i].text" | ||
v-model="item.text" | ||
:label="t('adminSettings.general.footer.otherLinks.linkText')" | ||
required | ||
/> | ||
</div> | ||
<div class="flex-1"> | ||
<AppInput | ||
v-model="modelValue[i].url" | ||
v-model="item.url" | ||
:label="t('adminSettings.general.footer.otherLinks.url')" | ||
type="text" | ||
required | ||
/> | ||
</div> | ||
<div class="flex-0 self-end"> | ||
<button | ||
class="-ml-2 p-2 leading-tight text-primary-80 hover:text-primary" | ||
type="button" | ||
@click="removeLink(i)" | ||
> | ||
<font-awesome-icon :icon="faTimes" /> | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<AppButton | ||
variant="primaryOutlined" | ||
size="sm" | ||
:icon="faPlus" | ||
@click="addLink" | ||
> | ||
{{ t('adminSettings.general.footer.otherLinks.add') }} | ||
</AppButton> | ||
</div> | ||
</template> | ||
</AppRepeatable> | ||
</template> | ||
<script lang="ts" setup> | ||
import { faPlus, faTimes } from '@fortawesome/free-solid-svg-icons'; | ||
import { useI18n } from 'vue-i18n'; | ||
import AppButton from '../button/AppButton.vue'; | ||
import AppInput from './AppInput.vue'; | ||
import AppRepeatable from './AppRepeatable.vue'; | ||
const props = defineProps<{ | ||
defineProps<{ | ||
modelValue: { text: string; url: string }[]; | ||
}>(); | ||
const { t } = useI18n(); | ||
|
||
function addLink() { | ||
// eslint-disable-next-line vue/no-mutating-props | ||
props.modelValue.push({ text: '', url: '' }); | ||
} | ||
|
||
function removeLink(n: number) { | ||
// eslint-disable-next-line vue/no-mutating-props | ||
props.modelValue.splice(n, 1); | ||
} | ||
</script> |
Oops, something went wrong.