Make koena connect picture configurable

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-05-18 16:33:32 +02:00
parent 9f4cc5d981
commit a56f28f98e
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
6 changed files with 8 additions and 1 deletions

View File

@ -51,6 +51,7 @@
>
</b-navbar-item>
<b-navbar-item
v-if="config && config.features.koenaConnect"
class="koena"
tag="a"
href="https://mediation.koena.net/framasoft/mobilizon/"

View File

@ -67,6 +67,7 @@ export const CONFIG = gql`
features {
groups
eventCreation
koenaConnect
}
auth {
ldap

View File

@ -82,6 +82,7 @@ export interface IConfig {
features: {
eventCreation: boolean;
groups: boolean;
koenaConnect: boolean;
};
federating: boolean;
version: string;

View File

@ -54,6 +54,7 @@ export const configMock = {
__typename: "Features",
eventCreation: true,
groups: true,
koenaConnect: false,
},
geocoding: {
__typename: "Geocoding",

View File

@ -126,7 +126,8 @@ defmodule Mobilizon.GraphQL.Resolvers.Config do
timezones: Tzdata.zone_list(),
features: %{
groups: Config.instance_group_feature_enabled?(),
event_creation: Config.instance_event_creation_enabled?()
event_creation: Config.instance_event_creation_enabled?(),
koena_connect: Config.get([:instance, :koena_connect_link], false)
},
rules: Config.instance_rules(),
version: Config.instance_version(),

View File

@ -268,6 +268,8 @@ defmodule Mobilizon.GraphQL.Schema.ConfigType do
field(:event_creation, :boolean,
description: "Whether event creation is allowed on this instance"
)
field(:koena_connect, :boolean, description: "Activate link to Koena Connect")
end
@desc """