mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2025-01-03 05:45:14 +00:00
issue #1574 - home page & search page : 3 buttons for search
This commit is contained in:
parent
71cc09dd7a
commit
4489743853
3 changed files with 1 additions and 67 deletions
|
@ -58,7 +58,7 @@
|
||||||
class="search-Activity min-w-40 mr-1 mb-1"
|
class="search-Activity min-w-40 mr-1 mb-1"
|
||||||
native-type="submit"
|
native-type="submit"
|
||||||
icon-left="calendar-star"
|
icon-left="calendar-star"
|
||||||
v-if="search == null && isLongEvents"
|
v-if="isLongEvents"
|
||||||
>
|
>
|
||||||
{{ t("Activities") }}
|
{{ t("Activities") }}
|
||||||
</o-button>
|
</o-button>
|
||||||
|
|
|
@ -179,39 +179,6 @@
|
||||||
<ul
|
<ul
|
||||||
class="flex flex-col md:flex-row md:space-x-8 mt-2 md:mt-0 md:font-lightbold"
|
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">
|
<li class="m-auto">
|
||||||
<router-link
|
<router-link
|
||||||
:to="{ name: RouteName.EVENT_CALENDAR }"
|
:to="{ name: RouteName.EVENT_CALENDAR }"
|
||||||
|
@ -283,8 +250,6 @@ import {
|
||||||
} from "@/graphql/user";
|
} from "@/graphql/user";
|
||||||
import { ICurrentUser } from "@/types/current-user.model";
|
import { ICurrentUser } from "@/types/current-user.model";
|
||||||
|
|
||||||
const { isLongEvents } = useIsLongEvents();
|
|
||||||
|
|
||||||
const { currentUser } = useCurrentUserClient();
|
const { currentUser } = useCurrentUserClient();
|
||||||
const { currentActor } = useCurrentActorClient();
|
const { currentActor } = useCurrentActorClient();
|
||||||
|
|
||||||
|
|
|
@ -716,7 +716,6 @@ const GROUP_PAGE_LIMIT = 16;
|
||||||
|
|
||||||
const { features } = useFeatures();
|
const { features } = useFeatures();
|
||||||
const { eventCategories } = useEventCategories();
|
const { eventCategories } = useEventCategories();
|
||||||
const { isLongEvents } = useIsLongEvents();
|
|
||||||
|
|
||||||
const orderedCategories = computed(() => {
|
const orderedCategories = computed(() => {
|
||||||
if (!eventCategories.value) return [];
|
if (!eventCategories.value) return [];
|
||||||
|
@ -829,36 +828,6 @@ const searchIsUrl = computed((): boolean => {
|
||||||
return url.protocol === "http:" || url.protocol === "https:";
|
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(() => {
|
const eventStatuses = computed(() => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue