1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-21 23:44:30 +00:00

issue #1574 - home page & search page : 3 buttons for search

This commit is contained in:
Laurent GAY 2024-11-27 16:16:15 +01:00 committed by setop
parent 71cc09dd7a
commit 4489743853
3 changed files with 1 additions and 67 deletions

View file

@ -58,7 +58,7 @@
class="search-Activity min-w-40 mr-1 mb-1"
native-type="submit"
icon-left="calendar-star"
v-if="search == null && isLongEvents"
v-if="isLongEvents"
>
{{ t("Activities") }}
</o-button>

View file

@ -179,39 +179,6 @@
<ul
class="flex flex-col md:flex-row md:space-x-8 mt-2 md:mt-0 md:font-lightbold"
>
<li class="m-auto">
<router-link
:to="{
...$route,
name: RouteName.SEARCH,
query: { ...$route.query, contentType: 'EVENTS' },
}"
class="block py-2 pr-4 pl-3 text-zinc-700 border-b border-gray-100 hover:bg-zinc-50 md:hover:bg-transparent md:border-0 md:hover:text-mbz-purple-700 md:p-0 dark:text-zinc-400 md:dark:hover:text-white dark:hover:bg-zinc-700 dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700"
>{{ t("Events") }}</router-link
>
</li>
<li class="m-auto" v-if="isLongEvents">
<router-link
:to="{
...$route,
name: RouteName.SEARCH,
query: { ...$route.query, contentType: 'LONGEVENTS' },
}"
class="block py-2 pr-4 pl-3 text-zinc-700 border-b border-gray-100 hover:bg-zinc-50 md:hover:bg-transparent md:border-0 md:hover:text-mbz-purple-700 md:p-0 dark:text-zinc-400 md:dark:hover:text-white dark:hover:bg-zinc-700 dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700"
>{{ t("Activities") }}</router-link
>
</li>
<li class="m-auto">
<router-link
:to="{
...$route,
name: RouteName.SEARCH,
query: { ...$route.query, contentType: 'GROUPS' },
}"
class="block py-2 pr-4 pl-3 text-zinc-700 border-b border-gray-100 hover:bg-zinc-50 md:hover:bg-transparent md:border-0 md:hover:text-mbz-purple-700 md:p-0 dark:text-zinc-400 md:dark:hover:text-white dark:hover:bg-zinc-700 dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700"
>{{ t("Groups") }}</router-link
>
</li>
<li class="m-auto">
<router-link
:to="{ name: RouteName.EVENT_CALENDAR }"
@ -283,8 +250,6 @@ import {
} from "@/graphql/user";
import { ICurrentUser } from "@/types/current-user.model";
const { isLongEvents } = useIsLongEvents();
const { currentUser } = useCurrentUserClient();
const { currentActor } = useCurrentActorClient();

View file

@ -716,7 +716,6 @@ const GROUP_PAGE_LIMIT = 16;
const { features } = useFeatures();
const { eventCategories } = useEventCategories();
const { isLongEvents } = useIsLongEvents();
const orderedCategories = computed(() => {
if (!eventCategories.value) return [];
@ -829,36 +828,6 @@ 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 [
{