all developments of milestone 1

This commit is contained in:
setop
2024-04-10 12:36:21 +00:00
parent a78dc261e5
commit 7030d56864
266 changed files with 5391 additions and 2609 deletions

View File

@@ -124,6 +124,24 @@ defmodule Mobilizon.GraphQL.Schema.AdminType do
field(:instance_terms_type, :instance_terms_type, description: "The instance's terms type")
field(:instance_terms_url, :string, description: "The instance's terms URL")
field(:instance_logo, :media,
description: "The instance's logo",
resolve: &Admin.get_instance_logo/3
)
field(:instance_favicon, :media,
description: "The instance's favicon",
resolve: &Admin.get_instance_favicon/3
)
field(:default_picture, :media,
description: "The default picture",
resolve: &Admin.get_default_picture/3
)
field(:primary_color, :string, description: "The instance's primary color")
field(:secondary_color, :string, description: "The instance's secondary color")
field(:instance_privacy_policy, :string,
description: "The instance's privacy policy body text"
)
@@ -412,6 +430,25 @@ 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_logo, :media_input,
description:
"The instance's logo, either as an object or directly the ID of an existing media"
)
arg(:instance_favicon, :media_input,
description:
"The instance's favicon, either as an object or directly the ID of an existing media"
)
arg(:default_picture, :media_input,
description:
"The default picture, either as an object or directly the ID of an existing media"
)
arg(:primary_color, :string, description: "The instance's primary color")
arg(:secondary_color, :string, description: "The instance's secondary color")
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")

View File

@@ -31,6 +31,7 @@ defmodule Mobilizon.GraphQL.Schema.ConfigType do
)
field(:demo_mode, :boolean, description: "Whether the demo mode is enabled")
field(:long_events, :boolean, description: "Whether the long events mode is enabled")
field(:country_code, :string, description: "The country code from the IP")
field(:location, :lonlat, description: "The IP's location")
field(:geocoding, :geocoding, description: "The instance's geocoding settings")
@@ -59,6 +60,17 @@ defmodule Mobilizon.GraphQL.Schema.ConfigType do
resolve(&Config.terms/3)
end
field(:instance_logo, :media, description: "The instance's logo") do
resolve(&Config.instance_logo/3)
end
field(:default_picture, :media, description: "The default picture") do
resolve(&Config.default_picture/3)
end
field(:primary_color, :string, description: "The instance's primary color")
field(:secondary_color, :string, description: "The instance's secondary color")
field(:privacy, :privacy, description: "The instance's privacy policy") do
arg(:locale, :string,
default_value: "en",

View File

@@ -263,6 +263,10 @@ defmodule Mobilizon.GraphQL.Schema.EventType do
description: "Whether or not to show the participation price"
)
field(:hide_number_of_participants, :boolean,
description: "Whether or not the number of participants is hidden"
)
field(:show_start_time, :boolean, description: "Show event start time")
field(:show_end_time, :boolean, description: "Show event end time")
@@ -316,6 +320,10 @@ defmodule Mobilizon.GraphQL.Schema.EventType do
description: "Whether or not to show the participation price"
)
field(:hide_number_of_participants, :boolean,
description: "Whether or not the number of participants is hidden"
)
field(:show_start_time, :boolean, description: "Show event start time")
field(:show_end_time, :boolean, description: "Show event end time")

View File

@@ -52,8 +52,9 @@ defmodule Mobilizon.GraphQL.Schema.MediaType do
input_object :media_input_object do
field(:name, non_null(:string), description: "The media's name")
field(:alt, :string, description: "The media's alternative text")
field(:file, non_null(:upload), description: "The media file")
field(:file, :upload, description: "The media file")
field(:actor_id, :id, description: "The media owner")
field(:url, :string, description: "The media URL")
end
object :media_queries do

View File

@@ -273,6 +273,8 @@ defmodule Mobilizon.GraphQL.Schema.SearchType do
description: "Radius around the location to search in"
)
arg(:longevents, :boolean, description: "if mention filter in or out long events")
arg(:bbox, :string, description: "The bbox to search events into")
arg(:zoom, :integer, description: "The zoom level for searching events")