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>
<b-navbar-item <b-navbar-item
v-if="config && config.features.koenaConnect"
class="koena" class="koena"
tag="a" tag="a"
href="https://mediation.koena.net/framasoft/mobilizon/" href="https://mediation.koena.net/framasoft/mobilizon/"

View File

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

View File

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

View File

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

View File

@ -126,7 +126,8 @@ defmodule Mobilizon.GraphQL.Resolvers.Config do
timezones: Tzdata.zone_list(), timezones: Tzdata.zone_list(),
features: %{ features: %{
groups: Config.instance_group_feature_enabled?(), 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(), rules: Config.instance_rules(),
version: Config.instance_version(), version: Config.instance_version(),

View File

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