@@ -94,6 +94,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Config do
|
|||||||
contact: Config.contact(),
|
contact: Config.contact(),
|
||||||
demo_mode: Config.instance_demo_mode?(),
|
demo_mode: Config.instance_demo_mode?(),
|
||||||
long_events: Config.instance_long_events?(),
|
long_events: Config.instance_long_events?(),
|
||||||
|
duration_of_long_event: Config.instance_duration_of_long_event(),
|
||||||
description: Config.instance_description(),
|
description: Config.instance_description(),
|
||||||
long_description: Config.instance_long_description(),
|
long_description: Config.instance_long_description(),
|
||||||
slogan: Config.instance_slogan(),
|
slogan: Config.instance_slogan(),
|
||||||
|
|||||||
@@ -32,6 +32,11 @@ defmodule Mobilizon.GraphQL.Schema.ConfigType do
|
|||||||
|
|
||||||
field(:demo_mode, :boolean, description: "Whether the demo mode is enabled")
|
field(:demo_mode, :boolean, description: "Whether the demo mode is enabled")
|
||||||
field(:long_events, :boolean, description: "Whether the long events mode is enabled")
|
field(:long_events, :boolean, description: "Whether the long events mode is enabled")
|
||||||
|
|
||||||
|
field(:duration_of_long_event, :integer,
|
||||||
|
description: "Events longer than this duration are considered long events"
|
||||||
|
)
|
||||||
|
|
||||||
field(:country_code, :string, description: "The country code from the IP")
|
field(:country_code, :string, description: "The country code from the IP")
|
||||||
field(:location, :lonlat, description: "The IP's location")
|
field(:location, :lonlat, description: "The IP's location")
|
||||||
field(:geocoding, :geocoding, description: "The instance's geocoding settings")
|
field(:geocoding, :geocoding, description: "The instance's geocoding settings")
|
||||||
|
|||||||
@@ -181,6 +181,9 @@ defmodule Mobilizon.Config do
|
|||||||
@spec instance_long_events? :: boolean
|
@spec instance_long_events? :: boolean
|
||||||
def instance_long_events?, do: instance_config()[:duration_of_long_event] > 0
|
def instance_long_events?, do: instance_config()[:duration_of_long_event] > 0
|
||||||
|
|
||||||
|
@spec instance_duration_of_long_event :: boolean
|
||||||
|
def instance_duration_of_long_event, do: instance_config()[:duration_of_long_event]
|
||||||
|
|
||||||
@spec instance_repository :: String.t()
|
@spec instance_repository :: String.t()
|
||||||
def instance_repository, do: instance_config()[:repository]
|
def instance_repository, do: instance_config()[:repository]
|
||||||
|
|
||||||
|
|||||||
@@ -202,6 +202,9 @@ type Config {
|
|||||||
"Whether the long events mode is enabled"
|
"Whether the long events mode is enabled"
|
||||||
longEvents: Boolean
|
longEvents: Boolean
|
||||||
|
|
||||||
|
"Events longer than this duration are considered long events"
|
||||||
|
durationOfLongEvent: Int
|
||||||
|
|
||||||
"The country code from the IP"
|
"The country code from the IP"
|
||||||
countryCode: String
|
countryCode: String
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export const CONFIG = gql`
|
|||||||
registrationsAllowlist
|
registrationsAllowlist
|
||||||
demoMode
|
demoMode
|
||||||
longEvents
|
longEvents
|
||||||
|
durationOfLongEvent
|
||||||
countryCode
|
countryCode
|
||||||
languages
|
languages
|
||||||
primaryColor
|
primaryColor
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ export interface IConfig {
|
|||||||
registrationsAllowlist: boolean;
|
registrationsAllowlist: boolean;
|
||||||
demoMode: boolean;
|
demoMode: boolean;
|
||||||
longEvents: boolean;
|
longEvents: boolean;
|
||||||
|
durationOfLongEvent: number;
|
||||||
countryCode: string;
|
countryCode: string;
|
||||||
eventCategories: { id: string; label: string }[];
|
eventCategories: { id: string; label: string }[];
|
||||||
languages: string[];
|
languages: string[];
|
||||||
|
|||||||
Reference in New Issue
Block a user