islongEvents -> isLongEvents

This commit is contained in:
Massedil
2024-11-21 20:23:40 +01:00
committed by setop
parent 71c0ce37a9
commit f6c273f6f3
4 changed files with 70 additions and 4 deletions

View File

@@ -716,6 +716,7 @@ const GROUP_PAGE_LIMIT = 16;
const { features } = useFeatures();
const { eventCategories } = useEventCategories();
const { isLongEvents } = useIsLongEvents();
const orderedCategories = computed(() => {
if (!eventCategories.value) return [];
@@ -828,6 +829,36 @@ const searchIsUrl = computed((): boolean => {
return url.protocol === "http:" || url.protocol === "https:";
});
const contentTypeMapping = computed(() => {
if (isLongEvents.value) {
return [
{
contentType: ContentType.EVENTS,
label: t("Events"),
},
{
contentType: ContentType.LONGEVENTS,
label: t("Activities"),
},
{
contentType: ContentType.GROUPS,
label: t("Groups"),
},
];
} else {
return [
{
contentType: ContentType.EVENTS,
label: t("Events"),
},
{
contentType: ContentType.GROUPS,
label: t("Groups"),
},
];
}
});
const eventStatuses = computed(() => {
return [
{