Compare commits
31 commits
main
...
potsda.mn-
Author | SHA1 | Date | |
---|---|---|---|
778a69cd | bb4c85f603 | ||
778a69cd | f514ddd726 | ||
778a69cd | f6a1b2822d | ||
778a69cd | 9e82a9d9af | ||
jona | 053e0010a0 | ||
jona | 187b3a5064 | ||
778a69cd | a129d71b29 | ||
summersamara | 595a3dca8b | ||
778a69cd | 70c38863a9 | ||
778a69cd | 2f7b1898de | ||
778a69cd | 60fa49a7b1 | ||
778a69cd | aaee131f1d | ||
778a69cd | 13306dc1bc | ||
778a69cd | 8289eea9c8 | ||
778a69cd | f1304b7df8 | ||
778a69cd | ce6ffc4e66 | ||
19561da63d | |||
03b2e1f634 | |||
8e5093ab41 | |||
750072b3b1 | |||
3aa10b77b3 | |||
778a69cd | a2d12990a4 | ||
778a69cd | 45f030f227 | ||
778a69cd | f7749a1e2b | ||
778a69cd | 3bf5e7a95f | ||
778a69cd | dbd91b1a21 | ||
778a69cd | d1228ca43f | ||
778a69cd | 62afefa47e | ||
778a69cd | e1c75ceecd | ||
778a69cd | 0f6296d164 | ||
778a69cd | 158d36d6ec |
|
@ -1,4 +1,4 @@
|
|||
FROM elixir:alpine
|
||||
FROM elixir:1.13.4-alpine
|
||||
|
||||
RUN apk add --no-cache inotify-tools postgresql-client yarn file make gcc libc-dev argon2 imagemagick cmake build-base libwebp-tools bash ncurses git python3
|
||||
|
||||
|
|
27
flake.lock
Normal file
27
flake.lock
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1691368598,
|
||||
"narHash": "sha256-ia7li22keBBbj02tEdqjVeLtc7ZlSBuhUk+7XTUFr14=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5a8e9243812ba528000995b294292d3b5e120947",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
27
flake.nix
Normal file
27
flake.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
description = "A very basic flake";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = { self, nixpkgs }: {
|
||||
|
||||
packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello;
|
||||
|
||||
packages.x86_64-linux.default = self.packages.x86_64-linux.hello;
|
||||
|
||||
devShells.x86_64-linux.default = let
|
||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||
in pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
elixir
|
||||
cmake
|
||||
imagemagick
|
||||
(yarn.override {
|
||||
nodejs = nodejs-18_x;
|
||||
})
|
||||
nodejs-18_x
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -2,29 +2,6 @@
|
|||
<div class="container section" id="error-wrapper">
|
||||
<div class="column">
|
||||
<section>
|
||||
<div class="picture-wrapper">
|
||||
<picture>
|
||||
<source
|
||||
srcset="
|
||||
/img/pics/error-480w.webp 1x,
|
||||
/img/pics/error-1024w.webp 2x
|
||||
"
|
||||
type="image/webp"
|
||||
/>
|
||||
<source
|
||||
srcset="/img/pics/error-480w.jpg 1x, /img/pics/error-1024w.jpg 2x"
|
||||
type="image/jpeg"
|
||||
/>
|
||||
|
||||
<img
|
||||
:src="`/img/pics/error-480w.jpg`"
|
||||
alt=""
|
||||
width="480"
|
||||
height="312"
|
||||
loading="lazy"
|
||||
/>
|
||||
</picture>
|
||||
</div>
|
||||
<b-message type="is-danger" class="is-size-5">
|
||||
<h1>
|
||||
{{
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
>
|
||||
<div class="datetime-container-header" />
|
||||
<div class="datetime-container-content">
|
||||
<time :datetime="dateObj.toISOString()" class="wkday">{{ wkday }}</time>
|
||||
<time :datetime="dateObj.toISOString()" class="day">{{ day }}</time>
|
||||
<time :datetime="dateObj.toISOString()" class="month">{{ month }}</time>
|
||||
</div>
|
||||
|
@ -39,6 +40,10 @@ export default class DateCalendarIcon extends Vue {
|
|||
return new Date(this.$props.date);
|
||||
}
|
||||
|
||||
get wkday(): string {
|
||||
return this.dateObj.toLocaleString(undefined, { weekday: "short" });
|
||||
}
|
||||
|
||||
get month(): string {
|
||||
return this.dateObj.toLocaleString(undefined, { month: "short" });
|
||||
}
|
||||
|
@ -62,17 +67,17 @@ div.datetime-container {
|
|||
overflow-y: hidden;
|
||||
overflow-x: hidden;
|
||||
align-items: stretch;
|
||||
width: calc(40px * var(--small));
|
||||
width: calc(55px * var(--small));
|
||||
box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
|
||||
height: calc(40px * var(--small));
|
||||
height: calc(55px * var(--small));
|
||||
background: #fff;
|
||||
|
||||
.datetime-container-header {
|
||||
height: calc(10px * var(--small));
|
||||
height: calc(12px * var(--small));
|
||||
background: #f3425f;
|
||||
}
|
||||
.datetime-container-content {
|
||||
height: calc(30px * var(--small));
|
||||
height: calc(43px * var(--small));
|
||||
}
|
||||
|
||||
time {
|
||||
|
@ -80,6 +85,13 @@ div.datetime-container {
|
|||
font-weight: 600;
|
||||
color: $violet-3;
|
||||
|
||||
&.wkday {
|
||||
padding: 2px 0;
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
&.month {
|
||||
padding: 2px 0;
|
||||
font-size: 12px;
|
||||
|
|
|
@ -125,7 +125,14 @@
|
|||
</div>
|
||||
</div>
|
||||
<div v-else class="content has-text-grey-dark has-text-centered">
|
||||
<p>{{ $t("Your profile will be shown as contact.") }}</p>
|
||||
<p>
|
||||
{{ $t("Your profile will be shown as contact.") }}
|
||||
{{
|
||||
$t(
|
||||
"To create an event for a group you have to be at least a moderator in that group."
|
||||
)
|
||||
}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,22 +1,5 @@
|
|||
<template>
|
||||
<footer class="footer" ref="footer">
|
||||
<picture>
|
||||
<source
|
||||
:srcset="`/img/pics/footer_${random}-1024w.webp 1x, /img/pics/footer_${random}-1920w.webp 2x`"
|
||||
type="image/webp"
|
||||
/>
|
||||
<source
|
||||
:srcset="`/img/pics/footer_${random}-1024w.jpg 1x, /img/pics/footer_${random}-1920w.jpg 2x`"
|
||||
type="image/jpeg"
|
||||
/>
|
||||
<img
|
||||
:src="`/img/pics/footer_${random}-1024w.jpg`"
|
||||
alt=""
|
||||
width="5234"
|
||||
height="2189"
|
||||
loading="lazy"
|
||||
/>
|
||||
</picture>
|
||||
<ul>
|
||||
<li>
|
||||
<b-select
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</template>
|
||||
<template slot="start">
|
||||
<b-navbar-item tag="router-link" :to="{ name: RouteName.SEARCH }">{{
|
||||
$t("Explore")
|
||||
$t("Filter")
|
||||
}}</b-navbar-item>
|
||||
<b-navbar-item
|
||||
v-if="currentActor.id && currentUser.isLoggedIn"
|
||||
|
|
|
@ -388,6 +388,9 @@
|
|||
"From the {startDate} to the {endDate}": "Vom {startDate} bis zum {endDate}",
|
||||
"From yourself": "Von Ihnen selbst",
|
||||
"Fully accessible with a wheelchair": "Komplett barrierefrei für Rollstühle",
|
||||
"Smoke free": "Rauchfrei",
|
||||
"Whether smoking is prohibited during the event": "Während der Veranstaltung wird nicht geraucht",
|
||||
"Smoking allowed": "Rauchen gestattet",
|
||||
"Gather ⋅ Organize ⋅ Mobilize": "Treffen ⋅ Organisieren ⋅ Mobilisieren",
|
||||
"General": "Allgemein",
|
||||
"General information": "Allgemeine Informationen",
|
||||
|
@ -1191,6 +1194,7 @@
|
|||
"Your participation will be validated once you click the confirmation link into the email.": "Ihre Teilnahme wird bestätigt, sobald Sie den Bestätigungslink in der E-Mail anklicken.",
|
||||
"Your position was not available.": "Deine Position ist nicht verfügbar.",
|
||||
"Your profile will be shown as contact.": "Dein Profil wird als Kontakt angezeigt.",
|
||||
"To create an event for a group you have to be at least a moderator in that group.": "Um eine Veranstaltung für eine Gruppe zu erstellen, musst du mindestens Moderator in dieser Gruppe sein.",
|
||||
"Your timezone is currently set to {timezone}.": "Ihre Zeitzone ist aktuell {timezone}.",
|
||||
"Your timezone was detected as {timezone}.": "Ihre Zeitzone wurde erkannt als {timezone}.",
|
||||
"Your timezone {timezone} isn't supported.": "Ihre Zeitzone {timezone} wird nicht unterstützt.",
|
||||
|
|
|
@ -689,6 +689,7 @@
|
|||
"Pick a profile or a group": "Pick a profile or a group",
|
||||
"Add a contact": "Add a contact",
|
||||
"Your profile will be shown as contact.": "Your profile will be shown as contact.",
|
||||
"To create an event for a group you have to be at least a moderator in that group.": "To create an event for a group you have to be at least a moderator in that group.",
|
||||
"Pick": "Pick",
|
||||
"The event will show as attributed to your personal profile.": "The event will show as attributed to your personal profile.",
|
||||
"The event will show as attributed to this group.": "The event will show as attributed to this group.",
|
||||
|
@ -1066,6 +1067,9 @@
|
|||
"Not accessible with a wheelchair": "Not accessible with a wheelchair",
|
||||
"Partially accessible with a wheelchair": "Partially accessible with a wheelchair",
|
||||
"Fully accessible with a wheelchair": "Fully accessible with a wheelchair",
|
||||
"Smoke free": "Smoke free",
|
||||
"Whether smoking is prohibited during the event": "Whether smoking is prohibited during the event",
|
||||
"Smoking allowed": "Smoking allowed",
|
||||
"YouTube replay": "YouTube replay",
|
||||
"The URL where the event live can be watched again after it has ended": "The URL where the event live can be watched again after it has ended",
|
||||
"Twitch replay": "Twitch replay",
|
||||
|
|
|
@ -58,6 +58,22 @@ export const eventMetaDataList: IEventMetadataDescription[] = [
|
|||
},
|
||||
category: EventMetadataCategories.ACCESSIBILITY,
|
||||
},
|
||||
{
|
||||
icon: "smoking-off",
|
||||
key: "mz:accessibility:smokeFree",
|
||||
label: i18n.t("Smoke free") as string,
|
||||
description: i18n.t(
|
||||
"Whether smoking is prohibited during the event"
|
||||
) as string,
|
||||
value: "false",
|
||||
type: EventMetadataType.BOOLEAN,
|
||||
keyType: EventMetadataKeyType.PLAIN,
|
||||
choices: {
|
||||
true: i18n.t("Smoke free") as string,
|
||||
false: i18n.t("Smoking allowed") as string,
|
||||
},
|
||||
category: EventMetadataCategories.ACCESSIBILITY,
|
||||
},
|
||||
{
|
||||
icon: "youtube",
|
||||
key: "mz:replay:youtube:url",
|
||||
|
|
|
@ -134,7 +134,6 @@
|
|||
!$apollo.loading
|
||||
"
|
||||
>
|
||||
<div class="img-container" :class="{ webp: supportsWebPFormat }" />
|
||||
<div class="content has-text-centered">
|
||||
<p>
|
||||
{{
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
>
|
||||
<div class="columns is-vertical is-centered">
|
||||
<div class="column is-three-quarters">
|
||||
<div class="img-container" :class="{ webp: supportsWebPFormat }" />
|
||||
<div class="content has-text-centered">
|
||||
<p>
|
||||
{{ $t("You are not part of any group.") }}
|
||||
|
|
|
@ -11,14 +11,6 @@
|
|||
<h1 class="title">
|
||||
{{ config.slogan || $t("Gather ⋅ Organize ⋅ Mobilize") }}
|
||||
</h1>
|
||||
<p
|
||||
v-html="
|
||||
$t('Join <b>{instance}</b>, a Mobilizon instance', {
|
||||
instance: config.name,
|
||||
})
|
||||
"
|
||||
/>
|
||||
<p class="instance-description">{{ config.description }}</p>
|
||||
<!-- We don't invite to find other instances yet -->
|
||||
<!-- <p v-if="!config.registrationsOpen">
|
||||
{{ $t("This instance isn't opened to registrations, but you can register on other instances.") }}
|
||||
|
@ -51,18 +43,26 @@
|
|||
>
|
||||
<section class="events-recent">
|
||||
<h2 class="title">
|
||||
{{ $t("Last published events") }}
|
||||
{{ $t("Upcoming events") }}
|
||||
</h2>
|
||||
<p>
|
||||
<i18n tag="span" path="On {instance} and other federated instances">
|
||||
<b slot="instance">{{ config.name }}</b>
|
||||
</i18n>
|
||||
</p>
|
||||
<div v-if="this.events.total > 0">
|
||||
<multi-card :events="events.elements.slice(0, 6)" />
|
||||
<div v-if="events.elements.length > 0">
|
||||
<multi-card class="my-4" :events="events.elements" />
|
||||
<div class="pagination" v-if="events.total > EVENT_PAGE_LIMIT">
|
||||
<b-pagination
|
||||
:total="events.total"
|
||||
v-model="featuredEventPage"
|
||||
:per-page="EVENT_PAGE_LIMIT"
|
||||
>
|
||||
</b-pagination>
|
||||
</div>
|
||||
<span class="view-all">
|
||||
<router-link :to="{ name: RouteName.SEARCH }"
|
||||
>{{ $t("View everything") }} >></router-link
|
||||
>{{ $t("Filter") }} >></router-link
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -72,61 +72,6 @@
|
|||
</section>
|
||||
</div>
|
||||
<div id="picture" v-if="config && (!currentUser.id || !currentActor.id)">
|
||||
<div class="picture-container">
|
||||
<picture>
|
||||
<source
|
||||
media="(max-width: 799px)"
|
||||
srcset="/img/pics/homepage-480w.webp"
|
||||
type="image/webp"
|
||||
/>
|
||||
<source
|
||||
media="(max-width: 799px)"
|
||||
srcset="/img/pics/homepage-480w.jpg"
|
||||
type="image/jpeg"
|
||||
/>
|
||||
|
||||
<source
|
||||
media="(max-width: 1024px)"
|
||||
srcset="/img/pics/homepage-1024w.webp"
|
||||
type="image/webp"
|
||||
/>
|
||||
<source
|
||||
media="(max-width: 1024px)"
|
||||
srcset="/img/pics/homepage-1024w.jpg"
|
||||
type="image/jpeg"
|
||||
/>
|
||||
|
||||
<source
|
||||
media="(max-width: 1920px)"
|
||||
srcset="/img/pics/homepage-1920w.webp"
|
||||
type="image/webp"
|
||||
/>
|
||||
<source
|
||||
media="(max-width: 1920px)"
|
||||
srcset="/img/pics/homepage-1920w.jpg"
|
||||
type="image/jpeg"
|
||||
/>
|
||||
|
||||
<source
|
||||
media="(min-width: 1921px)"
|
||||
srcset="/img/pics/homepage.webp"
|
||||
type="image/webp"
|
||||
/>
|
||||
<source
|
||||
media="(min-width: 1921px)"
|
||||
srcset="/img/pics/homepage.jpg"
|
||||
type="image/jpeg"
|
||||
/>
|
||||
|
||||
<img
|
||||
src="/img/pics/homepage-1024w.jpg"
|
||||
width="3840"
|
||||
height="2719"
|
||||
alt=""
|
||||
loading="lazy"
|
||||
/>
|
||||
</picture>
|
||||
</div>
|
||||
<div class="container section">
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
|
@ -289,7 +234,7 @@
|
|||
/>
|
||||
<section class="events-recent">
|
||||
<h2 class="title">
|
||||
{{ $t("Last published events") }}
|
||||
{{ $t("Upcoming events") }}
|
||||
</h2>
|
||||
<p>
|
||||
<i18n tag="span" path="On {instance} and other federated instances">
|
||||
|
@ -298,10 +243,10 @@
|
|||
</p>
|
||||
|
||||
<div v-if="events.total > 0">
|
||||
<multi-card :events="events.elements.slice(0, 8)" />
|
||||
<multi-card :events="events.elements" />
|
||||
<span class="view-all">
|
||||
<router-link :to="{ name: RouteName.SEARCH }"
|
||||
>{{ $t("View everything") }} >></router-link
|
||||
>{{ $t("Filter") }} >></router-link
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -345,13 +290,16 @@ import { IConfig } from "../types/config.model";
|
|||
import { IFollowedGroupEvent } from "../types/followedGroupEvent.model";
|
||||
import Subtitle from "../components/Utils/Subtitle.vue";
|
||||
|
||||
const EVENT_PAGE_LIMIT = 99;
|
||||
|
||||
@Component({
|
||||
apollo: {
|
||||
events: {
|
||||
query: FETCH_EVENTS,
|
||||
variables: {
|
||||
orderBy: EventSortField.INSERTED_AT,
|
||||
direction: SortDirection.DESC,
|
||||
orderBy: EventSortField.BEGINS_ON,
|
||||
direction: SortDirection.ASC,
|
||||
limit: EVENT_PAGE_LIMIT,
|
||||
},
|
||||
},
|
||||
currentActor: {
|
||||
|
@ -728,9 +676,6 @@ section.hero {
|
|||
.container.section {
|
||||
background: $white;
|
||||
|
||||
@include tablet {
|
||||
margin-top: -4rem;
|
||||
}
|
||||
z-index: 10;
|
||||
|
||||
.title {
|
||||
|
|
|
@ -2,24 +2,6 @@
|
|||
<section class="section container has-text-centered not-found">
|
||||
<div class="columns is-vertical is-centered">
|
||||
<div class="column is-half">
|
||||
<picture>
|
||||
<source
|
||||
srcset="/img/pics/error-480w.webp 1x, /img/pics/error-1024w.webp 2x"
|
||||
type="image/webp"
|
||||
/>
|
||||
<source
|
||||
srcset="/img/pics/error-480w.jpg 1x, /img/pics/error-1024w.jpg 2x"
|
||||
type="image/jpeg"
|
||||
/>
|
||||
|
||||
<img
|
||||
:src="`/img/pics/error-480w.jpg`"
|
||||
alt=""
|
||||
width="2616"
|
||||
height="1698"
|
||||
loading="lazy"
|
||||
/>
|
||||
</picture>
|
||||
<h1 class="title">
|
||||
{{ $t("The page you're looking for doesn't exist.") }}
|
||||
</h1>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="section container">
|
||||
<h1 class="title">{{ $t("Explore") }}</h1>
|
||||
<!-- <h1 class="title">{{ $t("Explore") }}</h1> -->
|
||||
<section v-if="tag">
|
||||
<i18n path="Events tagged with {tag}">
|
||||
<b-tag slot="tag" type="is-light">{{ $t("#{tag}", { tag }) }}</b-tag>
|
||||
|
@ -125,7 +125,7 @@
|
|||
v-if="!canSearchEvents && !canSearchGroups"
|
||||
>
|
||||
<b-loading :active.sync="$apollo.loading"></b-loading>
|
||||
<h2 class="title">{{ $t("Featured events") }}</h2>
|
||||
<!-- <h2 class="title">{{ $t("Featured events") }}</h2> -->
|
||||
<div v-if="events.elements.length > 0">
|
||||
<multi-card class="my-4" :events="events.elements" />
|
||||
<div class="pagination" v-if="events.total > EVENT_PAGE_LIMIT">
|
||||
|
@ -255,9 +255,9 @@ interface ISearchTimeOption {
|
|||
end?: Date | null;
|
||||
}
|
||||
|
||||
const EVENT_PAGE_LIMIT = 12;
|
||||
const EVENT_PAGE_LIMIT = 99;
|
||||
|
||||
const GROUP_PAGE_LIMIT = 12;
|
||||
const GROUP_PAGE_LIMIT = 99;
|
||||
|
||||
const DEFAULT_RADIUS = 25; // value to set if radius is null but location set
|
||||
|
||||
|
|
|
@ -89,6 +89,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Config do
|
|||
name: Config.instance_name(),
|
||||
registrations_open: Config.instance_registrations_open?(),
|
||||
registrations_allowlist: Config.instance_registrations_allowlist?(),
|
||||
instance_homepage_sorting: Config.instance_homepage_sorting(),
|
||||
contact: Config.contact(),
|
||||
demo_mode: Config.instance_demo_mode?(),
|
||||
description: Config.instance_description(),
|
||||
|
|
|
@ -114,6 +114,11 @@ defmodule Mobilizon.GraphQL.Schema.AdminType do
|
|||
field(:instance_long_description, :string, description: "The instance's long description")
|
||||
field(:instance_slogan, :string, description: "The instance's slogan")
|
||||
field(:contact, :string, description: "The instance's contact details")
|
||||
|
||||
field(:instance_homepage_sorting, :instance_homepage_sorting,
|
||||
description: "The instance's homepage sorting"
|
||||
)
|
||||
|
||||
field(:instance_terms, :string, description: "The instance's terms body text")
|
||||
field(:instance_terms_type, :instance_terms_type, description: "The instance's terms type")
|
||||
field(:instance_terms_url, :string, description: "The instance's terms URL")
|
||||
|
@ -139,6 +144,12 @@ defmodule Mobilizon.GraphQL.Schema.AdminType do
|
|||
value(:custom, as: "CUSTOM", description: "Custom terms text")
|
||||
end
|
||||
|
||||
@desc "The acceptable values for the instance's homepage type"
|
||||
enum :instance_homepage_sorting do
|
||||
value(:default, as: "DEFAULT", description: "Sort by recently created")
|
||||
value(:upcoming, as: "UPCOMING", description: "Sort by upcoming")
|
||||
end
|
||||
|
||||
@desc """
|
||||
The acceptable values for the instance privacy policy type
|
||||
"""
|
||||
|
@ -386,6 +397,11 @@ defmodule Mobilizon.GraphQL.Schema.AdminType do
|
|||
arg(:instance_long_description, :string, description: "The instance's long description")
|
||||
arg(:instance_slogan, :string, description: "The instance's slogan")
|
||||
arg(:contact, :string, description: "The instance's contact details")
|
||||
|
||||
arg(:instance_homepage_sorting, :instance_homepage_sorting,
|
||||
description: "The instance's homepage sorting"
|
||||
)
|
||||
|
||||
arg(:instance_terms, :string, description: "The instance's terms body text")
|
||||
arg(:instance_terms_type, :instance_terms_type, description: "The instance's terms type")
|
||||
arg(:instance_terms_url, :string, description: "The instance's terms URL")
|
||||
|
|
|
@ -48,6 +48,10 @@ defmodule Mobilizon.GraphQL.Schema.ConfigType do
|
|||
field(:version, :string, description: "The instance's version")
|
||||
field(:federating, :boolean, description: "Whether this instance is federation")
|
||||
|
||||
field(:instance_homepage_sorting, :instance_homepage_sorting,
|
||||
description: "The instance's homepage sorting"
|
||||
)
|
||||
|
||||
field(:terms, :terms, description: "The instance's terms") do
|
||||
arg(:locale, :string,
|
||||
default_value: "en",
|
||||
|
|
|
@ -19,6 +19,7 @@ defmodule Mobilizon.Config do
|
|||
registration_email_denylist: list(String.t()),
|
||||
demo: boolean(),
|
||||
repository: String.t(),
|
||||
version: String.t(),
|
||||
email_from: String.t(),
|
||||
email_reply_to: String.t(),
|
||||
federating: boolean(),
|
||||
|
@ -62,6 +63,11 @@ defmodule Mobilizon.Config do
|
|||
Mobilizon.Admin.get_admin_setting_value("instance", "contact")
|
||||
end
|
||||
|
||||
@spec instance_homepage_sorting :: String.t()
|
||||
def instance_homepage_sorting do
|
||||
Mobilizon.Admin.get_admin_setting_value("instance", "instance_homepage_sorting", "DEFAULT")
|
||||
end
|
||||
|
||||
@spec instance_terms(String.t()) :: String.t()
|
||||
def instance_terms(locale \\ "en") do
|
||||
Mobilizon.Admin.get_admin_setting_value("instance", "instance_terms", generate_terms(locale))
|
||||
|
@ -102,9 +108,7 @@ defmodule Mobilizon.Config do
|
|||
end
|
||||
|
||||
@spec instance_version :: String.t()
|
||||
def instance_version do
|
||||
GitStatus.commit()
|
||||
end
|
||||
def instance_version, do: instance_config()[:version]
|
||||
|
||||
@spec instance_hostname :: String.t()
|
||||
def instance_hostname, do: instance_config()[:hostname]
|
||||
|
@ -407,6 +411,7 @@ defmodule Mobilizon.Config do
|
|||
instance_slogan: instance_slogan(),
|
||||
registrations_open: instance_registrations_open?(),
|
||||
contact: contact(),
|
||||
instance_homepage_sorting: instance_homepage_sorting(),
|
||||
instance_terms: instance_terms(),
|
||||
instance_terms_type: instance_terms_type(),
|
||||
instance_terms_url: instance_terms_url(),
|
||||
|
|
|
@ -12,126 +12,82 @@ defmodule Mobilizon.Events.Categories do
|
|||
defp build_in_categories do
|
||||
[
|
||||
%{
|
||||
id: :arts,
|
||||
label: gettext("Arts")
|
||||
id: :ausflug,
|
||||
label: gettext("Ausflug")
|
||||
},
|
||||
%{
|
||||
id: :book_clubs,
|
||||
label: gettext("Book clubs")
|
||||
id: :ausstellung,
|
||||
label: gettext("Ausstellung")
|
||||
},
|
||||
%{
|
||||
id: :business,
|
||||
label: gettext("Business")
|
||||
id: :demonstration,
|
||||
label: gettext("Demonstration")
|
||||
},
|
||||
%{
|
||||
id: :causes,
|
||||
label: gettext("Causes")
|
||||
id: :einweihung,
|
||||
label: gettext("Einweihung")
|
||||
},
|
||||
%{
|
||||
id: :comedy,
|
||||
label: gettext("Comedy")
|
||||
id: :filmvorfuehrung,
|
||||
label: gettext("Filmvorführung")
|
||||
},
|
||||
%{
|
||||
id: :crafts,
|
||||
label: gettext("Crafts")
|
||||
id: :fussball,
|
||||
label: gettext("Fußball")
|
||||
},
|
||||
%{
|
||||
id: :food_drink,
|
||||
label: gettext("Food & Drink")
|
||||
id: :gedenken,
|
||||
label: gettext("Gedenken")
|
||||
},
|
||||
%{
|
||||
id: :health,
|
||||
label: gettext("Health")
|
||||
id: :infostand,
|
||||
label: gettext("Infostand")
|
||||
},
|
||||
%{
|
||||
id: :music,
|
||||
label: gettext("Music")
|
||||
id: :kuenstlerisches,
|
||||
label: gettext("Künstlerisches")
|
||||
},
|
||||
%{
|
||||
id: :auto_boat_air,
|
||||
label: gettext("Auto, boat and air")
|
||||
id: :kneipe,
|
||||
label: gettext("Kneipe")
|
||||
},
|
||||
%{
|
||||
id: :community,
|
||||
label: gettext("Community")
|
||||
id: :konzert,
|
||||
label: gettext("Konzert")
|
||||
},
|
||||
%{
|
||||
id: :family_education,
|
||||
label: gettext("Family & Education")
|
||||
id: :kuefa,
|
||||
label: gettext("KüFa")
|
||||
},
|
||||
%{
|
||||
id: :fashion_beauty,
|
||||
label: gettext("Fashion & Beauty")
|
||||
},
|
||||
%{
|
||||
id: :film_media,
|
||||
label: gettext("Film & Media")
|
||||
},
|
||||
%{
|
||||
id: :games,
|
||||
label: gettext("Games")
|
||||
},
|
||||
%{
|
||||
id: :language_culture,
|
||||
label: gettext("Language & Culture")
|
||||
},
|
||||
%{
|
||||
id: :learning,
|
||||
label: gettext("Learning")
|
||||
},
|
||||
%{
|
||||
id: :lgbtq,
|
||||
label: gettext("LGBTQ")
|
||||
},
|
||||
%{
|
||||
id: :movements_politics,
|
||||
label: gettext("Movements and politics")
|
||||
},
|
||||
%{
|
||||
id: :networking,
|
||||
label: gettext("Networking")
|
||||
id: :lesung,
|
||||
label: gettext("Lesung")
|
||||
},
|
||||
%{
|
||||
id: :party,
|
||||
label: gettext("Party")
|
||||
},
|
||||
%{
|
||||
id: :performing_visual_arts,
|
||||
label: gettext("Performing & Visual Arts")
|
||||
id: :sport,
|
||||
label: gettext("Sport")
|
||||
},
|
||||
%{
|
||||
id: :pets,
|
||||
label: gettext("Pets")
|
||||
id: :theater,
|
||||
label: gettext("Theater")
|
||||
},
|
||||
%{
|
||||
id: :photography,
|
||||
label: gettext("Photography")
|
||||
id: :verhandlung,
|
||||
label: gettext("Verhandlung")
|
||||
},
|
||||
%{
|
||||
id: :outdoors_adventure,
|
||||
label: gettext("Outdoors & Adventure")
|
||||
},
|
||||
%{
|
||||
id: :spirituality_religion_beliefs,
|
||||
label: gettext("Spirituality, Religion & Beliefs")
|
||||
},
|
||||
%{
|
||||
id: :science_tech,
|
||||
label: gettext("Science & Tech")
|
||||
},
|
||||
%{
|
||||
id: :sports,
|
||||
label: gettext("Sports")
|
||||
},
|
||||
%{
|
||||
id: :theatre,
|
||||
label: gettext("Theatre")
|
||||
id: :workshop,
|
||||
label: gettext("Workshop")
|
||||
},
|
||||
# Legacy default value
|
||||
%{
|
||||
id: :meeting,
|
||||
label: gettext("Meeting")
|
||||
}
|
||||
label: gettext("Infoveranstaltung")
|
||||
},
|
||||
]
|
||||
end
|
||||
|
||||
|
|
|
@ -1663,7 +1663,7 @@ defmodule Mobilizon.Events do
|
|||
@spec filter_future_events(Ecto.Queryable.t(), boolean) :: Ecto.Query.t()
|
||||
defp filter_future_events(query, true) do
|
||||
from(q in query,
|
||||
where: q.begins_on > ^DateTime.utc_now()
|
||||
where: coalesce(q.ends_on, q.begins_on) > ^DateTime.utc_now()
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -7,4 +7,4 @@
|
|||
<%= if @follower.type == :Application do %><%= gettext "Note: %{name} following you doesn't necessarily imply that you follow this instance, but you can ask to follow them too.", name: Mobilizon.Actors.Actor.display_name_and_username(@follower) %><% end %>
|
||||
|
||||
<%= if @follower.type == :Application do %><%= gettext "To accept this invitation, head over to the instance's admin settings." %><% else %><%= gettext "To accept this invitation, head over to the profile's admin page." %><% end %>
|
||||
<%= if @follower.type == :Application do %><%= "#{Mobilizon.Web.Endpoint.url()}/settings/admin/relays/followers" %><% else %><%= "#{Mobilizon.Web.Endpoint.url()}/settings/admin/profiles/#{@follower.id}" %><% end %>
|
||||
<%= if @follower.type == :Application do %><%= "#{Mobilizon.Web.Endpoint.url()}/settings/admin/instances/%{name}" %><% else %><%= "#{Mobilizon.Web.Endpoint.url()}/settings/admin/profiles/#{@follower.id}" %><% end %>
|
||||
|
|
|
@ -2368,11 +2368,6 @@ msgstr "Networking"
|
|||
msgid "Outdoors & Adventure"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/mobilizon/events/categories.ex:96
|
||||
msgid "Party"
|
||||
msgstr "Party"
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/mobilizon/events/categories.ex:100
|
||||
msgid "Performing & Visual Arts"
|
||||
|
@ -2398,16 +2393,63 @@ msgstr "Wissenschaft & Technologie"
|
|||
msgid "Spirituality, Religion & Beliefs"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/mobilizon/events/categories.ex:124
|
||||
msgid "Sports"
|
||||
msgid "Ausflug"
|
||||
msgstr "Ausflug"
|
||||
|
||||
msgid "Ausstellung"
|
||||
msgstr "Ausstellung"
|
||||
|
||||
msgid "Demonstration"
|
||||
msgstr "Demonstration"
|
||||
|
||||
msgid "Einweihung"
|
||||
msgstr "Einweihung"
|
||||
|
||||
msgid "Filmvorführung"
|
||||
msgstr "Filmvorführung"
|
||||
|
||||
msgid "Fußball"
|
||||
msgstr "Fußball"
|
||||
|
||||
msgid "Gedenken"
|
||||
msgstr "Gedenken"
|
||||
|
||||
msgid "Infostand"
|
||||
msgstr "Infostand"
|
||||
|
||||
msgid "Infoveranstaltung"
|
||||
msgstr "Infoveranstaltung"
|
||||
|
||||
msgid "Künstlerisches"
|
||||
msgstr "Künstlerisches"
|
||||
|
||||
msgid "Kneipe"
|
||||
msgstr "Kneipe"
|
||||
|
||||
msgid "Konzert"
|
||||
msgstr "Konzert"
|
||||
|
||||
msgid "KüFa"
|
||||
msgstr "KüFa"
|
||||
|
||||
msgid "Lesung"
|
||||
msgstr "Lesung"
|
||||
|
||||
msgid "Party"
|
||||
msgstr "Party"
|
||||
|
||||
msgid "Sport"
|
||||
msgstr "Sport"
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/mobilizon/events/categories.ex:128
|
||||
msgid "Theatre"
|
||||
msgid "Theater"
|
||||
msgstr "Theater"
|
||||
|
||||
msgid "Verhandlung"
|
||||
msgstr "Verhandlung"
|
||||
|
||||
msgid "Workshop"
|
||||
msgstr "Workshop"
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/web/templates/email/participation/event_card.text.eex:9
|
||||
msgid "Read more: %{url}"
|
||||
|
|
|
@ -1990,11 +1990,6 @@ msgstr ""
|
|||
msgid "Outdoors & Adventure"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/mobilizon/events/categories.ex:96
|
||||
msgid "Party"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/mobilizon/events/categories.ex:100
|
||||
msgid "Performing & Visual Arts"
|
||||
|
@ -2020,15 +2015,62 @@ msgstr ""
|
|||
msgid "Spirituality, Religion & Beliefs"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/mobilizon/events/categories.ex:124
|
||||
msgid "Sports"
|
||||
msgstr ""
|
||||
msgid "Ausflug"
|
||||
msgstr "Excursion"
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/mobilizon/events/categories.ex:128
|
||||
msgid "Theatre"
|
||||
msgstr ""
|
||||
msgid "Ausstellung"
|
||||
msgstr "Exhibition"
|
||||
|
||||
msgid "Demonstration"
|
||||
msgstr "Demonstration"
|
||||
|
||||
msgid "Einweihung"
|
||||
msgstr "Inauguration"
|
||||
|
||||
msgid "Filmvorführung"
|
||||
msgstr "Film screening"
|
||||
|
||||
msgid "Fußball"
|
||||
msgstr "Football"
|
||||
|
||||
msgid "Gedenken"
|
||||
msgstr "Remembrance"
|
||||
|
||||
msgid "Infostand"
|
||||
msgstr "Infostand"
|
||||
|
||||
msgid "Infoveranstaltung"
|
||||
msgstr "Info event"
|
||||
|
||||
msgid "Künstlerisches"
|
||||
msgstr "Art related"
|
||||
|
||||
msgid "Kneipe"
|
||||
msgstr "Bar"
|
||||
|
||||
msgid "Konzert"
|
||||
msgstr "Concert"
|
||||
|
||||
msgid "KüFa"
|
||||
msgstr "Kitchen for all"
|
||||
|
||||
msgid "Lesung"
|
||||
msgstr "Reading"
|
||||
|
||||
msgid "Party"
|
||||
msgstr "Party"
|
||||
|
||||
msgid "Sport"
|
||||
msgstr "Sport"
|
||||
|
||||
msgid "Theater"
|
||||
msgstr "Theater"
|
||||
|
||||
msgid "Verhandlung"
|
||||
msgstr "Trial"
|
||||
|
||||
msgid "Workshop"
|
||||
msgstr "Workshop"
|
||||
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
#: lib/web/templates/email/participation/event_card.text.eex:9
|
||||
|
|
|
@ -223,6 +223,9 @@ type Config {
|
|||
"Whether this instance is federation"
|
||||
federating: Boolean
|
||||
|
||||
"The instance's homepage sorting"
|
||||
instanceHomepageSorting: InstanceHomepageSorting
|
||||
|
||||
"The instance's terms"
|
||||
terms(
|
||||
"The user's locale. The terms will be translated in their language, if available."
|
||||
|
@ -269,6 +272,15 @@ type Tag {
|
|||
related: [Tag]
|
||||
}
|
||||
|
||||
"The acceptable values for the instance's homepage type"
|
||||
enum InstanceHomepageSorting {
|
||||
"Sort by recently created"
|
||||
DEFAULT
|
||||
|
||||
"Sort by upcoming"
|
||||
UPCOMING
|
||||
}
|
||||
|
||||
"Instance map routing configuration"
|
||||
type Routing {
|
||||
"The instance's routing type"
|
||||
|
@ -1941,6 +1953,9 @@ type RootMutationType {
|
|||
"The instance's contact details"
|
||||
contact: String
|
||||
|
||||
"The instance's homepage sorting"
|
||||
instanceHomepageSorting: InstanceHomepageSorting
|
||||
|
||||
"The instance's terms body text"
|
||||
instanceTerms: String
|
||||
|
||||
|
@ -3805,6 +3820,9 @@ type AdminSettings {
|
|||
"The instance's contact details"
|
||||
contact: String
|
||||
|
||||
"The instance's homepage sorting"
|
||||
instanceHomepageSorting: InstanceHomepageSorting
|
||||
|
||||
"The instance's terms body text"
|
||||
instanceTerms: String
|
||||
|
||||
|
|
|
@ -337,6 +337,7 @@ defmodule Mobilizon.GraphQL.Resolvers.AdminTest do
|
|||
instanceDescription
|
||||
instanceLongDescription
|
||||
contact
|
||||
instanceHomepageSorting
|
||||
instanceTerms
|
||||
instanceTermsType
|
||||
instanceTermsUrl
|
||||
|
@ -419,6 +420,7 @@ defmodule Mobilizon.GraphQL.Resolvers.AdminTest do
|
|||
$instanceDescription: String
|
||||
$instanceLongDescription: String
|
||||
$contact: String
|
||||
$instanceHomepageSorting: InstanceHomepageSorting
|
||||
$instanceTerms: String
|
||||
$instanceTermsType: InstanceTermsType
|
||||
$instanceTermsUrl: String
|
||||
|
@ -433,6 +435,7 @@ defmodule Mobilizon.GraphQL.Resolvers.AdminTest do
|
|||
instanceDescription: $instanceDescription
|
||||
instanceLongDescription: $instanceLongDescription
|
||||
contact: $contact
|
||||
instanceHomepageSorting: $instanceHomepageSorting
|
||||
instanceTerms: $instanceTerms
|
||||
instanceTermsType: $instanceTermsType
|
||||
instanceTermsUrl: $instanceTermsUrl
|
||||
|
|
Loading…
Reference in a new issue