Various improvements

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-08-12 16:46:44 +02:00
parent 4f9e0911e7
commit 754e44f0a5
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
33 changed files with 165 additions and 154 deletions

View File

@ -21,6 +21,9 @@ body {
.btn-outlined-primary:hover { .btn-outlined-primary:hover {
@apply font-bold py-2 px-4 bg-mbz-bluegreen dark:bg-violet-3 text-white rounded; @apply font-bold py-2 px-4 bg-mbz-bluegreen dark:bg-violet-3 text-white rounded;
} }
.btn-size-large {
@apply text-2xl py-6;
}
.btn-disabled { .btn-disabled {
@apply opacity-50 cursor-not-allowed; @apply opacity-50 cursor-not-allowed;
} }
@ -108,7 +111,7 @@ body {
} }
.dropdown-menu { .dropdown-menu {
min-width: 12em; min-width: 12em;
@apply bg-white dark:bg-gray-700 shadow-lg rounded-sm; @apply bg-white dark:bg-gray-700 shadow-lg rounded text-start py-2;
} }
.dropdown-item { .dropdown-item {
@apply relative inline-flex gap-1 no-underline p-2 cursor-pointer w-full; @apply relative inline-flex gap-1 no-underline p-2 cursor-pointer w-full;

View File

@ -9,6 +9,7 @@
<o-notification <o-notification
v-if="isEventOrganiser && !areCommentsClosed" v-if="isEventOrganiser && !areCommentsClosed"
:closable="false" :closable="false"
class="my-2"
>{{ t("Comments are closed for everybody else.") }}</o-notification >{{ t("Comments are closed for everybody else.") }}</o-notification
> >
<article class="flex flex-wrap items-start gap-2"> <article class="flex flex-wrap items-start gap-2">

View File

@ -44,6 +44,7 @@ const comment = reactive<IComment>({
const deletedComment = reactive<IComment>({ const deletedComment = reactive<IComment>({
...comment, ...comment,
actor: null,
deletedAt: new Date().toString(), deletedAt: new Date().toString(),
}); });
</script> </script>

View File

@ -1,5 +1,5 @@
<template> <template>
<article class="flex gap-1"> <article class="flex gap-2">
<div class=""> <div class="">
<figure class="" v-if="comment.actor && comment.actor.avatar"> <figure class="" v-if="comment.actor && comment.actor.avatar">
<img <img

View File

@ -44,9 +44,9 @@
:date="event.beginsOn.toString()" :date="event.beginsOn.toString()"
/> />
</div> </div>
<div class="flex-1 w-full flex flex-col justify-between"> <div class="w-full flex flex-col justify-between">
<h3 <h3
class="text-lg leading-5 line-clamp-3 font-bold text-violet-3" class="text-lg leading-5 line-clamp-3 font-bold text-violet-3 dark:text-white"
:title="event.title" :title="event.title"
dir="auto" dir="auto"
:lang="event.language" :lang="event.language"
@ -54,7 +54,10 @@
{{ event.title }} {{ event.title }}
</h3> </h3>
<div class="pt-3"> <div class="pt-3">
<div class="flex items-center text-violet-3" dir="auto"> <div
class="flex items-center text-violet-3 dark:text-white"
dir="auto"
>
<figure class="" v-if="actorAvatarURL"> <figure class="" v-if="actorAvatarURL">
<img <img
class="rounded-xl" class="rounded-xl"
@ -78,7 +81,7 @@
dir="auto" dir="auto"
v-else-if="event.options && event.options.isOnline" v-else-if="event.options && event.options.isOnline"
> >
<o-icon icon="video" /> <Video />
<span class="ltr:pl-2 rtl:pr-2">{{ $t("Online") }}</span> <span class="ltr:pl-2 rtl:pr-2">{{ $t("Online") }}</span>
</div> </div>
</div> </div>
@ -104,6 +107,7 @@ import InlineAddress from "@/components/Address/InlineAddress.vue";
import { computed } from "vue"; import { computed } from "vue";
import MobilizonTag from "../Tag.vue"; import MobilizonTag from "../Tag.vue";
import AccountCircle from "vue-material-design-icons/AccountCircle.vue"; import AccountCircle from "vue-material-design-icons/AccountCircle.vue";
import Video from "vue-material-design-icons/Video.vue";
const props = defineProps<{ event: IEvent; options?: IEventCardOptions }>(); const props = defineProps<{ event: IEvent; options?: IEventCardOptions }>();
const defaultOptions: IEventCardOptions = { const defaultOptions: IEventCardOptions = {

View File

@ -9,7 +9,7 @@
<router-link <router-link
:to="{ name: RouteName.EVENT, params: { uuid: event.uuid } }" :to="{ name: RouteName.EVENT, params: { uuid: event.uuid } }"
> >
<h2 class="text-2xl line-clamp-2">{{ event.title }}</h2> <h2 class="mt-0 line-clamp-2">{{ event.title }}</h2>
</router-link> </router-link>
</div> </div>
<div class=""> <div class="">

View File

@ -21,7 +21,7 @@
</div> </div>
<div class="list-card flex flex-col relative"> <div class="list-card flex flex-col relative">
<div <div
class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-x-1.5 gapt-x-3" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-x-1.5 gapt-x-3 pb-2"
> >
<div class="mr-0 ml-0"> <div class="mr-0 ml-0">
<div class="h-36 relative w-full"> <div class="h-36 relative w-full">
@ -89,6 +89,7 @@
:physical-address="participation.event.physicalAddress" :physical-address="participation.event.physicalAddress"
/> />
<div <div
class="flex gap-1"
v-else-if=" v-else-if="
participation.event.options && participation.event.options &&
participation.event.options.isOnline participation.event.options.isOnline
@ -182,7 +183,7 @@
</div> </div>
</div> </div>
<o-dropdown aria-role="list"> <o-dropdown aria-role="list" class="text-center self-center">
<template #trigger> <template #trigger>
<o-button icon-right="dots-horizontal"> <o-button icon-right="dots-horizontal">
{{ $t("Actions") }} {{ $t("Actions") }}

View File

@ -1,7 +1,9 @@
<template> <template>
<div class="multi-card-event"> <div
class="grid auto-rows-[1fr] gap-x-5 gap-y-8 grid-cols-[repeat(auto-fill,_minmax(250px,_1fr))]"
>
<event-card <event-card
class="event-card" class="flex flex-col h-full"
v-for="event in events" v-for="event in events"
:event="event" :event="event"
:key="event.uuid" :key="event.uuid"
@ -17,17 +19,3 @@ defineProps<{
events: IEvent[]; events: IEvent[];
}>(); }>();
</script> </script>
<style lang="scss" scoped>
.multi-card-event {
display: grid;
grid-auto-rows: 1fr;
grid-column-gap: 20px;
grid-row-gap: 30px;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
.event-card {
height: 100%;
display: flex;
flex-direction: column;
}
}
</style>

View File

@ -4,7 +4,7 @@
name: RouteName.GROUP, name: RouteName.GROUP,
params: { preferredUsername: usernameWithDomain(group) }, params: { preferredUsername: usernameWithDomain(group) },
}" }"
class="card flex flex-col max-w-md bg-white dark:bg-mbz-purple dark:text-white rounded shadow-lg" class="card flex flex-col max-w-md bg-white dark:bg-mbz-purple dark:text-white rounded-lg shadow-lg"
> >
<figure class="rounded-t-lg flex justify-center h-1/4"> <figure class="rounded-t-lg flex justify-center h-1/4">
<lazy-image-wrapper :picture="group.banner" :rounded="true" /> <lazy-image-wrapper :picture="group.banner" :rounded="true" />

View File

@ -40,30 +40,30 @@
}, },
}" }"
> >
<h2 class="text-2xl">{{ member.parent.name }}</h2> <h2 class="mt-0">{{ member.parent.name }}</h2>
<div class=""> <div class="flex flex-col">
<span class="text-sm">{{ <span class="text-sm">{{
`@${usernameWithDomain(member.parent)}` `@${usernameWithDomain(member.parent)}`
}}</span> }}</span>
<div> <tag
<tag variant="info"
variant="info" v-if="member.role === MemberRole.ADMINISTRATOR"
v-if="member.role === MemberRole.ADMINISTRATOR" >{{ $t("Administrator") }}</tag
>{{ $t("Administrator") }}</tag >
> <tag
<tag variant="info"
variant="info" v-else-if="member.role === MemberRole.MODERATOR"
v-else-if="member.role === MemberRole.MODERATOR" >{{ $t("Moderator") }}</tag
>{{ $t("Moderator") }}</tag >
>
</div>
</div> </div>
</router-link> </router-link>
</div> </div>
</div> </div>
<div class="mt-3 prose lg:prose-xl" v-if="member.parent.summary"> <div
<p v-html="member.parent.summary" /> class="mt-3 prose dark:prose-invert lg:prose-xl line-clamp-2"
</div> v-if="member.parent.summary"
v-html="flattenHTMLParagraphs(member.parent.summary)"
/>
</div> </div>
<div> <div>
<o-dropdown aria-role="list" position="bottom-left"> <o-dropdown aria-role="list" position="bottom-left">
@ -95,6 +95,7 @@ import DotsHorizontal from "vue-material-design-icons/DotsHorizontal.vue";
import AccountGroup from "vue-material-design-icons/AccountGroup.vue"; import AccountGroup from "vue-material-design-icons/AccountGroup.vue";
import AccountCircle from "vue-material-design-icons/AccountCircle.vue"; import AccountCircle from "vue-material-design-icons/AccountCircle.vue";
import Tag from "@/components/Tag.vue"; import Tag from "@/components/Tag.vue";
import { flattenHTMLParagraphs } from "@/utils/html";
defineProps<{ defineProps<{
member: IMember; member: IMember;

View File

@ -46,7 +46,7 @@ const notifier = inject<Notifier>("notifier");
const onError = (error: ErrorResponse) => { const onError = (error: ErrorResponse) => {
console.error(error); console.error(error);
if (error.graphQLErrors && error.graphQLErrors.length > 0) { if (error.graphQLErrors && error.graphQLErrors.length > 0) {
notifier.error(error.graphQLErrors[0].message); notifier?.error(error.graphQLErrors[0].message);
} }
}; };

View File

@ -8,14 +8,13 @@
:category="category" :category="category"
:with-details="false" :with-details="false"
/> />
<router-link :to="{ name: RouteName.CATEGORIES }"> <router-link
<div :to="{ name: RouteName.CATEGORIES }"
class="flex items-end brightness-85 h-36 w-36 md:h-52 md:w-52 rounded-lg font-semibold text-lg md:text-xl p-4 text-white bg-gradient-to-r from-pink-500 via-red-500 to-yellow-500" class="flex items-end brightness-85 h-36 w-36 md:h-52 md:w-52 rounded-lg font-semibold text-lg md:text-xl p-4 text-white bg-gradient-to-r from-pink-500 via-red-500 to-yellow-500 hover:text-slate-200"
> >
<span> <span>
{{ t("View all categories") }} {{ t("View all categories") }}
</span> </span>
</div>
</router-link> </router-link>
</section> </section>
</template> </template>
@ -63,6 +62,6 @@ const promotedCategories = computed((): CategoryStatsModel[] => {
number, number,
label: eventCategoryLabel(key), label: eventCategoryLabel(key),
})) }))
.slice(0, 10); .slice(0, 9);
}); });
</script> </script>

View File

@ -32,7 +32,7 @@ import { IAddress } from "@/types/address.model";
import { AddressSearchType } from "@/types/enums"; import { AddressSearchType } from "@/types/enums";
import { computed } from "vue"; import { computed } from "vue";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import FullAddressAutoComplete from "../Event/FullAddressAutoComplete.vue"; import FullAddressAutoComplete from "@/components/Event/FullAddressAutoComplete.vue";
const props = defineProps<{ const props = defineProps<{
location: IAddress; location: IAddress;

View File

@ -1,19 +1,23 @@
<template> <template>
<Story :setup-app="setupApp"> <Story>
<Variant :title="'Open'"> <Variant :title="'Open'">
<UnloggedIntroduction /> <UnloggedIntroduction :config="config" />
</Variant> </Variant>
<Variant :title="'Closed'"> <Variant :title="'Closed'">
<UnloggedIntroduction /> <UnloggedIntroduction :config="configClosed" />
</Variant> </Variant>
</Story> </Story>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { apolloClient } from "@/vue-apollo"; import { reactive } from "vue";
import { DefaultApolloClient } from "@vue/apollo-composable";
import UnloggedIntroduction from "./UnloggedIntroduction.vue"; import UnloggedIntroduction from "./UnloggedIntroduction.vue";
function setupApp({ app }) { const config = reactive({
app.provide(DefaultApolloClient, apolloClient); name: "My instance name",
} description: "An instance that doesn't exist",
slogan: "Test! Test! Test!",
registrationsOpen: true,
});
const configClosed = reactive({ ...config, registrationsOpen: false });
</script> </script>

View File

@ -1,7 +1,7 @@
<template> <template>
<section v-if="config" class="container mx-auto px-2 my-3"> <section class="container mx-auto px-2 my-3">
<h1 class="dark:text-white font-bold"> <h1 class="dark:text-white font-bold">
{{ config.slogan || t("Gather ⋅ Organize ⋅ Mobilize") }} {{ config.slogan ?? t("Gather ⋅ Organize ⋅ Mobilize") }}
</h1> </h1>
<i18n-t <i18n-t
keypath="Join {instance}, a Mobilizon instance" keypath="Join {instance}, a Mobilizon instance"
@ -37,16 +37,11 @@
</section> </section>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { CONFIG } from "@/graphql/config";
import { IConfig } from "@/types/config.model"; import { IConfig } from "@/types/config.model";
import { useQuery } from "@vue/apollo-composable";
import { computed } from "vue";
import RouteName from "@/router/name"; import RouteName from "@/router/name";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
const { result: configResult } = useQuery<{ config: IConfig }>(CONFIG); defineProps<{ config: IConfig }>();
const config = computed(() => configResult.value?.config);
const { t } = useI18n({ useScope: "global" }); const { t } = useI18n({ useScope: "global" });
</script> </script>

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="relative pt-10"> <div class="relative pt-10 px-2">
<div class="w-full flex flex-wrap gap-3 mb-2 items-center"> <div class="w-full flex flex-wrap gap-3 mb-2 items-center">
<h1 <h1
class="text-xl font-bold tracking-tight text-gray-900 dark:text-gray-100" class="text-xl font-bold tracking-tight text-gray-900 dark:text-gray-100"
@ -9,7 +9,7 @@
<button <button
v-if="suggestGeoloc && isIPLocation" v-if="suggestGeoloc && isIPLocation"
class="inline-flex bg-primary rounded text-white flex-initial px-4 py-2 justify-center w-full md:w-min whitespace-nowrap" class="inline-flex bg-primary rounded text-white flex-initial px-4 py-2 justify-center w-full md:w-min whitespace-nowrap"
@click="$emit('doGeoLoc')" @click="emit('doGeoLoc')"
> >
{{ t("Geolocate me") }} {{ t("Geolocate me") }}
</button> </button>
@ -24,7 +24,7 @@
</div> </div>
<div class="overflow-hidden"> <div class="overflow-hidden">
<div <div
class="relative w-full flex gap-6 snap-x overflow-x-auto pb-6" class="relative w-full snap-x overflow-x-auto pb-6 grid auto-rows-[1fr] gap-x-5 gap-y-8 grid-cols-[repeat(auto-fill,_minmax(250px,_1fr))]"
ref="scrollContainer" ref="scrollContainer"
@scroll="scrollHandler" @scroll="scrollHandler"
> >

View File

@ -1,7 +1,7 @@
<template> <template>
<router-link <router-link
:to="to" :to="to"
class="mbz-card flex flex-col items-center dark:border-gray-700 shadow-md md:flex-col my-4 snap-center shrink-0 first:pl-8 w-[18rem]" class="mbz-card flex flex-col items-center dark:border-gray-700 shadow-md md:flex-col snap-center shrink-0 first:pl-8 w-[18rem]"
> >
<div class="relative w-full group"> <div class="relative w-full group">
<img <img

View File

@ -1,12 +1,10 @@
<template> <template>
<nav class="bg-white border-gray-200 px-2 sm:px-4 py-2.5 dark:bg-gray-900"> <nav class="bg-white border-gray-200 px-2 sm:px-4 py-2.5 dark:bg-gray-900">
<div <div class="container mx-auto flex flex-wrap items-center mx-auto gap-4">
class="container mx-auto flex flex-wrap justify-between items-center mx-auto"
>
<router-link :to="{ name: RouteName.HOME }" class="flex items-center"> <router-link :to="{ name: RouteName.HOME }" class="flex items-center">
<MobilizonLogo class="w-40" /> <MobilizonLogo class="w-40" />
</router-link> </router-link>
<div class="flex items-center md:order-2" v-if="currentActor?.id"> <div class="flex items-center md:order-2 ml-auto" v-if="currentActor?.id">
<o-dropdown> <o-dropdown>
<template #trigger> <template #trigger>
<button <button
@ -80,7 +78,7 @@
</o-dropdown> </o-dropdown>
</div> </div>
<button <button
@click="showMobileMenu = true" @click="showMobileMenu = !showMobileMenu"
type="button" type="button"
class="inline-flex items-center p-2 ml-1 text-sm text-gray-500 rounded-lg md:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600" class="inline-flex items-center p-2 ml-1 text-sm text-gray-500 rounded-lg md:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600"
aria-controls="mobile-menu-2" aria-controls="mobile-menu-2"
@ -109,6 +107,20 @@
<ul <ul
class="flex flex-col md:flex-row md:space-x-8 mt-2 md:mt-0 md:text-sm md:font-medium" class="flex flex-col md:flex-row md:space-x-8 mt-2 md:mt-0 md:text-sm md:font-medium"
> >
<li v-if="currentActor?.id">
<router-link
:to="{ name: RouteName.MY_EVENTS }"
class="block py-2 pr-4 pl-3 text-gray-700 border-b border-gray-100 hover:bg-gray-50 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 md:dark:hover:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700"
>{{ t("My events") }}</router-link
>
</li>
<li v-if="currentActor?.id">
<router-link
:to="{ name: RouteName.MY_GROUPS }"
class="block py-2 pr-4 pl-3 text-gray-700 border-b border-gray-100 hover:bg-gray-50 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 md:dark:hover:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700"
>{{ t("My groups") }}</router-link
>
</li>
<li v-if="!currentActor?.id"> <li v-if="!currentActor?.id">
<router-link <router-link
:to="{ name: RouteName.LOGIN }" :to="{ name: RouteName.LOGIN }"

View File

@ -23,7 +23,7 @@
import { PostVisibility } from "@/types/enums"; import { PostVisibility } from "@/types/enums";
import { IPost } from "../../types/post.model"; import { IPost } from "../../types/post.model";
import RouteName from "@/router/name"; import RouteName from "@/router/name";
import { computed, ref } from "vue"; import { computed } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import ShareModal from "@/components/Share/ShareModal.vue"; import ShareModal from "@/components/Share/ShareModal.vue";

View File

@ -28,7 +28,7 @@
</o-tooltip> </o-tooltip>
</p> </p>
</o-field> </o-field>
<div class="flex"> <div class="flex flex-wrap gap-1">
<a <a
:href="twitterShare" :href="twitterShare"
target="_blank" target="_blank"

View File

@ -1,7 +1,7 @@
<template> <template>
<div <div
class="flex flex-col items-center mt-80" class="flex flex-col items-center"
:class="{ 'mt-40 mb-10': inline, 'text-center': center }" :class="{ 'mt-20 mb-10': inline, 'mt-80': !inline, 'text-center': center }"
role="note" role="note"
> >
<o-icon :icon="icon" customSize="48" /> <o-icon :icon="icon" customSize="48" />

View File

@ -4,10 +4,9 @@ import {
IDENTITIES, IDENTITIES,
PERSON_STATUS_GROUP, PERSON_STATUS_GROUP,
} from "@/graphql/actor"; } from "@/graphql/actor";
import { IGroup, IPerson, usernameWithDomain } from "@/types/actor"; import { IPerson } from "@/types/actor";
import { useQuery } from "@vue/apollo-composable"; import { useQuery } from "@vue/apollo-composable";
import { group } from "console"; import { computed, Ref, unref } from "vue";
import { computed, ref, Ref, unref } from "vue";
import { useCurrentUserClient } from "./user"; import { useCurrentUserClient } from "./user";
export function useCurrentActorClient() { export function useCurrentActorClient() {

View File

@ -4,6 +4,7 @@ import { i18n } from "./utils/i18n";
import Oruga from "@oruga-ui/oruga-next"; import Oruga from "@oruga-ui/oruga-next";
import "@oruga-ui/oruga-next/dist/oruga-full-vars.css"; import "@oruga-ui/oruga-next/dist/oruga-full-vars.css";
import "./assets/tailwind.css"; import "./assets/tailwind.css";
import "./assets/oruga-tailwindcss.css";
import locale from "date-fns/locale/en-US"; import locale from "date-fns/locale/en-US";
import MaterialIcon from "./components/core/MaterialIcon.vue"; import MaterialIcon from "./components/core/MaterialIcon.vue";

View File

@ -1359,5 +1359,11 @@
"Published events with {comments} comments and {participations} confirmed participations": "Published events with {comments} comments and {participations} confirmed participations", "Published events with {comments} comments and {participations} confirmed participations": "Published events with {comments} comments and {participations} confirmed participations",
"Ex: someone{'@'}mobilizon.org": "Ex: someone{'@'}mobilizon.org", "Ex: someone{'@'}mobilizon.org": "Ex: someone{'@'}mobilizon.org",
"Group members": "Group members", "Group members": "Group members",
"e.g. Nantes, Berlin, Cork, …": "e.g. Nantes, Berlin, Cork, …" "e.g. Nantes, Berlin, Cork, …": "e.g. Nantes, Berlin, Cork, …",
"find, create and organise events": "find, create and organise events",
"tool designed to serve you": "tool designed to serve you",
"multitude of interconnected Mobilizon websites": "multitude of interconnected Mobilizon websites",
"Mobilizon is a tool that helps you {find_create_organize_events}.": "Mobilizon is a tool that helps you {find_create_organize_events}.",
"Ethical alternative to Facebook events, groups and pages, Mobilizon is a {tool_designed_to_serve_you}. Period.": "Ethical alternative to Facebook events, groups and pages, Mobilizon is a {tool_designed_to_serve_you}. Period.",
"Mobilizon is not a giant platform, but a {multitude_of_interconnected_mobilizon_websites}.": "Mobilizon is not a giant platform, but a {multitude_of_interconnected_mobilizon_websites}."
} }

View File

@ -1345,5 +1345,11 @@
"Open user menu": "Ouvrir le menu utilisateur", "Open user menu": "Ouvrir le menu utilisateur",
"Open main menu": "Ouvrir le menu principal", "Open main menu": "Ouvrir le menu principal",
"This is like your federated username ({username}) for groups. It will allow the group to be found on the federation, and is guaranteed to be unique.": "C'est comme votre adresse fédérée ({username}) pour les groupes. Cela permettra au groupe d'être trouvable sur la fédération, et est garanti d'être unique.", "This is like your federated username ({username}) for groups. It will allow the group to be found on the federation, and is guaranteed to be unique.": "C'est comme votre adresse fédérée ({username}) pour les groupes. Cela permettra au groupe d'être trouvable sur la fédération, et est garanti d'être unique.",
"Published events with {comments} comments and {participations} confirmed participations": "Événements publiés avec {comments} commentaires et {participations} participations confirmées" "Published events with {comments} comments and {participations} confirmed participations": "Événements publiés avec {comments} commentaires et {participations} participations confirmées",
"find, create and organise events": "trouver, créer et organiser des événements",
"tool designed to serve you": "outil conçu pour vous servir",
"multitude of interconnected Mobilizon websites": "multitude de sites web Mobilizon interconnectés",
"Mobilizon is a tool that helps you {find_create_organize_events}.": "Mobilizon est un outil qui vous permet de {find_create_organize_events}.",
"Ethical alternative to Facebook events, groups and pages, Mobilizon is a {tool_designed_to_serve_you}. Period.": "Alternative éthique aux événements, groupes et pages Facebook, Mobilizon est un {tool_designed_to_serve_you}. Point.",
"Mobilizon is not a giant platform, but a {multitude_of_interconnected_mobilizon_websites}.": "Mobilizon nest pas une plateforme géante, mais une {multitude_of_interconnected_mobilizon_websites}."
} }

View File

@ -8,6 +8,7 @@ export const orugaConfig = {
roundedClass: "btn-rounded", roundedClass: "btn-rounded",
outlinedClass: "btn-outlined-", outlinedClass: "btn-outlined-",
disabledClass: "btn-disabled", disabledClass: "btn-disabled",
sizeClass: "btn-size-",
}, },
field: { field: {
rootClass: "field", rootClass: "field",

View File

@ -1,3 +1,7 @@
export function nl2br(text: string): string { export function nl2br(text: string): string {
return text.replace(/(?:\r\n|\r|\n)/g, "<br>"); return text.replace(/(?:\r\n|\r|\n)/g, "<br>");
} }
export function flattenHTMLParagraphs(html: string): string {
return html.replace("</p><p>", "<br />").replace(/<?\/p>/g, "");
}

View File

@ -65,7 +65,7 @@
</popover-actor-card> </popover-actor-card>
</span> </span>
</div> </div>
<p class="tags" dir="auto"> <p class="flex gap-1 items-center" dir="auto">
<tag v-if="eventCategory" class="category">{{ <tag v-if="eventCategory" class="category">{{
eventCategory eventCategory
}}</tag> }}</tag>
@ -363,13 +363,10 @@
</div> </div>
</div> </div>
<section <section class="" v-if="(event?.relatedEvents ?? []).length > 0">
class="more-events section" <h2 class="">
v-if="(event?.relatedEvents ?? []).length > 0"
>
<h3 class="title has-text-centered">
{{ t("These events may interest you") }} {{ t("These events may interest you") }}
</h3> </h2>
<multi-card :events="event?.relatedEvents ?? []" /> <multi-card :events="event?.relatedEvents ?? []" />
</section> </section>
<o-modal <o-modal
@ -524,45 +521,45 @@ import {
EVENT_PERSON_PARTICIPATION_SUBSCRIPTION_CHANGED, EVENT_PERSON_PARTICIPATION_SUBSCRIPTION_CHANGED,
FETCH_EVENT, FETCH_EVENT,
JOIN_EVENT, JOIN_EVENT,
} from "../../graphql/event"; } from "@/graphql/event";
import { CURRENT_ACTOR_CLIENT, PERSON_STATUS_GROUP } from "../../graphql/actor"; import { CURRENT_ACTOR_CLIENT, PERSON_STATUS_GROUP } from "@/graphql/actor";
import { EventModel, IEvent } from "../../types/event.model"; import { EventModel, IEvent } from "@/types/event.model";
import { import {
displayName, displayName,
IActor, IActor,
IPerson, IPerson,
Person, Person,
usernameWithDomain, usernameWithDomain,
} from "../../types/actor"; } from "@/types/actor";
import { GRAPHQL_API_ENDPOINT } from "../../api/_entrypoint"; import { GRAPHQL_API_ENDPOINT } from "@/api/_entrypoint";
import DateCalendarIcon from "../../components/Event/DateCalendarIcon.vue"; import DateCalendarIcon from "@/components/Event/DateCalendarIcon.vue";
import MultiCard from "../../components/Event/MultiCard.vue"; import MultiCard from "@/components/Event/MultiCard.vue";
import ReportModal from "../../components/Report/ReportModal.vue"; import ReportModal from "@/components/Report/ReportModal.vue";
import { IReport } from "../../types/report.model"; import { IReport } from "@/types/report.model";
import { CREATE_REPORT } from "../../graphql/report"; import { CREATE_REPORT } from "@/graphql/report";
import EventMixin from "../../mixins/event"; import EventMixin from "@/mixins/event";
import IdentityPicker from "../Account/IdentityPicker.vue"; import IdentityPicker from "../Account/IdentityPicker.vue";
import ParticipationSection from "../../components/Participation/ParticipationSection.vue"; import ParticipationSection from "@/components/Participation/ParticipationSection.vue";
import RouteName from "../../router/name"; import RouteName from "@/router/name";
import CommentTree from "../../components/Comment/CommentTree.vue"; import CommentTree from "@/components/Comment/CommentTree.vue";
import "intersection-observer"; import "intersection-observer";
import { CONFIG } from "../../graphql/config"; import { CONFIG } from "@/graphql/config";
import { import {
AnonymousParticipationNotFoundError, AnonymousParticipationNotFoundError,
getLeaveTokenForParticipation, getLeaveTokenForParticipation,
isParticipatingInThisEvent, isParticipatingInThisEvent,
removeAnonymousParticipation, removeAnonymousParticipation,
} from "../../services/AnonymousParticipationStorage"; } from "@/services/AnonymousParticipationStorage";
import { IConfig } from "../../types/config.model"; import { IConfig } from "@/types/config.model";
import Tag from "../../components/Tag.vue"; import Tag from "@/components/Tag.vue";
import EventMetadataSidebar from "../../components/Event/EventMetadataSidebar.vue"; import EventMetadataSidebar from "@/components/Event/EventMetadataSidebar.vue";
import EventBanner from "../../components/Event/EventBanner.vue"; import EventBanner from "@/components/Event/EventBanner.vue";
import EventMap from "../../components/Event/EventMap.vue"; import EventMap from "@/components/Event/EventMap.vue";
import PopoverActorCard from "../../components/Account/PopoverActorCard.vue"; import PopoverActorCard from "@/components/Account/PopoverActorCard.vue";
import { IParticipant } from "../../types/participant.model"; import { IParticipant } from "@/types/participant.model";
import { ApolloCache, FetchResult } from "@apollo/client/core"; import { ApolloCache, FetchResult } from "@apollo/client/core";
import { IEventMetadataDescription } from "@/types/event-metadata"; import { IEventMetadataDescription } from "@/types/event-metadata";
import { eventMetaDataList } from "../../services/EventMetadata"; import { eventMetaDataList } from "@/services/EventMetadata";
import { USER_SETTINGS } from "@/graphql/user"; import { USER_SETTINGS } from "@/graphql/user";
import { IUser } from "@/types/current-user.model"; import { IUser } from "@/types/current-user.model";
import { useDeleteEvent, useFetchEvent } from "@/composition/apollo/event"; import { useDeleteEvent, useFetchEvent } from "@/composition/apollo/event";
@ -606,22 +603,22 @@ import { Dialog } from "@/plugins/dialog";
import { Notifier } from "@/plugins/notifier"; import { Notifier } from "@/plugins/notifier";
const ShareEventModal = defineAsyncComponent( const ShareEventModal = defineAsyncComponent(
() => import("../../components/Event/ShareEventModal.vue") () => import("@/components/Event/ShareEventModal.vue")
); );
const IntegrationTwitch = defineAsyncComponent( const IntegrationTwitch = defineAsyncComponent(
() => import("../../components/Event/Integrations/Twitch.vue") () => import("@/components/Event/Integrations/Twitch.vue")
); );
const IntegrationPeertube = defineAsyncComponent( const IntegrationPeertube = defineAsyncComponent(
() => import("../../components/Event/Integrations/PeerTube.vue") () => import("@/components/Event/Integrations/PeerTube.vue")
); );
const IntegrationYoutube = defineAsyncComponent( const IntegrationYoutube = defineAsyncComponent(
() => import("../../components/Event/Integrations/YouTube.vue") () => import("@/components/Event/Integrations/YouTube.vue")
); );
const IntegrationJitsiMeet = defineAsyncComponent( const IntegrationJitsiMeet = defineAsyncComponent(
() => import("../../components/Event/Integrations/JitsiMeet.vue") () => import("@/components/Event/Integrations/JitsiMeet.vue")
); );
const IntegrationEtherpad = defineAsyncComponent( const IntegrationEtherpad = defineAsyncComponent(
() => import("../../components/Event/Integrations/Etherpad.vue") () => import("@/components/Event/Integrations/Etherpad.vue")
); );
const props = defineProps<{ const props = defineProps<{

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="container mx-auto"> <div class="container mx-auto px-1">
<h1 class="text-4xl"> <h1>
{{ t("My events") }} {{ t("My events") }}
</h1> </h1>
<p> <p>
@ -126,7 +126,7 @@
</div> </div>
</section> </section>
<section <section
class="has-text-centered not-found" class="text-center not-found"
v-if=" v-if="
showUpcoming && showUpcoming &&
monthlyFutureEvents && monthlyFutureEvents &&
@ -135,7 +135,7 @@
" "
> >
<div class="img-container h-64" /> <div class="img-container h-64" />
<div class="content has-text-centered"> <div class="text-center prose dark:prose-invert">
<p> <p>
{{ {{
t( t(
@ -411,16 +411,7 @@ const firstDayOfWeek = computed((): number => {
}); });
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped> <style lang="scss" scoped>
// @import "node_modules/bulma/sass/utilities/mixins.sass";
main > .container {
& > h1 {
margin: 10px auto 5px;
}
}
.participation { .participation {
margin: 1rem auto; margin: 1rem auto;
} }

View File

@ -1,13 +1,7 @@
<template> <template>
<div> <div>
<!-- <o-loading v-model:active="$apollo.loading" /> --> <!-- <o-loading v-model:active="$apollo.loading" /> -->
<section <section class="mt-5 sm:mt-24">
class="mt-5 sm:mt-24"
v-if="
config &&
(!currentUser || !currentUser.id || !currentActor || !currentActor.id)
"
>
<div class="-z-10 overflow-hidden"> <div class="-z-10 overflow-hidden">
<img <img
alt="" alt=""
@ -29,7 +23,7 @@
/> />
</div> </div>
</section> </section>
<unlogged-introduction /> <unlogged-introduction :config="config" v-if="config && !isLoggedIn" />
<search-fields v-model:search="search" v-model:location="location" /> <search-fields v-model:search="search" v-model:location="location" />
<categories-preview /> <categories-preview />
<div <div
@ -37,7 +31,7 @@
class="container mx-auto section" class="container mx-auto section"
v-if="config && (!currentUser || !currentActor)" v-if="config && (!currentUser || !currentActor)"
> >
<section class="events-recent"> <section class="events-recent px-2">
<h2 class="title"> <h2 class="title">
{{ $t("Last published events") }} {{ $t("Last published events") }}
</h2> </h2>
@ -254,7 +248,7 @@
class="home-separator" class="home-separator"
v-if="canShowMyUpcomingEvents" v-if="canShowMyUpcomingEvents"
/> />
<section class="events-recent"> <section class="events-recent px-2">
<h2 class="dark:text-white text-2xl font-bold"> <h2 class="dark:text-white text-2xl font-bold">
{{ $t("Last published events") }} {{ $t("Last published events") }}
</h2> </h2>
@ -285,7 +279,7 @@
<o-notification v-else variant="danger" <o-notification v-else variant="danger"
>{{ $t("No events found") }}<br /> >{{ $t("No events found") }}<br />
<div v-if="goingToEvents.size > 0"> <div v-if="goingToEvents.size > 0">
<!-- <o-icon size="small" icon="information-outline" /> --> <InformationOutline :size="16" />
<small>{{ <small>{{
$t("The events you created are not shown here.") $t("The events you created are not shown here.")
}}</small> }}</small>
@ -335,6 +329,7 @@ import CategoriesPreview from "@/components/Home/CategoriesPreview.vue";
import UnloggedIntroduction from "@/components/Home/UnloggedIntroduction.vue"; import UnloggedIntroduction from "@/components/Home/UnloggedIntroduction.vue";
import SearchFields from "@/components/Home/SearchFields.vue"; import SearchFields from "@/components/Home/SearchFields.vue";
import { useHead } from "@vueuse/head"; import { useHead } from "@vueuse/head";
import InformationOutline from "vue-material-design-icons/InformationOutline.vue";
const { result: resultEvents } = useQuery<{ events: Paginate<IEvent> }>( const { result: resultEvents } = useQuery<{ events: Paginate<IEvent> }>(
FETCH_EVENTS, FETCH_EVENTS,
@ -644,6 +639,8 @@ watch(loggedUser, (loggedUserValue) => {
// }; // };
// }, // },
const isLoggedIn = computed(() => loggedUser.value?.id !== undefined);
useHead({ useHead({
title: computed(() => instanceName.value ?? ""), title: computed(() => instanceName.value ?? ""),
}); });

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="container mx-auto"> <div class="container mx-auto">
<h1 class="text-violet-3">{{ t("Settings") }}</h1> <h1 class="text-violet-3 dark:text-white">{{ t("Settings") }}</h1>
<div class="flex flex-wrap gap-4"> <div class="flex flex-wrap gap-4">
<SettingsMenu class="max-w-xs w-full" /> <SettingsMenu class="max-w-xs w-full" />
<div class="flex-1"> <div class="flex-1">

View File

@ -69,7 +69,7 @@
/> />
</o-field> </o-field>
<p class="control has-text-centered" v-if="!submitted"> <p class="text-center my-2" v-if="!submitted">
<o-button <o-button
variant="primary" variant="primary"
size="large" size="large"

View File

@ -27,9 +27,9 @@ export default defineConfig(({ command }) => {
srcDir: "src", srcDir: "src",
filename: "service-worker.ts", filename: "service-worker.ts",
// injectRegister: "auto", // injectRegister: "auto",
devOptions: { // devOptions: {
enabled: true, // enabled: true,
}, // },
}), }),
// vueI18n({ // vueI18n({
// /* options */ // /* options */