Couple of fixes, and introducing Explore section

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2019-09-20 19:43:29 +02:00
parent 525e379c67
commit 246555a768
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
15 changed files with 185 additions and 143 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<div id="mobilizon"> <div id="mobilizon">
<NavBar /> <NavBar />
<main> <main class="container">
<router-view /> <router-view />
</main> </main>
<mobilizon-footer /> <mobilizon-footer />

View File

@ -16,8 +16,10 @@
<h2 class="title" ref="title">{{ event.title }}</h2> <h2 class="title" ref="title">{{ event.title }}</h2>
</div> </div>
<span> <span>
<span v-if="event.physicalAddress && event.physicalAddress.locality">{{ event.physicalAddress.locality }} - </span> <span v-if="actorDisplayName && actorDisplayName !== '@'">{{ $t('By {name}', { name: actorDisplayName }) }}</span>
<span v-if="actorDisplayName && actorDisplayName !== '@'">{{ actorDisplayName }}</span> <span v-if="event.physicalAddress && (event.physicalAddress.locality || event.physicalAddress.description)">
- {{ event.physicalAddress.locality || event.physicalAddress.description }}
</span>
</span> </span>
</div> </div>
<!-- <div v-if="!mergedOptions.hideDetails" class="details">--> <!-- <div v-if="!mergedOptions.hideDetails" class="details">-->

View File

@ -55,8 +55,8 @@ export default class Map extends Vue {
return { ...this.defaultOptions, ...this.options }; return { ...this.defaultOptions, ...this.options };
} }
get lat() { return this.$props.coords.split(';')[0]; } get lat() { return this.$props.coords.split(';')[1]; }
get lon() { return this.$props.coords.split(';')[1]; } get lon() { return this.$props.coords.split(';')[0]; }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -4,6 +4,7 @@
<b-navbar-item tag="router-link" :to="{ name: 'Home' }"><logo /></b-navbar-item> <b-navbar-item tag="router-link" :to="{ name: 'Home' }"><logo /></b-navbar-item>
</template> </template>
<template slot="start"> <template slot="start">
<b-navbar-item tag="router-link" :to="{ name: EventRouteName.EXPLORE }">{{ $t('Explore') }}</b-navbar-item>
<b-navbar-item tag="router-link" :to="{ name: EventRouteName.MY_EVENTS }">{{ $t('Events') }}</b-navbar-item> <b-navbar-item tag="router-link" :to="{ name: EventRouteName.MY_EVENTS }">{{ $t('Events') }}</b-navbar-item>
</template> </template>
<template slot="end"> <template slot="end">
@ -78,7 +79,7 @@ import SearchField from '@/components/SearchField.vue';
import { ActorRouteName } from '@/router/actor'; import { ActorRouteName } from '@/router/actor';
import { AdminRouteName } from '@/router/admin'; import { AdminRouteName } from '@/router/admin';
import { RouteName } from '@/router'; import { RouteName } from '@/router';
import {EventRouteName} from "@/router/event"; import { EventRouteName } from '@/router/event';
@Component({ @Component({
apollo: { apollo: {
@ -150,7 +151,6 @@ export default class NavBar extends Vue {
} }
async setIdentity(identity: IPerson) { async setIdentity(identity: IPerson) {
console.log('setIdentity');
return await changeIdentity(this.$apollo.provider.defaultClient, identity); return await changeIdentity(this.$apollo.provider.defaultClient, identity);
} }
} }

View File

@ -21,7 +21,8 @@ const physicalAddressQuery = `
postalCode, postalCode,
region, region,
country, country,
geom geom,
id
`; `;
const tagsQuery = ` const tagsQuery = `
@ -148,23 +149,25 @@ export const FETCH_EVENTS = gql`
# online_address, # online_address,
# phone_address, # phone_address,
physicalAddress { physicalAddress {
id,
description, description,
locality locality
} },
organizerActor { organizerActor {
id,
avatar { avatar {
url url
}, },
preferredUsername, preferredUsername,
name, name,
}, },
attributedTo { # attributedTo {
avatar { # avatar {
url # url
}, # },
preferredUsername, # preferredUsername,
name, # name,
}, # },
category, category,
participants { participants {
${participantQuery} ${participantQuery}

View File

@ -8,12 +8,16 @@
"Add an address": "Add an address", "Add an address": "Add an address",
"Add to my calendar": "Add to my calendar", "Add to my calendar": "Add to my calendar",
"Add": "Add", "Add": "Add",
"Additional comments": "Additional comments",
"Administration": "Administration", "Administration": "Administration",
"Allow all comments": "Allow all comments", "Allow all comments": "Allow all comments",
"Approve": "Approve",
"Are you going to this event?": "Are you going to this event?", "Are you going to this event?": "Are you going to this event?",
"Are you sure you want to cancel your participation at event \"{title}\"?": "Are you sure you want to cancel your participation at event \"{title}\"?",
"Are you sure you want to delete this event? This action cannot be reverted.": "Are you sure you want to delete this event? This action cannot be reverted.", "Are you sure you want to delete this event? This action cannot be reverted.": "Are you sure you want to delete this event? This action cannot be reverted.",
"Before you can login, you need to click on the link inside it to validate your account": "Before you can login, you need to click on the link inside it to validate your account", "Before you can login, you need to click on the link inside it to validate your account": "Before you can login, you need to click on the link inside it to validate your account",
"By {name}": "By {name}", "By {name}": "By {name}",
"Cancel": "Cancel",
"Category": "Category", "Category": "Category",
"Change": "Change", "Change": "Change",
"Clear": "Clear", "Clear": "Clear",
@ -22,6 +26,7 @@
"Close comments for all (except for admins)": "Close comments for all (except for admins)", "Close comments for all (except for admins)": "Close comments for all (except for admins)",
"Comments on the event page": "Comments on the event page", "Comments on the event page": "Comments on the event page",
"Comments": "Comments", "Comments": "Comments",
"Confirm my particpation": "Confirm my particpation",
"Confirmed: Will happen": "Confirmed: Will happen", "Confirmed: Will happen": "Confirmed: Will happen",
"Country": "Country", "Country": "Country",
"Create a new event": "Create a new event", "Create a new event": "Create a new event",
@ -34,6 +39,7 @@
"Create token": "Create token", "Create token": "Create token",
"Create your communities and your events": "Create your communities and your events", "Create your communities and your events": "Create your communities and your events",
"Create": "Create", "Create": "Create",
"Creator": "Creator",
"Current": "Current", "Current": "Current",
"Delete event": "Delete event", "Delete event": "Delete event",
"Delete this identity": "Delete this identity", "Delete this identity": "Delete this identity",
@ -47,6 +53,7 @@
"Display name": "Display name", "Display name": "Display name",
"Display participation price": "Display participation price", "Display participation price": "Display participation price",
"Displayed name": "Displayed name", "Displayed name": "Displayed name",
"Do you want to participate in {title}?": "Do you want to participate in {title}?",
"Edit": "Edit", "Edit": "Edit",
"Either the account is already validated, either the validation token is incorrect.": "Either the account is already validated, either the validation token is incorrect.", "Either the account is already validated, either the validation token is incorrect.": "Either the account is already validated, either the validation token is incorrect.",
"Email": "Email", "Email": "Email",
@ -60,6 +67,8 @@
"Events nearby you": "Events nearby you", "Events nearby you": "Events nearby you",
"Events you're going at": "Events you're going at", "Events you're going at": "Events you're going at",
"Events": "Events", "Events": "Events",
"Exclude": "Exclude",
"Explore": "Explore",
"Features": "Features", "Features": "Features",
"Find an address": "Find an address", "Find an address": "Find an address",
"Forgot your password ?": "Forgot your password ?", "Forgot your password ?": "Forgot your password ?",
@ -81,43 +90,54 @@
"Identity": "Identity", "Identity": "Identity",
"If an account with this email exists, we just sent another confirmation email to {email}": "If an account with this email exists, we just sent another confirmation email to {email}", "If an account with this email exists, we just sent another confirmation email to {email}": "If an account with this email exists, we just sent another confirmation email to {email}",
"If this identity is the only administrator of some groups, you need to delete them before being able to delete this identity.": "If this identity is the only administrator of some groups, you need to delete them before being able to delete this identity.", "If this identity is the only administrator of some groups, you need to delete them before being able to delete this identity.": "If this identity is the only administrator of some groups, you need to delete them before being able to delete this identity.",
"Join event {title}": "Join event {title}",
"Join": "Join", "Join": "Join",
"Last published event": "Last published event", "Last published event": "Last published event",
"Last week": "Last week",
"Learn more on {0}": "Learn more on {0}", "Learn more on {0}": "Learn more on {0}",
"Learn more on": "Learn more on", "Learn more on": "Learn more on",
"Leave event": "Leave event",
"Leave": "Leave", "Leave": "Leave",
"Leaving event \"{title}\"": "Leaving event \"{title}\"",
"Legal": "Legal", "Legal": "Legal",
"License": "License", "License": "License",
"Limited places": "Limited places", "Limited places": "Limited places",
"Load more": "Load more",
"Loading…": "Loading…", "Loading…": "Loading…",
"Locality": "Locality", "Locality": "Locality",
"Log in": "Log in", "Log in": "Log in",
"Log out": "Log out", "Log out": "Log out",
"Login": "Login", "Login": "Login",
"Manage participants": "Manage participants",
"Manage participations": "Manage participations",
"Members": "Members", "Members": "Members",
"Moderated comments (shown after approval)": "Moderated comments (shown after approval)", "Moderated comments (shown after approval)": "Moderated comments (shown after approval)",
"My account": "My account", "My account": "My account",
"My events": "My events",
"My identities": "My identities", "My identities": "My identities",
"Name": "Name", "Name": "Name",
"No address defined": "No address defined", "No address defined": "No address defined",
"No events found": "No events found", "No events found": "No events found",
"No group found": "No group found", "No group found": "No group found",
"No groups found": "No groups found", "No groups found": "No groups found",
"No participants yet.": "No participants yet.",
"No results for \"{queryText}\"": "No results for \"{queryText}\"", "No results for \"{queryText}\"": "No results for \"{queryText}\"",
"Number of places": "Number of places", "Number of places": "Number of places",
"One person is going": "No one is going | One person is going | {approved} persons are going", "One person is going": "No one is going | One person is going | {approved} persons are going",
"Only accessible through link and search (private)": "Only accessible through link and search (private)", "Only accessible through link and search (private)": "Only accessible through link and search (private)",
"Opened reports": "Opened reports", "Opened reports": "Opened reports",
"Organized": "Organized",
"Organized by {name}": "Organized by {name}", "Organized by {name}": "Organized by {name}",
"Organized": "Organized",
"Organizer": "Organizer", "Organizer": "Organizer",
"Other stuff…": "Other stuff…", "Other stuff…": "Other stuff…",
"Otherwise this identity will just be removed from the group administrators.": "Otherwise this identity will just be removed from the group administrators.", "Otherwise this identity will just be removed from the group administrators.": "Otherwise this identity will just be removed from the group administrators.",
"Page limited to my group (asks for auth)": "Page limited to my group (asks for auth)", "Page limited to my group (asks for auth)": "Page limited to my group (asks for auth)",
"Participants": "Participants",
"Participation approval": "Participation approval", "Participation approval": "Participation approval",
"Password (confirmation)": "Password (confirmation)",
"Password reset": "Password reset", "Password reset": "Password reset",
"Password": "Password", "Password": "Password",
"Password (confirmation)": "Password (confirmation)", "Past events": "Passed events",
"Pick an identity": "Pick an identity", "Pick an identity": "Pick an identity",
"Please be nice to each other": "Please be nice to each other", "Please be nice to each other": "Please be nice to each other",
"Please check you spam folder if you didn't receive the email.": "Please check you spam folder if you didn't receive the email.", "Please check you spam folder if you didn't receive the email.": "Please check you spam folder if you didn't receive the email.",
@ -126,10 +146,12 @@
"Please read the full rules": "Please read the full rules", "Please read the full rules": "Please read the full rules",
"Please type at least 5 characters": "Please type at least 5 characters", "Please type at least 5 characters": "Please type at least 5 characters",
"Postal Code": "Postal Code", "Postal Code": "Postal Code",
"Private event": "Private event",
"Private feeds": "Private feeds", "Private feeds": "Private feeds",
"Promotion": "Promotion", "Promotion": "Promotion",
"Public RSS/Atom Feed": "Public RSS/Atom Feed", "Public RSS/Atom Feed": "Public RSS/Atom Feed",
"Public comment moderation": "Public comment moderation", "Public comment moderation": "Public comment moderation",
"Public event": "Public event",
"Public feeds": "Public feeds", "Public feeds": "Public feeds",
"Public iCal Feed": "Public iCal Feed", "Public iCal Feed": "Public iCal Feed",
"Published events": "Published events", "Published events": "Published events",
@ -138,6 +160,8 @@
"Register an account on Mobilizon!": "Register an account on Mobilizon!", "Register an account on Mobilizon!": "Register an account on Mobilizon!",
"Register": "Register", "Register": "Register",
"Registration is currently closed.": "Registration is currently closed.", "Registration is currently closed.": "Registration is currently closed.",
"Reject": "Reject",
"Report this event": "Report this event",
"Report": "Signaler", "Report": "Signaler",
"Resend confirmation email": "Resend confirmation email", "Resend confirmation email": "Resend confirmation email",
"Reset my password": "Reset my password", "Reset my password": "Reset my password",
@ -148,6 +172,7 @@
"Searching…": "Searching…", "Searching…": "Searching…",
"Send confirmation email again": "Send confirmation email again", "Send confirmation email again": "Send confirmation email again",
"Send email to reset my password": "Send email to reset my password", "Send email to reset my password": "Send email to reset my password",
"Send the report": "Send the report",
"Share this event": "Share this event", "Share this event": "Share this event",
"Show map": "Show map", "Show map": "Show map",
"Show remaining number of places": "Show remaining number of places", "Show remaining number of places": "Show remaining number of places",
@ -156,8 +181,12 @@
"Status": "Status", "Status": "Status",
"Street": "Street", "Street": "Street",
"Tentative: Will be confirmed later": "Tentative: Will be confirmed later", "Tentative: Will be confirmed later": "Tentative: Will be confirmed later",
"The content came from another server. Transfer an anonymous copy of the report?": "The content came from another server. Transfer an anonymous copy of the report ?",
"The event came from another instance. Your participation will be confirmed after we confirm it with the other instance.": "The event came from another instance. Your participation will be confirmed after we confirm it with the other instance.",
"The event organizer didn't add any description.": "The event organizer didn't add any description.", "The event organizer didn't add any description.": "The event organizer didn't add any description.",
"The event organizer has chosen to approve manually the participations to this event. You will receive a notification when your participation has been approved": "The event organizer has chosen to approve manually the participations to this event. You will receive a notification when your participation has been approved",
"The page you're looking for doesn't exist.": "The page you're looking for doesn't exist.", "The page you're looking for doesn't exist.": "The page you're looking for doesn't exist.",
"The report will be sent to the moderators of your instance. You can explain why you report this content below.": "The report will be sent to the moderators of your instance. You can explain why you report this content below.",
"The {date} at {time}": "The {date} at {time}", "The {date} at {time}": "The {date} at {time}",
"The {date} from {startTime} to {endTime}": "The {date} from {startTime} to {endTime}", "The {date} from {startTime} to {endTime}": "The {date} from {startTime} to {endTime}",
"There are {participants} participants.": "There's only one participant | There are {participants} participants.", "There are {participants} participants.": "There's only one participant | There are {participants} participants.",
@ -167,13 +196,18 @@
"Title": "Title", "Title": "Title",
"To confirm, type your event title \"{eventTitle}\"": "To confirm, type your event title \"{eventTitle}\"", "To confirm, type your event title \"{eventTitle}\"": "To confirm, type your event title \"{eventTitle}\"",
"To confirm, type your identity username \"{preferredUsername}\"": "To confirm, type your identity username \"{preferredUsername}\"", "To confirm, type your identity username \"{preferredUsername}\"": "To confirm, type your identity username \"{preferredUsername}\"",
"Transfer to {outsideDomain}": "Transfer to {outsideDomain}",
"Unknown error.": "Unknown error.", "Unknown error.": "Unknown error.",
"Upcoming": "Upcoming",
"Update event {name}": "Update event {name}", "Update event {name}": "Update event {name}",
"Update my event": "Update my event", "Update my event": "Update my event",
"User logout": "User logout", "User logout": "User logout",
"Username": "Username", "Username": "Username",
"Users": "Users", "Users": "Users",
"View event page": "View event page",
"View everything": "View everything",
"Visible everywhere on the web (public)": "Visible everywhere on the web (public)", "Visible everywhere on the web (public)": "Visible everywhere on the web (public)",
"Waiting list": "Waiting list",
"We just sent an email to {email}": "We just sent an email to {email}", "We just sent an email to {email}": "We just sent an email to {email}",
"Website / URL": "Website / URL", "Website / URL": "Website / URL",
"Welcome back {username}": "Welcome back {username}", "Welcome back {username}": "Welcome back {username}",
@ -190,6 +224,7 @@
"You have one event tomorrow.": "You have no events tomorrow | You have one event tomorrow. | You have {count} events tomorrow", "You have one event tomorrow.": "You have no events tomorrow | You have one event tomorrow. | You have {count} events tomorrow",
"You need to login.": "You need to login.", "You need to login.": "You need to login.",
"You're not going to any event yet": "You're not going to any event yet", "You're not going to any event yet": "You're not going to any event yet",
"You're organizing this event": "You're organizing this event",
"Your account has been validated": "Your account has been validated", "Your account has been validated": "Your account has been validated",
"Your account is being validated": "Your account is being validated", "Your account is being validated": "Your account is being validated",
"Your account is nearly ready, {username}": "Your account is nearly ready, {username}", "Your account is nearly ready, {username}": "Your account is nearly ready, {username}",
@ -197,43 +232,9 @@
"e.g. 10 Rue Jangot": "e.g. 10 Rue Jangot", "e.g. 10 Rue Jangot": "e.g. 10 Rue Jangot",
"iCal Feed": "iCal Feed", "iCal Feed": "iCal Feed",
"meditate a bit": "meditate a bit", "meditate a bit": "meditate a bit",
"public event": "public event",
"{actor}'s avatar": "{actor}'s avatar", "{actor}'s avatar": "{actor}'s avatar",
"{approved} / {total} seats": "{approved} / {total} seats",
"{count} participants": "{count} participants", "{count} participants": "{count} participants",
"{count} requests waiting": "{count} requests waiting", "{count} requests waiting": "{count} requests waiting",
"© The Mobilizon Contributors {date} - Made with Elixir, Phoenix, VueJS & with some love and some weeks": "© The Mobilizon Contributors {date} - Made with Elixir, Phoenix, VueJS & with some love and some weeks", "© The Mobilizon Contributors {date} - Made with Elixir, Phoenix, VueJS & with some love and some weeks": "© The Mobilizon Contributors {date} - Made with Elixir, Phoenix, VueJS & with some love and some weeks"
"You're organizing this event": "You're organizing this event",
"View event page": "View event page",
"Manage participations": "Manage participations",
"Upcoming": "Upcoming",
"{approved} / {total} seats": "{approved} / {total} seats",
"My events": "My events",
"Load more": "Load more",
"Past events": "Passed events",
"View everything": "View everything",
"Last week": "Last week",
"Approve": "Approve",
"Reject": "Reject",
"Exclude": "Exclude",
"Creator": "Creator",
"Join event {title}": "Join event {title}",
"Cancel": "Cancel",
"Confirm my particpation": "Confirm my particpation",
"Manage participants": "Manage participants",
"No participants yet.": "No participants yet.",
"Participants": "Participants",
"Do you want to participate in {title}?": "Do you want to participate in {title}?",
"The event organizer has chosen to approve manually the participations to this event. You will receive a notification when your participation has been approved": "The event organizer has chosen to approve manually the participations to this event. You will receive a notification when your participation has been approved",
"The event came from another instance. Your participation will be confirmed after we confirm it with the other instance.": "The event came from another instance. Your participation will be confirmed after we confirm it with the other instance.",
"Waiting list": "Waiting list",
"Leaving event \"{title}\"": "Leaving event \"{title}\"",
"Are you sure you want to cancel your participation at event \"{title}\"?": "Are you sure you want to cancel your participation at event \"{title}\"?",
"Leave event": "Leave event",
"The report will be sent to the moderators of your instance. You can explain why you report this content below.": "The report will be sent to the moderators of your instance. You can explain why you report this content below.",
"Additional comments": "Additional comments",
"The content came from another server. Transfer an anonymous copy of the report?": "The content came from another server. Transfer an anonymous copy of the report ?",
"Transfer to {outsideDomain}": "Transfer to {outsideDomain}",
"Send the report": "Send the report",
"Report this event": "Report this event"
} }

View File

@ -8,12 +8,16 @@
"Add an address": "Ajouter une adresse", "Add an address": "Ajouter une adresse",
"Add to my calendar": "Ajouter à mon agenda", "Add to my calendar": "Ajouter à mon agenda",
"Add": "Ajouter", "Add": "Ajouter",
"Additional comments": "Commentaires additionnels",
"Administration": "Administration", "Administration": "Administration",
"Allow all comments": "Autoriser tous les commentaires", "Allow all comments": "Autoriser tous les commentaires",
"Approve": "Approuver",
"Are you going to this event?": "Allez-vous à cet événement ?", "Are you going to this event?": "Allez-vous à cet événement ?",
"Are you sure you want to cancel your participation at event \"{title}\"?": "Êtes-vous certain⋅e de vouloir annuler votre participation à l'événement « {title} » ?",
"Are you sure you want to delete this event? This action cannot be reverted.": "Êtes-vous certain⋅e de vouloir supprimer cet événement ? Cette action ne peut être annulée.", "Are you sure you want to delete this event? This action cannot be reverted.": "Êtes-vous certain⋅e de vouloir supprimer cet événement ? Cette action ne peut être annulée.",
"Before you can login, you need to click on the link inside it to validate your account": "Avant que vous puissiez vous enregistrer, vous devez cliquer sur le lien à l'intérieur pour valider votre compte", "Before you can login, you need to click on the link inside it to validate your account": "Avant que vous puissiez vous enregistrer, vous devez cliquer sur le lien à l'intérieur pour valider votre compte",
"By {name}": "Par {name}", "By {name}": "Par {name}",
"Cancel": "Annuler",
"Category": "Catégorie", "Category": "Catégorie",
"Change": "Modifier", "Change": "Modifier",
"Clear": "Effacer", "Clear": "Effacer",
@ -22,6 +26,7 @@
"Close comments for all (except for admins)": "Fermer les commentaires à tout le monde (excepté les administrateurs)", "Close comments for all (except for admins)": "Fermer les commentaires à tout le monde (excepté les administrateurs)",
"Comments on the event page": "Commentaires sur la page de l'événement", "Comments on the event page": "Commentaires sur la page de l'événement",
"Comments": "Commentaires", "Comments": "Commentaires",
"Confirm my particpation": "Confirmer ma particpation",
"Confirmed: Will happen": "Confirmé : aura lieu", "Confirmed: Will happen": "Confirmé : aura lieu",
"Country": "Pays", "Country": "Pays",
"Create a new event": "Créer un nouvel événement", "Create a new event": "Créer un nouvel événement",
@ -34,6 +39,7 @@
"Create token": "Créer un jeton", "Create token": "Créer un jeton",
"Create your communities and your events": "Créer vos communautés et vos événements", "Create your communities and your events": "Créer vos communautés et vos événements",
"Create": "Créer", "Create": "Créer",
"Creator": "Créateur",
"Current": "Actuel", "Current": "Actuel",
"Delete event": "Supprimer un événement", "Delete event": "Supprimer un événement",
"Delete this identity": "Supprimer cette identité", "Delete this identity": "Supprimer cette identité",
@ -47,6 +53,7 @@
"Display name": "Nom affiché", "Display name": "Nom affiché",
"Display participation price": "Afficher un prix de participation", "Display participation price": "Afficher un prix de participation",
"Displayed name": "Nom affiché", "Displayed name": "Nom affiché",
"Do you want to participate in {title}?": "Voulez-vous participer à {title} ?",
"Edit": "Éditer", "Edit": "Éditer",
"Either the account is already validated, either the validation token is incorrect.": "Soit le compte est déjà validé, soit le jeton de validation est incorrect.", "Either the account is already validated, either the validation token is incorrect.": "Soit le compte est déjà validé, soit le jeton de validation est incorrect.",
"Email": "Email", "Email": "Email",
@ -60,6 +67,8 @@
"Events nearby you": "Événements près de chez vous", "Events nearby you": "Événements près de chez vous",
"Events you're going at": "Événements auxquels vous vous rendez", "Events you're going at": "Événements auxquels vous vous rendez",
"Events": "Événements", "Events": "Événements",
"Exclude": "Exclure",
"Explore": "Explorer",
"Features": "Fonctionnalités", "Features": "Fonctionnalités",
"Find an address": "Trouver une adresse", "Find an address": "Trouver une adresse",
"Forgot your password ?": "Mot de passe oublié ?", "Forgot your password ?": "Mot de passe oublié ?",
@ -81,43 +90,54 @@
"Identity": "Identité", "Identity": "Identité",
"If an account with this email exists, we just sent another confirmation email to {email}": "Si un compte avec un tel email existe, nous venons juste d'envoyer un nouvel email de confirmation à {email}", "If an account with this email exists, we just sent another confirmation email to {email}": "Si un compte avec un tel email existe, nous venons juste d'envoyer un nouvel email de confirmation à {email}",
"If this identity is the only administrator of some groups, you need to delete them before being able to delete this identity.": "Si cette identité est la seule administratrice de certains groupes, vous devez les supprimer avant de pouvoir supprimer cette identité.", "If this identity is the only administrator of some groups, you need to delete them before being able to delete this identity.": "Si cette identité est la seule administratrice de certains groupes, vous devez les supprimer avant de pouvoir supprimer cette identité.",
"Join event {title}": "Rejoindre {title}",
"Join": "Rejoindre", "Join": "Rejoindre",
"Last published event": "Dernier événement publié", "Last published event": "Dernier événement publié",
"Last week": "La semaine dernière",
"Learn more on {0}": "En apprendre plus sur {0}", "Learn more on {0}": "En apprendre plus sur {0}",
"Learn more on": "En apprendre plus sur", "Learn more on": "En apprendre plus sur",
"Leave event": "Annuler ma participation à l'événement",
"Leave": "Quitter", "Leave": "Quitter",
"Leaving event \"{title}\"": "Annuler ma participation à l'événement",
"Legal": "Mentions légales", "Legal": "Mentions légales",
"License": "Licence", "License": "Licence",
"Limited places": "Places limitées", "Limited places": "Places limitées",
"Load more": "Voir plus",
"Loading…": "Chargement en cours…", "Loading…": "Chargement en cours…",
"Locality": "Commune", "Locality": "Commune",
"Log in": "Se connecter", "Log in": "Se connecter",
"Log out": "Se déconnecter", "Log out": "Se déconnecter",
"Login": "Se connecter", "Login": "Se connecter",
"Manage participants": "Gérer les participants",
"Manage participations": "Gérer les participations",
"Members": "Membres", "Members": "Membres",
"Moderated comments (shown after approval)": "Commentaires modérés (affichés après validation)", "Moderated comments (shown after approval)": "Commentaires modérés (affichés après validation)",
"My account": "Mon compte", "My account": "Mon compte",
"My events": "Mes événements",
"My identities": "Mes identités", "My identities": "Mes identités",
"Name": "Nom", "Name": "Nom",
"No address defined": "Aucune adresse définie", "No address defined": "Aucune adresse définie",
"No events found": "Aucun événement trouvé", "No events found": "Aucun événement trouvé",
"No group found": "Aucun groupe trouvé", "No group found": "Aucun groupe trouvé",
"No groups found": "Aucun groupe trouvé", "No groups found": "Aucun groupe trouvé",
"No participants yet.": "Pas de participants pour le moment.",
"No results for \"{queryText}\"": "Pas de résultats pour « {queryText} »", "No results for \"{queryText}\"": "Pas de résultats pour « {queryText} »",
"Number of places": "Nombre de places", "Number of places": "Nombre de places",
"One person is going": "Personne n'y va | Une personne y va | {approved} personnes y vont", "One person is going": "Personne n'y va | Une personne y va | {approved} personnes y vont",
"Only accessible through link and search (private)": "Uniquement accessibles par lien et la recherche (privé)", "Only accessible through link and search (private)": "Uniquement accessibles par lien et la recherche (privé)",
"Opened reports": "Signalements ouverts", "Opened reports": "Signalements ouverts",
"Organized": "Organisés",
"Organized by {name}": "Organisé par {name}", "Organized by {name}": "Organisé par {name}",
"Organized": "Organisés",
"Organizer": "Organisateur", "Organizer": "Organisateur",
"Other stuff…": "Autres trucs…", "Other stuff…": "Autres trucs…",
"Otherwise this identity will just be removed from the group administrators.": "Sinon cette identité sera juste supprimée des administrateurs du groupe.", "Otherwise this identity will just be removed from the group administrators.": "Sinon cette identité sera juste supprimée des administrateurs du groupe.",
"Page limited to my group (asks for auth)": "Accès limité à mon groupe (demande authentification)", "Page limited to my group (asks for auth)": "Accès limité à mon groupe (demande authentification)",
"Participants": "Participants",
"Participation approval": "Validation des participations", "Participation approval": "Validation des participations",
"Password (confirmation)": "Mot de passe (confirmation)",
"Password reset": "Réinitialisation du mot de passe", "Password reset": "Réinitialisation du mot de passe",
"Password": "Mot de passe", "Password": "Mot de passe",
"Password (confirmation)": "Mot de passe (confirmation)", "Past events": "Événements passés",
"Pick an identity": "Choisissez une identité", "Pick an identity": "Choisissez une identité",
"Please be nice to each other": "Soyez sympas entre vous", "Please be nice to each other": "Soyez sympas entre vous",
"Please check you spam folder if you didn't receive the email.": "Merci de vérifier votre dossier des indésirables si vous n'avez pas reçu l'email.", "Please check you spam folder if you didn't receive the email.": "Merci de vérifier votre dossier des indésirables si vous n'avez pas reçu l'email.",
@ -126,10 +146,12 @@
"Please read the full rules": "Merci de lire les règles complètes", "Please read the full rules": "Merci de lire les règles complètes",
"Please type at least 5 characters": "Merci d'entrer au moins 5 caractères", "Please type at least 5 characters": "Merci d'entrer au moins 5 caractères",
"Postal Code": "Code postal", "Postal Code": "Code postal",
"Private event": "Événement privé",
"Private feeds": "Flux privés", "Private feeds": "Flux privés",
"Promotion": "Mise en avant", "Promotion": "Mise en avant",
"Public RSS/Atom Feed": "Flux RSS/Atom public", "Public RSS/Atom Feed": "Flux RSS/Atom public",
"Public comment moderation": "Modération des commentaires publics", "Public comment moderation": "Modération des commentaires publics",
"Public event": "Événement public",
"Public feeds": "Flux publics", "Public feeds": "Flux publics",
"Public iCal Feed": "Flux iCal public", "Public iCal Feed": "Flux iCal public",
"Published events": "Événements publiés", "Published events": "Événements publiés",
@ -138,6 +160,8 @@
"Register an account on Mobilizon!": "S'inscrire sur Mobilizon !", "Register an account on Mobilizon!": "S'inscrire sur Mobilizon !",
"Register": "S'inscrire", "Register": "S'inscrire",
"Registration is currently closed.": "Les inscriptions sont actuellement fermées.", "Registration is currently closed.": "Les inscriptions sont actuellement fermées.",
"Reject": "Rejetter",
"Report this event": "Signaler cet événement",
"Report": "Signaler", "Report": "Signaler",
"Resend confirmation email": "Envoyer à nouveau l'email de confirmation", "Resend confirmation email": "Envoyer à nouveau l'email de confirmation",
"Reset my password": "Réinitialiser mon mot de passe", "Reset my password": "Réinitialiser mon mot de passe",
@ -148,6 +172,7 @@
"Searching…": "Recherche en cours…", "Searching…": "Recherche en cours…",
"Send confirmation email again": "Envoyer l'email de confirmation à nouveau", "Send confirmation email again": "Envoyer l'email de confirmation à nouveau",
"Send email to reset my password": "Envoyer un email pour réinitialiser mon mot de passe", "Send email to reset my password": "Envoyer un email pour réinitialiser mon mot de passe",
"Send the report": "Envoyer le signalement",
"Share this event": "Partager l'événement", "Share this event": "Partager l'événement",
"Show map": "Afficher la carte", "Show map": "Afficher la carte",
"Show remaining number of places": "Afficher le nombre de places restantes", "Show remaining number of places": "Afficher le nombre de places restantes",
@ -156,8 +181,12 @@
"Status": "Statut", "Status": "Statut",
"Street": "Rue", "Street": "Rue",
"Tentative: Will be confirmed later": "Provisoire : sera confirmé plus tard", "Tentative: Will be confirmed later": "Provisoire : sera confirmé plus tard",
"The content came from another server. Transfer an anonymous copy of the report?": "Le contenu provient d'une autre instance. Transférer une copie anonyme du signalement ?",
"The event came from another instance. Your participation will be confirmed after we confirm it with the other instance.": "L'événement provient d'une autre instance. Votre participation sera confirmée après que nous ayons la confirmation de l'autre instance.",
"The event organizer didn't add any description.": "L'organisateur de l'événement n'a pas ajouté de description.", "The event organizer didn't add any description.": "L'organisateur de l'événement n'a pas ajouté de description.",
"The event organizer has chosen to approve manually the participations to this event. You will receive a notification when your participation has been approved": "L'organisateur⋅ice de l'événement a choisi d'approuver manuellement les participations à cet événement. Vous recevrez une notification lorsque votre participation sera approuvée",
"The page you're looking for doesn't exist.": "La page que vous recherchez n'existe pas.", "The page you're looking for doesn't exist.": "La page que vous recherchez n'existe pas.",
"The report will be sent to the moderators of your instance. You can explain why you report this content below.": "Le signalement sera envoyé aux modérateur⋅ices de votre instance. Vous pouvez expliquer pourquoi vous signalez ce contenu ci-dessous.",
"The {date} at {time}": "Le {date} à {time}", "The {date} at {time}": "Le {date} à {time}",
"The {date} from {startTime} to {endTime}": "Le {date} de {startTime} à {endTime}", "The {date} from {startTime} to {endTime}": "Le {date} de {startTime} à {endTime}",
"There are {participants} participants.": "Il n'y a qu'un⋅e participant⋅e. | Il y a {participants} participants.", "There are {participants} participants.": "Il n'y a qu'un⋅e participant⋅e. | Il y a {participants} participants.",
@ -167,13 +196,18 @@
"Title": "Titre", "Title": "Titre",
"To confirm, type your event title \"{eventTitle}\"": "Pour confirmer, entrez le titre de l'événement « {eventTitle} »", "To confirm, type your event title \"{eventTitle}\"": "Pour confirmer, entrez le titre de l'événement « {eventTitle} »",
"To confirm, type your identity username \"{preferredUsername}\"": "Pour confirmer, entrez le nom de lidentité « {preferredUsername} »", "To confirm, type your identity username \"{preferredUsername}\"": "Pour confirmer, entrez le nom de lidentité « {preferredUsername} »",
"Transfer to {outsideDomain}": "Transférer à {outsideDomain}",
"Unknown error.": "Erreur inconnue.", "Unknown error.": "Erreur inconnue.",
"Upcoming": "À venir",
"Update event {name}": "Éditer l'événement {name}", "Update event {name}": "Éditer l'événement {name}",
"Update my event": "Éditer mon événement", "Update my event": "Éditer mon événement",
"User logout": "Déconnexion", "User logout": "Déconnexion",
"Username": "Pseudo", "Username": "Pseudo",
"Users": "Utilisateurs", "Users": "Utilisateurs",
"View event page": "Voir la page de l'événement",
"View everything": "Voir tout",
"Visible everywhere on the web (public)": "Visible partout sur le web (public)", "Visible everywhere on the web (public)": "Visible partout sur le web (public)",
"Waiting list": "Liste d'attente",
"We just sent an email to {email}": "Nous venons d'envoyer un email à {email}", "We just sent an email to {email}": "Nous venons d'envoyer un email à {email}",
"Website / URL": "Site web / URL", "Website / URL": "Site web / URL",
"Welcome back {username}": "Bon retour {username}", "Welcome back {username}": "Bon retour {username}",
@ -190,6 +224,7 @@
"You have one event tomorrow.": "Vous n'avez pas d'événement demain | Vous avez un événement demain. | Vous avez {count} événements demain", "You have one event tomorrow.": "Vous n'avez pas d'événement demain | Vous avez un événement demain. | Vous avez {count} événements demain",
"You need to login.": "Vous devez vous connecter.", "You need to login.": "Vous devez vous connecter.",
"You're not going to any event yet": "Vous n'allez à aucun événement pour le moment", "You're not going to any event yet": "Vous n'allez à aucun événement pour le moment",
"You're organizing this event": "Vous organisez cet événement",
"Your account has been validated": "Votre compte a été validé", "Your account has been validated": "Votre compte a été validé",
"Your account is being validated": "Votre compte est en cours de validation", "Your account is being validated": "Votre compte est en cours de validation",
"Your account is nearly ready, {username}": "Votre compte est presque prêt, {username}", "Your account is nearly ready, {username}": "Votre compte est presque prêt, {username}",
@ -197,42 +232,9 @@
"e.g. 10 Rue Jangot": "par exemple : 10 Rue Jangot", "e.g. 10 Rue Jangot": "par exemple : 10 Rue Jangot",
"iCal Feed": "Flux iCal", "iCal Feed": "Flux iCal",
"meditate a bit": "méditez un peu", "meditate a bit": "méditez un peu",
"public event": "événement public",
"{actor}'s avatar": "Avatar de {actor}", "{actor}'s avatar": "Avatar de {actor}",
"{approved} / {total} seats": "{approved} / {total} places",
"{count} participants": "Un⋅e participant⋅e|{count} participant⋅e⋅s", "{count} participants": "Un⋅e participant⋅e|{count} participant⋅e⋅s",
"{count} requests waiting": "Un⋅e demande en attente|{count} demandes en attente", "{count} requests waiting": "Un⋅e demande en attente|{count} demandes en attente",
"© The Mobilizon Contributors {date} - Made with Elixir, Phoenix, VueJS & with some love and some weeks": "© Les contributeurs de Mobilizon {date} - Fait avec Elixir, Phoenix, VueJS & et de l'amour et des semaines", "© The Mobilizon Contributors {date} - Made with Elixir, Phoenix, VueJS & with some love and some weeks": "© Les contributeurs de Mobilizon {date} - Fait avec Elixir, Phoenix, VueJS & et de l'amour et des semaines"
"You're organizing this event": "Vous organisez cet événement",
"View event page": "Voir la page de l'événement",
"Manage participations": "Gérer les participations",
"Upcoming": "À venir",
"{approved} / {total} seats": "{approved} / {total} places",
"My events": "Mes événements",
"Load more": "Voir plus",
"Past events": "Événements passés",
"View everything": "Voir tout",
"Last week": "La semaine dernière",
"Approve": "Approuver",
"Reject": "Rejetter",
"Exclude": "Exclure",
"Creator": "Créateur",
"Join event {title}": "Rejoindre {title}",
"Cancel": "Annuler",
"Confirm my particpation": "Confirmer ma particpation",
"Manage participants": "Gérer les participants",
"No participants yet.": "Pas de participants pour le moment.",
"Participants": "Participants",
"Do you want to participate in {title}?": "Voulez-vous participer à {title} ?",
"The event organizer has chosen to approve manually the participations to this event. You will receive a notification when your participation has been approved": "L'organisateur⋅ice de l'événement a choisi d'approuver manuellement les participations à cet événement. Vous recevrez une notification lorsque votre participation sera approuvée",
"The event came from another instance. Your participation will be confirmed after we confirm it with the other instance.": "L'événement provient d'une autre instance. Votre participation sera confirmée après que nous ayons la confirmation de l'autre instance.",
"Waiting list": "Liste d'attente",
"Leaving event \"{title}\"": "Annuler ma participation à l'événement",
"Are you sure you want to cancel your participation at event \"{title}\"?": "Êtes-vous certain⋅e de vouloir annuler votre participation à l'événement « {title} » ?",
"Leave event": "Annuler ma participation à l'événement",
"The report will be sent to the moderators of your instance. You can explain why you report this content below.": "Le signalement sera envoyé aux modérateur⋅ices de votre instance. Vous pouvez expliquer pourquoi vous signalez ce contenu ci-dessous.",
"Additional comments": "Commentaires additionnels",
"The content came from another server. Transfer an anonymous copy of the report?": "Le contenu provient d'une autre instance. Transférer une copie anonyme du signalement ?",
"Transfer to {outsideDomain}": "Transférer à {outsideDomain}",
"Send the report": "Envoyer le signalement",
"Report this event": "Signaler cet événement"
} }

View File

@ -7,12 +7,14 @@ const participations = () => import(/* webpackChunkName: "participations" */ '@/
const editEvent = () => import(/* webpackChunkName: "edit-event" */ '@/views/Event/Edit.vue'); const editEvent = () => import(/* webpackChunkName: "edit-event" */ '@/views/Event/Edit.vue');
const event = () => import(/* webpackChunkName: "event" */ '@/views/Event/Event.vue'); const event = () => import(/* webpackChunkName: "event" */ '@/views/Event/Event.vue');
const myEvents = () => import(/* webpackChunkName: "my-events" */ '@/views/Event/MyEvents.vue'); const myEvents = () => import(/* webpackChunkName: "my-events" */ '@/views/Event/MyEvents.vue');
const explore = () => import(/* webpackChunkName: "explore" */ '@/views/Event/Explore.vue');
// tslint:enable // tslint:enable
export enum EventRouteName { export enum EventRouteName {
EVENT_LIST = 'EventList', EVENT_LIST = 'EventList',
CREATE_EVENT = 'CreateEvent', CREATE_EVENT = 'CreateEvent',
MY_EVENTS = 'MyEvents', MY_EVENTS = 'MyEvents',
EXPLORE = 'Explore',
EDIT_EVENT = 'EditEvent', EDIT_EVENT = 'EditEvent',
PARTICIPATIONS = 'Participations', PARTICIPATIONS = 'Participations',
EVENT = 'Event', EVENT = 'Event',
@ -32,6 +34,12 @@ export const eventRoutes: RouteConfig[] = [
component: editEvent, component: editEvent,
meta: { requiredAuth: true }, meta: { requiredAuth: true },
}, },
{
path: '/events/explore',
name: EventRouteName.EXPLORE,
component: explore,
meta: { requiredAuth: false },
},
{ {
path: '/events/me', path: '/events/me',
name: EventRouteName.MY_EVENTS, name: EventRouteName.MY_EVENTS,

View File

@ -10,8 +10,6 @@ export interface IActor {
suspended: boolean; suspended: boolean;
avatar: IPicture | null; avatar: IPicture | null;
banner: IPicture | null; banner: IPicture | null;
displayName();
} }
export class Actor implements IActor { export class Actor implements IActor {

View File

@ -55,23 +55,23 @@ import {EventJoinOptions} from "@/types/event.model";
{{ $t('Who can view this event and participate') }} {{ $t('Who can view this event and participate') }}
</h2> </h2>
<div class="field"> <div class="field">
<b-radio v-model="eventVisibilityJoinOptions" <b-radio v-model="event.visibility"
name="eventVisibilityJoinOptions" name="eventVisibility"
:native-value="EventVisibilityJoinOptions.PUBLIC"> :native-value="EventVisibility.PUBLIC">
{{ $t('Visible everywhere on the web (public)') }} {{ $t('Visible everywhere on the web (public)') }}
</b-radio> </b-radio>
</div> </div>
<div class="field"> <div class="field">
<b-radio v-model="eventVisibilityJoinOptions" <b-radio v-model="event.visibility"
name="eventVisibilityJoinOptions" name="eventVisibility"
:native-value="EventVisibilityJoinOptions.LINK"> :native-value="EventVisibility.UNLISTED">
{{ $t('Only accessible through link and search (private)') }} {{ $t('Only accessible through link and search (private)') }}
</b-radio> </b-radio>
</div> </div>
<div class="field"> <div class="field">
<b-radio v-model="eventVisibilityJoinOptions" <b-radio v-model="event.visibility"
name="eventVisibilityJoinOptions" name="eventVisibility"
:native-value="EventVisibilityJoinOptions.LIMITED"> :native-value="EventVisibility.PRIVATE">
{{ $t('Page limited to my group (asks for auth)') }} {{ $t('Page limited to my group (asks for auth)') }}
</b-radio> </b-radio>
</div> </div>
@ -83,13 +83,6 @@ import {EventJoinOptions} from "@/types/event.model";
</b-switch> </b-switch>
</div> </div>
<div class="field">
<label class="label">{{ $t('Promotion') }}</label>
<b-switch v-model="doNotPromote" :disabled="canPromote === false">
{{ $t('Disallow promoting on Mobilizon')}}
</b-switch>
</div>
<div class="field"> <div class="field">
<b-switch v-model="limitedPlaces"> <b-switch v-model="limitedPlaces">
{{ $t('Limited places') }} {{ $t('Limited places') }}
@ -232,10 +225,8 @@ export default class EditEvent extends Vue {
pictureFile: File | null = null; pictureFile: File | null = null;
EventStatus = EventStatus; EventStatus = EventStatus;
EventVisibilityJoinOptions = EventVisibilityJoinOptions; EventVisibility = EventVisibility;
eventVisibilityJoinOptions: EventVisibilityJoinOptions = EventVisibilityJoinOptions.PUBLIC;
needsApproval: boolean = false; needsApproval: boolean = false;
doNotPromote: boolean = false;
canPromote: boolean = true; canPromote: boolean = true;
limitedPlaces: boolean = false; limitedPlaces: boolean = false;
CommentModeration = CommentModeration; CommentModeration = CommentModeration;
@ -339,26 +330,6 @@ export default class EditEvent extends Vue {
return new EventModel(result.data.event); return new EventModel(result.data.event);
} }
@Watch('eventVisibilityJoinOptions')
calculateVisibilityAndJoinOptions(eventVisibilityJoinOptions) {
switch (eventVisibilityJoinOptions) {
case EventVisibilityJoinOptions.PUBLIC:
this.event.visibility = EventVisibility.UNLISTED;
this.canPromote = true;
break;
case EventVisibilityJoinOptions.LINK:
this.event.visibility = EventVisibility.PRIVATE;
this.canPromote = false;
this.doNotPromote = false;
break;
case EventVisibilityJoinOptions.LIMITED:
this.event.visibility = EventVisibility.RESTRICTED;
this.canPromote = false;
this.doNotPromote = false;
break;
}
}
@Watch('needsApproval') @Watch('needsApproval')
updateEventJoinOptions(needsApproval) { updateEventJoinOptions(needsApproval) {
if (needsApproval === true) { if (needsApproval === true) {

View File

@ -38,10 +38,11 @@
<div class="metadata columns"> <div class="metadata columns">
<div class="column is-three-quarters-desktop"> <div class="column is-three-quarters-desktop">
<p class="tags" v-if="event.category || event.tags.length > 0"> <p class="tags" v-if="event.category || event.tags.length > 0">
<span class="tag" v-if="event.category">{{ event.category }}</span> <!-- <span class="tag" v-if="event.category">{{ event.category }}</span>-->
<span class="tag" v-if="event.tags" v-for="tag in event.tags">{{ tag.title }}</span> <span class="tag" v-if="event.tags" v-for="tag in event.tags">{{ tag.title }}</span>
<span class="visibility"> <span class="visibility">
<span v-if="event.visibility === EventVisibility.PUBLIC">{{ $t('public event') }}</span> <span v-if="event.visibility === EventVisibility.PUBLIC">{{ $t('Public event') }}</span>
<span v-if="event.visibility === EventVisibility.UNLISTED">{{ $t('Private event') }}</span>
</span> </span>
</p> </p>
<div class="date-and-add-to-calendar"> <div class="date-and-add-to-calendar">
@ -84,7 +85,7 @@
<span v-if="!event.physicalAddress">{{ $t('No address defined') }}</span> <span v-if="!event.physicalAddress">{{ $t('No address defined') }}</span>
<div class="address" v-if="event.physicalAddress"> <div class="address" v-if="event.physicalAddress">
<address> <address>
<span class="addressDescription">{{ event.physicalAddress.description }}</span> <span class="addressDescription" :title="event.physicalAddress.description">{{ event.physicalAddress.description }}</span>
<span>{{ event.physicalAddress.floor }} {{ event.physicalAddress.street }}</span> <span>{{ event.physicalAddress.floor }} {{ event.physicalAddress.street }}</span>
<span>{{ event.physicalAddress.postalCode }} {{ event.physicalAddress.locality }}</span> <span>{{ event.physicalAddress.postalCode }} {{ event.physicalAddress.locality }}</span>
<!-- <span>{{ event.physicalAddress.region }} {{ event.physicalAddress.country }}</span>--> <!-- <span>{{ event.physicalAddress.region }} {{ event.physicalAddress.country }}</span>-->
@ -93,7 +94,7 @@
{{ $t('Show map') }} {{ $t('Show map') }}
</span> </span>
</div> </div>
<b-modal v-if="event.physicalAddress && event.physicalAddress.geom" :active.sync="showMap" :width="800" scroll="keep"> <b-modal v-if="event.physicalAddress && event.physicalAddress.geom" :active.sync="showMap" scroll="keep">
<div class="map"> <div class="map">
<map-leaflet <map-leaflet
:coords="event.physicalAddress.geom" :coords="event.physicalAddress.geom"
@ -444,6 +445,8 @@ export default class Event extends EventMixin {
white-space: nowrap; white-space: nowrap;
flex: 1 0 auto; flex: 1 0 auto;
min-width: 100%; min-width: 100%;
max-width: 4rem;
overflow: hidden;
} }
:not(.addressDescription) { :not(.addressDescription) {

View File

@ -0,0 +1,42 @@
<template>
<section>
<h1 class="title">{{ $t('Explore') }}</h1>
<!-- <pre>{{ events }}</pre>-->
<b-loading :active.sync="$apollo.loading"></b-loading>
<div v-if="events.length > 0" class="columns is-multiline">
<EventCard
v-for="event in events"
:key="event.uuid"
:event="event"
class="column is-one-quarter-desktop"
/>
</div>
<b-message v-else-if="events.length === 0 && $apollo.loading === false" type="is-danger">
{{ $t('No events found') }}
</b-message>
</section>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import EventCard from '@/components/Event/EventCard.vue';
import { FETCH_EVENTS } from '@/graphql/event';
import { IEvent } from '@/types/event.model';
@Component({
components: {
EventCard,
},
apollo: {
events: {
query: FETCH_EVENTS,
},
},
})
export default class Explore extends Vue {
events: IEvent[] = [];
}
</script>
<style scoped>
</style>

View File

@ -1,5 +1,5 @@
<template> <template>
<main class="container"> <main>
<h1 class="title"> <h1 class="title">
{{ $t('My events') }} {{ $t('My events') }}
</h1> </h1>
@ -87,8 +87,6 @@ import EventListCard from '@/components/Event/EventListCard.vue';
}, },
}) })
export default class MyEvents extends Vue { export default class MyEvents extends Vue {
@Prop(String) location!: string;
futurePage: number = 1; futurePage: number = 1;
pastPage: number = 1; pastPage: number = 1;
limit: number = 10; limit: number = 10;

View File

@ -7,6 +7,8 @@ defmodule MobilizonWeb.API.Utils do
alias Mobilizon.Config alias Mobilizon.Config
alias Mobilizon.Service.Formatter alias Mobilizon.Service.Formatter
@ap_public "https://www.w3.org/ns/activitystreams#Public"
@doc """ @doc """
Determines the full audience based on mentions for a public audience Determines the full audience based on mentions for a public audience
@ -16,7 +18,7 @@ defmodule MobilizonWeb.API.Utils do
""" """
@spec get_to_and_cc(Actor.t(), list(), map(), String.t()) :: {list(), list()} @spec get_to_and_cc(Actor.t(), list(), map(), String.t()) :: {list(), list()}
def get_to_and_cc(%Actor{} = actor, mentions, inReplyTo, :public) do def get_to_and_cc(%Actor{} = actor, mentions, inReplyTo, :public) do
to = ["https://www.w3.org/ns/activitystreams#Public" | mentions] to = [@ap_public | mentions]
cc = [actor.followers_url] cc = [actor.followers_url]
if inReplyTo do if inReplyTo do
@ -36,7 +38,7 @@ defmodule MobilizonWeb.API.Utils do
@spec get_to_and_cc(Actor.t(), list(), map(), String.t()) :: {list(), list()} @spec get_to_and_cc(Actor.t(), list(), map(), String.t()) :: {list(), list()}
def get_to_and_cc(%Actor{} = actor, mentions, inReplyTo, :unlisted) do def get_to_and_cc(%Actor{} = actor, mentions, inReplyTo, :unlisted) do
to = [actor.followers_url | mentions] to = [actor.followers_url | mentions]
cc = ["https://www.w3.org/ns/activitystreams#Public"] cc = [@ap_public]
if inReplyTo do if inReplyTo do
{Enum.uniq([inReplyTo.actor | to]), cc} {Enum.uniq([inReplyTo.actor | to]), cc}
@ -49,7 +51,7 @@ defmodule MobilizonWeb.API.Utils do
Determines the full audience based on mentions based on a private audience Determines the full audience based on mentions based on a private audience
Audience is: Audience is:
* `to` : the mentionned actors, actor's followers and the eventual actor we're replying to * `to` : the mentioned actors, actor's followers and the eventual actor we're replying to
* `cc` : none * `cc` : none
""" """
@spec get_to_and_cc(Actor.t(), list(), map(), String.t()) :: {list(), list()} @spec get_to_and_cc(Actor.t(), list(), map(), String.t()) :: {list(), list()}
@ -62,7 +64,7 @@ defmodule MobilizonWeb.API.Utils do
Determines the full audience based on mentions based on a direct audience Determines the full audience based on mentions based on a direct audience
Audience is: Audience is:
* `to` : the mentionned actors and the eventual actor we're replying to * `to` : the mentioned actors and the eventual actor we're replying to
* `cc` : none * `cc` : none
""" """
@spec get_to_and_cc(Actor.t(), list(), map(), String.t()) :: {list(), list()} @spec get_to_and_cc(Actor.t(), list(), map(), String.t()) :: {list(), list()}

View File

@ -35,6 +35,7 @@ defmodule Mobilizon.Service.ActivityPub.Converters.Event do
{:address, address_id} <- {:address, address_id} <-
{:address, get_address(object["location"])}, {:address, get_address(object["location"])},
{:tags, tags} <- {:tags, fetch_tags(object["tag"])}, {:tags, tags} <- {:tags, fetch_tags(object["tag"])},
{:visibility, visibility} <- {:visibility, get_visibility(object)},
{:options, options} <- {:options, get_options(object)} do {:options, options} <- {:options, get_options(object)} do
picture_id = picture_id =
with true <- Map.has_key?(object, "attachment") && length(object["attachment"]) > 0, with true <- Map.has_key?(object, "attachment") && length(object["attachment"]) > 0,
@ -59,6 +60,7 @@ defmodule Mobilizon.Service.ActivityPub.Converters.Event do
"begins_on" => object["startTime"], "begins_on" => object["startTime"],
"ends_on" => object["endTime"], "ends_on" => object["endTime"],
"category" => object["category"], "category" => object["category"],
"visibility" => visibility,
"join_options" => object["joinOptions"], "join_options" => object["joinOptions"],
"url" => object["id"], "url" => object["id"],
"uuid" => object["uuid"], "uuid" => object["uuid"],
@ -148,6 +150,16 @@ defmodule Mobilizon.Service.ActivityPub.Converters.Event do
end) end)
end end
@ap_public "https://www.w3.org/ns/activitystreams#Public"
defp get_visibility(object) do
cond do
@ap_public in object["to"] -> :public
@ap_public in object["cc"] -> :unlisted
true -> :private
end
end
@doc """ @doc """
Convert an event struct to an ActivityStream representation Convert an event struct to an ActivityStream representation
""" """