feat(export): implement collection export for ics/rss/widget

This commit is contained in:
lesion 2023-11-03 23:03:53 +01:00
parent c333430ee6
commit a0de5547c7
No known key found for this signature in database
GPG key ID: 352918250B012177
4 changed files with 426 additions and 412 deletions

View file

@ -1,7 +1,6 @@
<template lang="pug"> <template lang="pug">
v-row v-row
v-col(cols=12) v-col(sm=3 cols=12)
span {{ filters }} - {{ meta }}
v-switch( v-switch(
v-if='settings.allow_recurrent_event' v-if='settings.allow_recurrent_event'
v-model='show_recurrent' v-model='show_recurrent'
@ -9,13 +8,12 @@ v-row
inset color='primary' inset color='primary'
hide-details hide-details
:label="$t('event.show_recurrent')") :label="$t('event.show_recurrent')")
v-col.mb-4(cols=12) v-col(sm="5" cols=12)
v-autocomplete.p-0( v-autocomplete.p-0(
:disabled='!!collection'
v-model="filters"
outlined outlined
rounded :label='$t("common.filter")'
:label='$t("common.search")'
:filter='filter'
cache-items
hide-details hide-details
color='primary' color='primary'
hide-selected hide-selected
@ -45,6 +43,29 @@ v-row
v-list-item-content v-list-item-content
v-list-item-title(v-text='item.label') v-list-item-title(v-text='item.label')
v-list-item-subtitle(v-if='item.type ==="place"' v-text='item.label !== "online" && item.address') v-list-item-subtitle(v-if='item.type ==="place"' v-text='item.label !== "online" && item.address')
v-col(sm=4 cols=12)
v-autocomplete.p-0(
:disabled='!!filters.length'
v-model="collection"
outlined
:label='$t("common.collections")'
hide-details
color='primary'
hide-selected
:menu-props="{ maxWidth: '400' }"
:items='collections'
@change='change'
hide-no-data
clearable
:clear-icon='mdiCloseCircle'
item-text='name')
template(v-slot:itsdfems='{ item }')
v-list-item-avatar
v-icon(v-text="item.type === 'place' ? mdiMapMarker : item.type === 'tag' ? mdiTag : mdiCollage")
v-list-item-content
v-list-item-title(v-text='item.label')
v-list-item-subtitle(v-if='item.type ==="place"' v-text='item.label !== "online" && item.address')
</template> </template>
<script> <script>
@ -55,23 +76,23 @@ import debounce from 'lodash/debounce'
export default { export default {
name: 'Search', name: 'Search',
props: { props: {
filters: { type: Object, default: () => ({ }) } value: { type: Object, default: () => ({ }) }
}, },
data () { data () {
return { return {
mdiTag, mdiMapMarker, mdiCloseCircle, mdiCollage, mdiTag, mdiMapMarker, mdiCloseCircle, mdiCollage,
// meta: [],
items: [], items: [],
show_recurrent: this.filters.show_recurrent || false filters: [],
collection: null,
collections: [],
show_recurrent: this.value.show_recurrent || false
} }
}, },
async fetch () {
this.collections = await this.$axios.$get('/collections')
},
computed: { computed: {
...mapState(['settings']), ...mapState(['settings']),
meta: {
get () {
return this.filters
}
}
}, },
methods: { methods: {
filter (item, queryText, itemText) { filter (item, queryText, itemText) {
@ -80,27 +101,31 @@ export default {
}, },
search: debounce(async function(search) { search: debounce(async function(search) {
this.items = await this.$axios.$get(`/event/meta?search=${search.target.value}`) this.items = await this.$axios.$get(`/event/meta?search=${search.target.value}`)
console.error('items ', this.items.length)
}, 100), }, 100),
remove (item) { remove (item) {
console.error(item) // const filters = {
// tags: this.filters.filter(t => t.type === 'tag' && t.label !== item.label).map(t => t.label),
// places: this.filters.filter(p => p.type === 'place' && p.id !== item.id).map(p => p.id),
// show_recurrent: this.show_recurrent
// }
this.filters = this.filters.filter(m => m.type !== item.type || m.type === 'place' ? m.id !== item.id : m.label !== item.label) this.filters = this.filters.filter(m => m.type !== item.type || m.type === 'place' ? m.id !== item.id : m.label !== item.label)
this.$emit('update', filters) // this.$emit('input', filters)
// this.change() this.change()
}, },
change (v, i) { change () {
console.error(v, i) if (this.collection) {
if (!v) return this.filters = []
const collection = v.find(c => c.type === 'collection') this.$emit('input', { collection: this.collection, places: [], tags: [], show_recurrent: this.show_recurrent })
if (collection) { } else {
this.$emit('update', { collection: collection.label, places: [], tags: [] })
return const filters = {
tags: this.filters.filter(t => t.type === 'tag').map(t => t.label),
places: this.filters.filter(p => p.type === 'place').map(p => p.id),
show_recurrent: this.show_recurrent
}
this.$emit('input', filters)
} }
const filters = {
tags: v.filter(t => t.type === 'tag').map(t => t.label),
places: v.filter(p => p.type === 'place').map(p => p.id),
show_recurrent: this.show_recurrent
}
this.$emit('update', filters)
} }
} }
} }

View file

@ -1,365 +1,366 @@
{ {
"common": { "common": {
"add_event": "Add event", "add_event": "Add event",
"next": "Next", "next": "Next",
"export": "Export", "export": "Export",
"send": "Send", "send": "Send",
"where": "Where", "where": "Where",
"address": "Address", "address": "Address",
"when": "When", "when": "When",
"what": "What", "what": "What",
"media": "Media", "media": "Media",
"login": "Login", "login": "Login",
"email": "E-mail", "email": "E-mail",
"password": "Password", "password": "Password",
"register": "Register", "register": "Register",
"description": "Description", "description": "Description",
"remove": "Remove", "remove": "Remove",
"hide": "Hide", "hide": "Hide",
"search": "Search", "search": "Search",
"edit": "Edit", "edit": "Edit",
"info": "Info", "info": "Info",
"confirm": "Confirm", "confirm": "Confirm",
"admin": "Admin", "admin": "Admin",
"users": "Users", "users": "Users",
"events": "Events", "events": "Events",
"places": "Places", "places": "Places",
"settings": "Options", "settings": "Options",
"actions": "Actions", "actions": "Actions",
"deactivate": "Turn off", "deactivate": "Turn off",
"remove_admin": "Remove admin", "remove_admin": "Remove admin",
"activate": "Activate", "activate": "Activate",
"save": "Save", "save": "Save",
"preview": "Preview", "preview": "Preview",
"logout": "Log out", "logout": "Log out",
"share": "Share", "share": "Share",
"name": "Name", "name": "Name",
"associate": "Associate", "associate": "Associate",
"edit_event": "Edit event", "edit_event": "Edit event",
"related": "Related", "related": "Related",
"add": "Add", "add": "Add",
"logout_ok": "Logged out", "logout_ok": "Logged out",
"copy": "Copy", "copy": "Copy",
"recover_password": "Recover password", "recover_password": "Recover password",
"new_password": "New password", "new_password": "New password",
"new_user": "New user", "new_user": "New user",
"ok": "Ok", "ok": "Ok",
"cancel": "Cancel", "cancel": "Cancel",
"enable": "Enable", "enable": "Enable",
"disable": "Disable", "disable": "Disable",
"me": "You", "me": "You",
"password_updated": "Password changed.", "password_updated": "Password changed.",
"resources": "Resources", "resources": "Resources",
"n_resources": "no resource|a resource|{n} resources", "n_resources": "no resource|a resource|{n} resources",
"activate_user": "Confirmed", "activate_user": "Confirmed",
"displayname": "Display name", "displayname": "Display name",
"federation": "Federation", "federation": "Federation",
"set_password": "Set password", "set_password": "Set password",
"copy_link": "Copy link", "copy_link": "Copy link",
"send_via_mail": "Send e-mail", "send_via_mail": "Send e-mail",
"add_to_calendar": "Add to calendar", "add_to_calendar": "Add to calendar",
"instances": "Instances", "instances": "Instances",
"copied": "Copied", "copied": "Copied",
"embed": "Embed", "embed": "Embed",
"embed_title": "Embed this event on your website", "embed_title": "Embed this event on your website",
"embed_help": "Copying the following code into your website and the event will be shown like here", "embed_help": "Copying the following code into your website and the event will be shown like here",
"feed": "RSS Feed", "feed": "RSS Feed",
"feed_url_copied": "Open the copied feed URL in your RSS feed reader", "feed_url_copied": "Open the copied feed URL in your RSS feed reader",
"follow_me_title": "Follow updates from fediverse", "follow_me_title": "Follow updates from fediverse",
"follow": "Follow", "follow": "Follow",
"moderation": "Moderation", "moderation": "Moderation",
"user": "User", "user": "User",
"authorize": "Authorize", "authorize": "Authorize",
"title": "Title", "title": "Title",
"filter": "Filter", "filter": "Filter",
"event": "Event", "event": "Event",
"pause": "Pause", "pause": "Pause",
"start": "Start", "start": "Start",
"fediverse": "Fediverse", "fediverse": "Fediverse",
"skip": "Skip", "skip": "Skip",
"delete": "Remove", "delete": "Remove",
"announcements": "Announcements", "announcements": "Announcements",
"url": "URL", "url": "URL",
"place": "Place", "place": "Place",
"tags": "Tags", "tags": "Tags",
"tag": "Tag", "tag": "Tag",
"theme": "Theme", "theme": "Theme",
"reset": "Reset", "reset": "Reset",
"import": "Import", "import": "Import",
"max_events": "N. max events", "max_events": "N. max events",
"label": "Label", "label": "Label",
"collections": "Collections", "collections": "Collections",
"close": "Close", "close": "Close",
"plugins": "Plugins", "plugins": "Plugins",
"help_translate": "Help Translate", "help_translate": "Help Translate",
"show_map": "Show map", "show_map": "Show map",
"calendar": "Calendar", "calendar": "Calendar",
"home": "Home", "home": "Home",
"about": "About", "about": "About",
"content": "Content", "content": "Content",
"admin_actions": "Admin actions", "admin_actions": "Admin actions",
"recurring_event_actions": "Recurring event actions", "recurring_event_actions": "Recurring event actions",
"latitude": "Latitude", "latitude": "Latitude",
"longitude": "Longitude", "longitude": "Longitude",
"search_coordinates": "Search coordinates", "search_coordinates": "Search coordinates",
"online": "On-line", "online": "On-line",
"test": "Test", "test": "Test",
"show_preview": "Show preview", "show_preview": "Show preview",
"clone": "Clone" "clone": "Clone"
}, },
"login": { "login": {
"description": "By logging in you can publish new events.", "description": "By logging in you can publish new events.",
"check_email": "Check your e-mail inbox and spam.", "check_email": "Check your e-mail inbox and spam.",
"not_registered": "Not registered?", "not_registered": "Not registered?",
"forgot_password": "Forgot your password?", "forgot_password": "Forgot your password?",
"error": "Could not log in. Check your login info.", "error": "Could not log in. Check your login info.",
"insert_email": "Enter your e-mail address", "insert_email": "Enter your e-mail address",
"ok": "Logged in" "ok": "Logged in"
}, },
"recover": { "recover": {
"not_valid_code": "Something went wrong." "not_valid_code": "Something went wrong."
}, },
"export": { "export": {
"intro": "Unlike the unsocial platforms that do everything to keep users and data about them, we believe that information, like people, must be free. For this you can stay updated on the events you want, without necessarily going through this site.", "intro": "Unlike the unsocial platforms that do everything to keep users and data about them, we believe that information, like people, must be free. For this you can stay updated on the events you want, without necessarily going through this site.",
"email_description": "You can get events that interest sent via e-mail.", "email_description": "You can get events that interest sent via e-mail.",
"insert_your_address": "Enter your e-mail address", "insert_your_address": "Enter your e-mail address",
"feed_description": "To follow updates from a computer or smartphone without the need to periodically open this site, use RSS feeds. </p>\n\n<p> With RSS feeds you use a special app to receive updates from sites that interest you. It's a good way to follow many sites quickly, without the need to create an account or other complications. </p>\n\n<li> If you have Android, we recommend <a href=\"https://f-droid.org/en/packages/net.frju.flym/\">Flym</a> or Feeder </li>\n<li> For iPhone / iPad you can use <a href=\"https://itunes.apple.com/ua/app/feeds4u/id1038456442?mt=8\"> Feed4U </a> </li>\n<li> For desktop / laptop we recommend Feedbro, to be installed on <a href=\"https://addons.mozilla.org/en-GB/firefox/addon/feedbroreader/\"> Firefox </a> or <a href=\"https://chrome.google.com/webstore/detail/feedbro/mefgmmbdailogpfhfblcnnjfmnpnmdfa\"> Chrome </a>. </li>\n<br/>\nAdding this link to your RSS feed reader will keep you up to date.", "feed_description": "To follow updates from a computer or smartphone without the need to periodically open this site, use RSS feeds. </p>\n\n<p> With RSS feeds you use a special app to receive updates from sites that interest you. It's a good way to follow many sites quickly, without the need to create an account or other complications. </p>\n\n<li> If you have Android, we recommend <a href=\"https://f-droid.org/en/packages/net.frju.flym/\">Flym</a> or Feeder </li>\n<li> For iPhone / iPad you can use <a href=\"https://itunes.apple.com/ua/app/feeds4u/id1038456442?mt=8\"> Feed4U </a> </li>\n<li> For desktop / laptop we recommend Feedbro, to be installed on <a href=\"https://addons.mozilla.org/en-GB/firefox/addon/feedbroreader/\"> Firefox </a> or <a href=\"https://chrome.google.com/webstore/detail/feedbro/mefgmmbdailogpfhfblcnnjfmnpnmdfa\"> Chrome </a>. </li>\n<br/>\nAdding this link to your RSS feed reader will keep you up to date.",
"ical_description": "Computers and smartphones are commonly equipped with a calendar app capable of importing a remote calendar.", "ical_description": "Computers and smartphones are commonly equipped with a calendar app capable of importing a remote calendar.",
"list_description": "If you have a website and want to show a list of events, use the following code" "list_description": "If you have a website and want to show a list of events, use the following code",
}, "filter_description": "You can filter your export here by tags and place or by a preset collection"
"register": { },
"description": "Social movements should organize and self-finance.<br/>\n<br/>Before you can publish, <strong> the account must be approved</strong>, consider that <strong> behind this site you will find real people</strong>, so write two lines to let us know what events you would like to publish.", "register": {
"error": "Error: ", "description": "Social movements should organize and self-finance.<br/>\n<br/>Before you can publish, <strong> the account must be approved</strong>, consider that <strong> behind this site you will find real people</strong>, so write two lines to let us know what events you would like to publish.",
"complete": "Registration has to be confirmed.", "error": "Error: ",
"first_user": "Administrator created" "complete": "Registration has to be confirmed.",
}, "first_user": "Administrator created"
"event": { },
"anon": "Anon", "event": {
"anon_description": "You can add an event without registering or logging in, but will have to wait for someone to read it,\nconfirming that it is a suitable event. It will not be possible to modify it.<br/><br/>\nYou can instead <a href='/login'>log in</a> or <a href='/register'>register</a>. Otherwise go ahead and get an answer as soon as possible. ", "anon": "Anon",
"same_day": "on same day", "anon_description": "You can add an event without registering or logging in, but will have to wait for someone to read it,\nconfirming that it is a suitable event. It will not be possible to modify it.<br/><br/>\nYou can instead <a href='/login'>log in</a> or <a href='/register'>register</a>. Otherwise go ahead and get an answer as soon as possible. ",
"what_description": "Title", "same_day": "on same day",
"description_description": "Description", "what_description": "Title",
"tag_description": "Tag", "description_description": "Description",
"media_description": "You can add a flyer (optional)", "tag_description": "Tag",
"added": "Event added", "media_description": "You can add a flyer (optional)",
"saved": "Event saved", "added": "Event added",
"added_anon": "Event added, but has yet to be confirmed.", "saved": "Event saved",
"updated": "Event updated", "added_anon": "Event added, but has yet to be confirmed.",
"where_description": "Where's the event? If not present you can create it.", "updated": "Event updated",
"address_description": "What is the address?", "where_description": "Where's the event? If not present you can create it.",
"address_description_osm": "Search coordinates by typing the address. (<a href='http://osm.org/copyright'>OpenStreetMap</a> contributors)", "address_description": "What is the address?",
"confirmed": "Event confirmed", "address_description_osm": "Search coordinates by typing the address. (<a href='http://osm.org/copyright'>OpenStreetMap</a> contributors)",
"not_found": "Could not find event", "confirmed": "Event confirmed",
"remove_confirmation": "Are you sure you want to remove this event?", "not_found": "Could not find event",
"recurrent": "Recurring", "remove_confirmation": "Are you sure you want to remove this event?",
"edit_recurrent": "Edit recurring event:", "recurrent": "Recurring",
"show_recurrent": "recurring events", "edit_recurrent": "Edit recurring event:",
"show_multidate": "multidate events", "show_recurrent": "recurring events",
"show_past": "also prior events", "show_multidate": "multidate events",
"only_future": "only upcoming events", "show_past": "also prior events",
"recurrent_description": "Choose frequency and select days", "only_future": "only upcoming events",
"multidate_description": "Is it a festival? Choose when it starts and ends", "recurrent_description": "Choose frequency and select days",
"multidate": "More days", "multidate_description": "Is it a festival? Choose when it starts and ends",
"normal": "Normal", "multidate": "More days",
"normal_description": "Choose the day.", "normal": "Normal",
"recurrent_1w_days": "Each {days}", "normal_description": "Choose the day.",
"recurrent_2w_days": "A {days} every other", "recurrent_1w_days": "Each {days}",
"recurrent_1m_days": "The {days} of each month", "recurrent_2w_days": "A {days} every other",
"recurrent_2m_days": "The {days} a month every other", "recurrent_1m_days": "The {days} of each month",
"recurrent_1m_ordinal": "Each {n} {days} of the month", "recurrent_2m_days": "The {days} a month every other",
"recurrent_2m_ordinal": "Each {n} {days} a month every other", "recurrent_1m_ordinal": "Each {n} {days} of the month",
"each_week": "Each week", "recurrent_2m_ordinal": "Each {n} {days} a month every other",
"each_2w": "Every other weeks", "each_week": "Each week",
"each_month": "Each month", "each_2w": "Every other weeks",
"due": "until", "each_month": "Each month",
"from": "From", "due": "until",
"image_too_big": "The image can't be bigger than 4MB", "from": "From",
"interact_with_me_at": "Interact with me on fediverse at", "image_too_big": "The image can't be bigger than 4MB",
"follow_me_description": "One of the ways to stay up to date on events published here on {title},\nis following the account <u>{account}</u> from the fediverse, for example via Mastodon, and possibly add resources to an event from there.<br/><br/>\nIf you have never heard of Mastodon and the fediverse we recommend reading <a href='https://www.savjee.be/videos/simply-explained/mastodon-and-fediverse-explained/'>this article</a>.<br/><br/>Enter your instance below (e.g. mastodon.social)", "interact_with_me_at": "Interact with me on fediverse at",
"interact_with_me": "Follow me", "follow_me_description": "One of the ways to stay up to date on events published here on {title},\nis following the account <u>{account}</u> from the fediverse, for example via Mastodon, and possibly add resources to an event from there.<br/><br/>\nIf you have never heard of Mastodon and the fediverse we recommend reading <a href='https://www.savjee.be/videos/simply-explained/mastodon-and-fediverse-explained/'>this article</a>.<br/><br/>Enter your instance below (e.g. mastodon.social)",
"remove_recurrent_confirmation": "Are you sure you want to remove this recurring event?\nPast events will be maintained, but no further events will be created.", "interact_with_me": "Follow me",
"import_URL": "Import from URL", "remove_recurrent_confirmation": "Are you sure you want to remove this recurring event?\nPast events will be maintained, but no further events will be created.",
"import_ICS": "Import from ICS", "import_URL": "Import from URL",
"ics": "ICS", "import_ICS": "Import from ICS",
"import_description": "You can import events from other platforms and other instances through standard formats (ics and h-event)", "ics": "ICS",
"alt_text_description": "Description for people with visual impairments", "import_description": "You can import events from other platforms and other instances through standard formats (ics and h-event)",
"choose_focal_point": "Choose the focal point", "alt_text_description": "Description for people with visual impairments",
"remove_media_confirmation": "Do you confirm the image removal?", "choose_focal_point": "Choose the focal point",
"download_flyer": "Download flyer", "remove_media_confirmation": "Do you confirm the image removal?",
"where_advanced_options": "Place - Advanced options", "download_flyer": "Download flyer",
"where_advanced_options_description": "Define here additional place properties", "where_advanced_options": "Place - Advanced options",
"online_locations": "Online locations", "where_advanced_options_description": "Define here additional place properties",
"online_locations_help": "For instance an url to a videconference room and a fallback url (max. 3)", "online_locations": "Online locations",
"online_locations_fallback_urls": "Fallback links", "online_locations_help": "For instance an url to a videconference room and a fallback url (max. 3)",
"address_geocoded_disclaimer": "If you cannot find the <strong>street address</strong> or the <strong>housenumber</strong> you are looking for in the geocoding results, you can manually insert them in the 'Address' field without loose the coordinates. Consider also that the <a target=\"_blank\" href=\"https://www.openstreetmap.org/\">OpenStreetMap</a> project is open to contributions. If you have Android, we recommend <a target=\"_blank\" href=\"https://f-droid.org/en/packages/de.westnordost.streetcomplete/\">StreetComplete</a> " "online_locations_fallback_urls": "Fallback links",
}, "address_geocoded_disclaimer": "If you cannot find the <strong>street address</strong> or the <strong>housenumber</strong> you are looking for in the geocoding results, you can manually insert them in the 'Address' field without loose the coordinates. Consider also that the <a target=\"_blank\" href=\"https://www.openstreetmap.org/\">OpenStreetMap</a> project is open to contributions. If you have Android, we recommend <a target=\"_blank\" href=\"https://f-droid.org/en/packages/de.westnordost.streetcomplete/\">StreetComplete</a> "
"admin": { },
"place_description": "If you have gotten the place or address wrong, you can change it.<br/>All current and past events associated with this place will change address.", "admin": {
"event_confirm_description": "You can confirm events entered by anonymous users here", "place_description": "If you have gotten the place or address wrong, you can change it.<br/>All current and past events associated with this place will change address.",
"delete_user": "Remove", "event_confirm_description": "You can confirm events entered by anonymous users here",
"remove_admin": "Remove admin", "delete_user": "Remove",
"disable_user_confirm": "Are you sure you want to disable {user}?", "remove_admin": "Remove admin",
"delete_user_confirm": "Are you sure you want to remove {user}?", "disable_user_confirm": "Are you sure you want to disable {user}?",
"disable_admin_user_confirm": "Are you sure to remove admin permissions from {user}?", "delete_user_confirm": "Are you sure you want to remove {user}?",
"enable_admin_user_confirm": "Are you sure to add admin permissions to {user}?", "disable_admin_user_confirm": "Are you sure to remove admin permissions from {user}?",
"user_remove_ok": "User removed", "enable_admin_user_confirm": "Are you sure to add admin permissions to {user}?",
"user_create_ok": "User created", "user_remove_ok": "User removed",
"event_remove_ok": "Event removed", "user_create_ok": "User created",
"allow_registration_description": "Allow open registrations?", "event_remove_ok": "Event removed",
"allow_anon_event": "Allow anonymous events (has to be confirmed)?", "allow_registration_description": "Allow open registrations?",
"allow_multidate_event": "Allow multi-day events", "allow_anon_event": "Allow anonymous events (has to be confirmed)?",
"allow_recurrent_event": "Allow recurring events", "allow_multidate_event": "Allow multi-day events",
"allow_online_event": "Allow online events", "allow_recurrent_event": "Allow recurring events",
"allow_online_event_hint": "Ask for urls ", "allow_online_event": "Allow online events",
"allow_geolocation": "Allow events geolocation", "allow_online_event_hint": "Ask for urls ",
"recurrent_event_visible": "Show recurring events by default", "allow_geolocation": "Allow events geolocation",
"federation": "Federation / ActivityPub", "recurrent_event_visible": "Show recurring events by default",
"enable_federation": "Turn on federation", "federation": "Federation / ActivityPub",
"enable_federation_help": "It will be possible to follow this instance from the fediverse", "enable_federation": "Turn on federation",
"add_instance": "Add instance", "enable_federation_help": "It will be possible to follow this instance from the fediverse",
"select_instance_timezone": "Time zone", "add_instance": "Add instance",
"enable_resources": "Turn on resources", "select_instance_timezone": "Time zone",
"enable_resources_help": "Allows adding resources to the event from the fediverse", "enable_resources": "Turn on resources",
"hide_boost_bookmark": "Hides boost/bookmarks", "enable_resources_help": "Allows adding resources to the event from the fediverse",
"hide_boost_bookmark_help": "Hides the small icons showing the number of boosts and bookmarks coming from the fediverse", "hide_boost_bookmark": "Hides boost/bookmarks",
"block": "Block", "hide_boost_bookmark_help": "Hides the small icons showing the number of boosts and bookmarks coming from the fediverse",
"unblock": "Unblock", "block": "Block",
"user_add_help": "An e-mail with instructions on confirming the subscription and choosing a password will be sent to the new user", "unblock": "Unblock",
"instance_name": "Instance name", "user_add_help": "An e-mail with instructions on confirming the subscription and choosing a password will be sent to the new user",
"show_resource": "Show resource", "instance_name": "Instance name",
"hide_resource": "Hide resource", "show_resource": "Show resource",
"delete_resource": "Delete resource", "hide_resource": "Hide resource",
"delete_resource_confirm": "Are you sure you want to delete this resource?", "delete_resource": "Delete resource",
"delete_tag_confirm": "Are you sure you want to remove the tag \"{tag}\"? The tag will be removed from {n} events.", "delete_resource_confirm": "Are you sure you want to delete this resource?",
"block_user": "Block user", "delete_tag_confirm": "Are you sure you want to remove the tag \"{tag}\"? The tag will be removed from {n} events.",
"filter_instances": "Filter instances", "block_user": "Block user",
"filter_users": "Filter users", "filter_instances": "Filter instances",
"resources": "Resources", "filter_users": "Filter users",
"user_blocked": "User {user} blocked", "resources": "Resources",
"favicon": "Logo", "user_blocked": "User {user} blocked",
"user_block_confirm": "Are you sure you want to block user {user}?", "favicon": "Logo",
"instance_block_confirm": "Are you sure you want block instance {instance}?", "user_block_confirm": "Are you sure you want to block user {user}?",
"delete_announcement_confirm": "Are you sure you want to remove the announcement?", "instance_block_confirm": "Are you sure you want block instance {instance}?",
"announcement_remove_ok": "Announce removed", "delete_announcement_confirm": "Are you sure you want to remove the announcement?",
"announcement_description": "In this section you can insert announcements to remain on the homepage", "announcement_remove_ok": "Announce removed",
"instance_locale": "Default language", "announcement_description": "In this section you can insert announcements to remain on the homepage",
"instance_timezone_description": "Gancio is designed to collect the events of a specific place, such as a city. All events in this place will be shown in the time zone chosen for it.", "instance_locale": "Default language",
"instance_locale_description": "Preferred user language for pages. Sometimes messages must be shown in the same language for everyone (for example when publishing via ActivityPub or when sending some e-mails). In these cases the language selected above will be used.", "instance_timezone_description": "Gancio is designed to collect the events of a specific place, such as a city. All events in this place will be shown in the time zone chosen for it.",
"title_description": "It is used in the title of the page, in the subject of the e-mail to export RSS and ICS feeds.", "instance_locale_description": "Preferred user language for pages. Sometimes messages must be shown in the same language for everyone (for example when publishing via ActivityPub or when sending some e-mails). In these cases the language selected above will be used.",
"description_description": "Appears in the header next to the title", "title_description": "It is used in the title of the page, in the subject of the e-mail to export RSS and ICS feeds.",
"instance_place": "Indicative place of this instance", "description_description": "Appears in the header next to the title",
"instance_name_help": "ActivityPub's account to follow", "instance_place": "Indicative place of this instance",
"enable_trusted_instances": "Turn on friendly instances", "instance_name_help": "ActivityPub's account to follow",
"trusted_instances_help": "The list of friendly instances will be shown in the header", "enable_trusted_instances": "Turn on friendly instances",
"trusted_instances_label": "Navigation label to friendly instances", "trusted_instances_help": "The list of friendly instances will be shown in the header",
"trusted_instances_label_default": "Friendly instances", "trusted_instances_label": "Navigation label to friendly instances",
"trusted_instances_label_help": "The default label is 'Friendly instances'", "trusted_instances_label_default": "Friendly instances",
"add_trusted_instance": "Add a friendly instance", "trusted_instances_label_help": "The default label is 'Friendly instances'",
"instance_place_help": "The label to show in instances of others", "add_trusted_instance": "Add a friendly instance",
"delete_trusted_instance_confirm": "Do you really want to delete this item from the friend instance menu?", "instance_place_help": "The label to show in instances of others",
"is_dark": "Dark theme", "delete_trusted_instance_confirm": "Do you really want to delete this item from the friend instance menu?",
"add_link": "Add link", "is_dark": "Dark theme",
"footer_links": "Footer links", "add_link": "Add link",
"delete_footer_link_confirm": "Sure to remove this link?", "footer_links": "Footer links",
"edit_place": "Edit place", "delete_footer_link_confirm": "Sure to remove this link?",
"edit_tag": "Edit tag", "edit_place": "Edit place",
"edit_tag_help": "You can change the tag by replacing it with a new one or merging it with an existing one. The {n} associated events will also be changed.", "edit_tag": "Edit tag",
"new_announcement": "New announcement", "edit_tag_help": "You can change the tag by replacing it with a new one or merging it with an existing one. The {n} associated events will also be changed.",
"show_smtp_setup": "Email settings", "new_announcement": "New announcement",
"smtp_hostname": "SMTP Hostname", "show_smtp_setup": "Email settings",
"smtp_port": "SMTP Port", "smtp_hostname": "SMTP Hostname",
"smtp_secure": "SMTP Secure (TLS or STARTTLS)", "smtp_port": "SMTP Port",
"smtp_description": "<ul><li>Admin should receive an email when anon event is added (if enabled).</li><li>Admin should receive email of registration request (if enabled).</li><li>User should receive an email of registration request.</li><li>User should receive email of confirmed registration.</li><li>User should receive a confirmation email when subscribed directly by admin.</li><li>Users should receive email to restore password when they forgot it</li></ul>", "smtp_secure": "SMTP Secure (TLS or STARTTLS)",
"smtp_test_success": "A test email is sent to {admin_email}, please check your inbox", "smtp_description": "<ul><li>Admin should receive an email when anon event is added (if enabled).</li><li>Admin should receive email of registration request (if enabled).</li><li>User should receive an email of registration request.</li><li>User should receive email of confirmed registration.</li><li>User should receive a confirmation email when subscribed directly by admin.</li><li>Users should receive email to restore password when they forgot it</li></ul>",
"smtp_test_button": "Send a test email", "smtp_test_success": "A test email is sent to {admin_email}, please check your inbox",
"smtp_use_sendmail": "Use sendmail", "smtp_test_button": "Send a test email",
"admin_email": "Admin e-mail", "smtp_use_sendmail": "Use sendmail",
"admin_email_help": "The address we use as the sender to send emails. This is also the address to which admin emails are sent", "admin_email": "Admin e-mail",
"widget": "Widget", "admin_email_help": "The address we use as the sender to send emails. This is also the address to which admin emails are sent",
"wrong_domain_warning": "The baseurl configured in config.json <b>({baseurl})</b> differs from the one you're visiting <b>({url})</b>", "widget": "Widget",
"new_collection": "New collection", "wrong_domain_warning": "The baseurl configured in config.json <b>({baseurl})</b> differs from the one you're visiting <b>({url})</b>",
"collections_description": "Collections are groupings of events by tags and places. They will be displayed on the home page", "new_collection": "New collection",
"edit_collection": "Edit Collection", "collections_description": "Collections are groupings of events by tags and places. They will be displayed on the home page",
"delete_collection_confirm": "Are you sure you want to remove the collection <u>{collection}</u>?", "edit_collection": "Edit Collection",
"config_plugin": "Plugin configuration", "delete_collection_confirm": "Are you sure you want to remove the collection <u>{collection}</u>?",
"plugins_description": "Plugins are small pieces of code that provide additional features to the main application. They are usually written by developers external to the project that take advantage of the <a href=\"https://gancio.org/dev/plugins\">plugin system</a> to, mostly, but not limited to send events to other platforms and channels.", "config_plugin": "Plugin configuration",
"fallback_image": "Fallback image", "plugins_description": "Plugins are small pieces of code that provide additional features to the main application. They are usually written by developers external to the project that take advantage of the <a href=\"https://gancio.org/dev/plugins\">plugin system</a> to, mostly, but not limited to send events to other platforms and channels.",
"header_image": "Header image", "fallback_image": "Fallback image",
"hide_thumbs": "Hide thumbs", "header_image": "Header image",
"hide_calendar": "Hide calendar", "hide_thumbs": "Hide thumbs",
"default_images": "Default images", "hide_calendar": "Hide calendar",
"default_images_help": "You have to <a href='/admin?tab=theme'>refresh</a> the page to see the changes.", "default_images": "Default images",
"blocked": "Blocked", "default_images_help": "You have to <a href='/admin?tab=theme'>refresh</a> the page to see the changes.",
"domain": "Domain", "blocked": "Blocked",
"known_users": "Known users", "domain": "Domain",
"created_at": "Created at", "known_users": "Known users",
"geolocation_description": "<b>1. Define a provider for geocoding service</b>.<br>Currently, among those listed in the <a href=\"https://wiki.openstreetmap.org/wiki/Nominatim#Alternatives_.2F_Third-party_providers\">wiki of OpenStreetMap</a>, there is support for software <a href=\"https://github.com/osm-search/Nominatim\">Nominatim</a> and <a href=\"https://github.com/komoot/photon\">Photon</a>.<br>You can use one of the related official demos by copying the link in the 'Geocoding provider' field:<ul><li>https://nominatim.openstreetmap.org/search (<a href=\"https://operations.osmfoundation.org/policies/nominatim/\">Terms of Service</a>)</li><li>https://photon.komoot.io/api/ (<a href=\"https://photon.komoot.io/\">Terms of Service</a>)</li></ul><br><b>2. Define a provider for map layers.</b><br>You can find a list of them here: <a href=\"https://leaflet-extras.github.io/leaflet-providers/preview/\">https://leaflet-extras.github.io/leaflet-providers/preview/</a>", "created_at": "Created at",
"geocoding_provider_type": "Geocoding software", "geolocation_description": "<b>1. Define a provider for geocoding service</b>.<br>Currently, among those listed in the <a href=\"https://wiki.openstreetmap.org/wiki/Nominatim#Alternatives_.2F_Third-party_providers\">wiki of OpenStreetMap</a>, there is support for software <a href=\"https://github.com/osm-search/Nominatim\">Nominatim</a> and <a href=\"https://github.com/komoot/photon\">Photon</a>.<br>You can use one of the related official demos by copying the link in the 'Geocoding provider' field:<ul><li>https://nominatim.openstreetmap.org/search (<a href=\"https://operations.osmfoundation.org/policies/nominatim/\">Terms of Service</a>)</li><li>https://photon.komoot.io/api/ (<a href=\"https://photon.komoot.io/\">Terms of Service</a>)</li></ul><br><b>2. Define a provider for map layers.</b><br>You can find a list of them here: <a href=\"https://leaflet-extras.github.io/leaflet-providers/preview/\">https://leaflet-extras.github.io/leaflet-providers/preview/</a>",
"geocoding_provider_type_help": "The default software is Nominatim", "geocoding_provider_type": "Geocoding software",
"geocoding_provider": "Geocoding provider", "geocoding_provider_type_help": "The default software is Nominatim",
"geocoding_provider_help": "The default provider is Nominatim", "geocoding_provider": "Geocoding provider",
"geocoding_countrycodes": "Country codes", "geocoding_provider_help": "The default provider is Nominatim",
"geocoding_countrycodes_help": "Allows you to set a filter to searches based on area codes", "geocoding_countrycodes": "Country codes",
"geocoding_test_button": "Test geocoding", "geocoding_countrycodes_help": "Allows you to set a filter to searches based on area codes",
"geocoding_test_success": "The geocoding service at {service_name} is working", "geocoding_test_button": "Test geocoding",
"geocoding_test_error": "The geocoding service is not reachable at {service_name}", "geocoding_test_success": "The geocoding service at {service_name} is working",
"tilelayer_provider": "Tilelayer provider", "geocoding_test_error": "The geocoding service is not reachable at {service_name}",
"tilelayer_provider_help": "The default provider is OpenStreetMap", "tilelayer_provider": "Tilelayer provider",
"tilelayer_provider_attribution": "Attribution", "tilelayer_provider_help": "The default provider is OpenStreetMap",
"tilelayer_test_button": "Test tilelayer", "tilelayer_provider_attribution": "Attribution",
"tilelayer_test_success": "The tilelayer service at {service_name} is working", "tilelayer_test_button": "Test tilelayer",
"tilelayer_test_error": "The tilelayer service is not reachable at {service_name}", "tilelayer_test_success": "The tilelayer service at {service_name} is working",
"geolocation": "Geolocation", "tilelayer_test_error": "The tilelayer service is not reachable at {service_name}",
"colors": "Colors" "geolocation": "Geolocation",
}, "colors": "Colors"
"auth": { },
"not_confirmed": "Not confirmed yet…", "auth": {
"fail": "Could not log in. Are you sure the password is correct?" "not_confirmed": "Not confirmed yet…",
}, "fail": "Could not log in. Are you sure the password is correct?"
"settings": { },
"update_confirm": "Do you want to save your modification?", "settings": {
"change_password": "Change your password", "update_confirm": "Do you want to save your modification?",
"password_updated": "Password changed.", "change_password": "Change your password",
"danger_section": "Dangerous section", "password_updated": "Password changed.",
"remove_account": "By pressing the following button your user account will be deleted. Events you published won't be.", "danger_section": "Dangerous section",
"remove_account_confirm": "You are about to permanently delete your account" "remove_account": "By pressing the following button your user account will be deleted. Events you published won't be.",
}, "remove_account_confirm": "You are about to permanently delete your account"
"error": { },
"nick_taken": "This nickname is already in use.", "error": {
"email_taken": "This e-mail is already in use." "nick_taken": "This nickname is already in use.",
}, "email_taken": "This e-mail is already in use."
"confirm": { },
"title": "User confirmation", "confirm": {
"not_valid": "Something went wrong.", "title": "User confirmation",
"valid": "Your account is confirmed, you can now <a href=\"/login\">log in</a>" "not_valid": "Something went wrong.",
}, "valid": "Your account is confirmed, you can now <a href=\"/login\">log in</a>"
"ordinal": { },
"1": "first", "ordinal": {
"2": "second", "1": "first",
"3": "third", "2": "second",
"4": "fourth", "3": "third",
"5": "fifth", "4": "fourth",
"-1": "last" "5": "fifth",
}, "-1": "last"
"validators": { },
"required": "{fieldName} is required", "validators": {
"email": "Insert a valid email", "required": "{fieldName} is required",
"latitude": "Insert a valid latitude (-90 < latitude < 90)", "email": "Insert a valid email",
"longitude": "Insert a valid longitude (-180 < longitude < 180)" "latitude": "Insert a valid latitude (-90 < latitude < 90)",
}, "longitude": "Insert a valid longitude (-180 < longitude < 180)"
"about": "\n <p><a href='https://gancio.org'>Gancio</a> is a shared agenda for local communities.</p>\n ", },
"oauth": { "about": "\n <p><a href='https://gancio.org'>Gancio</a> is a shared agenda for local communities.</p>\n ",
"authorization_request": "The application <code>{app}</code> asks for the following authorization on <code>{instance_name}</code>:", "oauth": {
"redirected_to": "After confirmation you will be redirected to <code>{url}</code>", "authorization_request": "The application <code>{app}</code> asks for the following authorization on <code>{instance_name}</code>:",
"scopes": { "redirected_to": "After confirmation you will be redirected to <code>{url}</code>",
"event:write": "Add and edit your events" "scopes": {
} "event:write": "Add and edit your events"
},
"setup": {
"completed": "Setup completed",
"completed_description": "<p>You can now login with the following user:<br/><br/>User: <b>{email}</b><br/>Password: <b>{password}<b/></p>",
"copy_password_dialog": "Yes, you have to copy the password!",
"start": "Start",
"https_warning": "You're visiting from HTTP, remember to change baseurl in config.json if you switch to HTTPS!"
} }
},
"setup": {
"completed": "Setup completed",
"completed_description": "<p>You can now login with the following user:<br/><br/>User: <b>{email}</b><br/>Password: <b>{password}<b/></p>",
"copy_password_dialog": "Yes, you have to copy the password!",
"start": "Start",
"https_warning": "You're visiting from HTTP, remember to change baseurl in config.json if you switch to HTTPS!"
}
} }

View file

@ -4,13 +4,11 @@ v-container.pa-0.pa-md-3
v-card-title {{$t('common.share')}} v-card-title {{$t('common.share')}}
v-card-text v-card-text
p.text-body-1 {{$t('export.intro')}} p.text-body-1 {{$t('export.intro')}}
v-row v-alert.blue-grey.darken-4.text-body-1.lime--text.text--lighten-3
v-col(:md='2' :cols='12') v-card-title {{$t('common.filter')}}
v-card-title.py-0 {{$t('common.filter')}} v-card-subtitle {{$t('export.filter_description')}}
v-col v-card-text
Search( Search(v-model='filters')
:filters='filters'
@update='f => filters = f')
v-tabs(v-model='type' show-arrows :next-icon='mdiChevronRight' :prev-icon='mdiChevronLeft') v-tabs(v-model='type' show-arrows :next-icon='mdiChevronRight' :prev-icon='mdiChevronLeft')
//- TOFIX //- TOFIX
@ -52,7 +50,7 @@ v-container.pa-0.pa-md-3
v-col.col-12.col-lg-4 v-col.col-12.col-lg-4
v-text-field(v-model='list.title' :label='$t("common.title")') v-text-field(v-model='list.title' :label='$t("common.title")')
v-text-field(v-model='list.maxEvents' type='number' min='1' :label='$t("common.max_events")') v-text-field(v-model='list.maxEvents' type='number' min='1' :label='$t("common.max_events")')
v-switch(v-model='list.theme' inset true-value='dark' false-value='light' :label="$t('admin.is_dark')") v-switch(v-model='list.theme' hide-details inset true-value='dark' false-value='light' :label="$t('admin.is_dark')")
v-switch(v-model='list.sidebar' inset true-value='true' false-value='false' :label="$t('admin.widget')") v-switch(v-model='list.sidebar' inset true-value='true' false-value='false' :label="$t('admin.widget')")
v-col.col-12.col-lg-8 v-col.col-12.col-lg-8
gancio-events(:baseurl='settings.baseurl' gancio-events(:baseurl='settings.baseurl'

View file

@ -75,13 +75,6 @@ const eventController = {
raw: true raw: true
}) })
const collections = await Collection.findAll({
where: {
name: Sequelize.where(Sequelize.fn('LOWER', Sequelize.col('name')), 'LIKE', '%' + search + '%'),
},
attributes: [['name', 'label'], 'id'],
raw: true
})
const ret = places.map(p => { const ret = places.map(p => {
p.type = 'place' p.type = 'place'
@ -89,10 +82,7 @@ const eventController = {
}).concat(tags.map(t => { }).concat(tags.map(t => {
t.type = 'tag' t.type = 'tag'
return t return t
}).concat(collections.map(c => { })).sort((a, b) => b.w - a.w).slice(0, 10)
c.type = 'collection'
return c
}))).sort((a, b) => b.w - a.w).slice(0, 10)
return res.json(ret) return res.json(ret)
}, },