From e2f82968e87de20502ed46ad0f0392ae04f89819 Mon Sep 17 00:00:00 2001 From: lain Date: Wed, 29 Jul 2020 13:04:29 +0200 Subject: Config: Update frontend config example --- config/config.exs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 48fe7c669..d9c7969bc 100644 --- a/config/config.exs +++ b/config/config.exs @@ -653,7 +653,9 @@ config :pleroma, :static_fe, enabled: false # With no frontend configuration, the bundled files from the `static` directory will # be used. # -# config :pleroma, :frontends, primary: %{"name" => "pleroma", "ref" => "develop"} +# config :pleroma, :frontends, +# primary: %{"name" => "pleroma", "ref" => "develop"}, +# admin: %{"name" => "admin", "ref" => "stable"} config :pleroma, :web_cache_ttl, activity_pub: nil, -- cgit v1.2.3 From d249f91b3f36e320d135d2f57964f49f55ea61a3 Mon Sep 17 00:00:00 2001 From: lain Date: Wed, 29 Jul 2020 16:27:11 +0200 Subject: Descriptions: Update with admin frontend info --- config/description.exs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 30a503696..b96fe9705 100644 --- a/config/description.exs +++ b/config/description.exs @@ -3517,6 +3517,23 @@ config :pleroma, :config_description, [ description: "reference of the installed primary frontend to be used" } ] + }, + %{ + key: :admin, + type: :map, + description: "Admin frontend", + children: [ + %{ + key: "name", + type: :string, + description: "Name of the installed Admin frontend" + }, + %{ + key: "ref", + type: :string, + description: "reference of the installed Admin frontend to be used" + } + ] } ] } -- cgit v1.2.3 From 4ce4d799fd9fa5ab4fde6c6aa55bf8b516d64c12 Mon Sep 17 00:00:00 2001 From: lain Date: Thu, 30 Jul 2020 14:14:58 +0200 Subject: Config: Add frontend information. --- config/config.exs | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 0c9685c4c..bf24d1bd9 100644 --- a/config/config.exs +++ b/config/config.exs @@ -657,7 +657,41 @@ config :pleroma, :static_fe, enabled: false # # config :pleroma, :frontends, # primary: %{"name" => "pleroma", "ref" => "develop"}, -# admin: %{"name" => "admin", "ref" => "stable"} +# admin: %{"name" => "admin", "ref" => "stable"}, +# available: %{...} + +config :pleroma, :frontends, + available: %{ + "pleroma" => %{ + "name" => "pleroma", + "git" => "https://git.pleroma.social/pleroma/pleroma-fe", + "build_url" => + "https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/${ref}/download?job=build", + "ref" => "develop" + }, + "fedi-fe" => %{ + "name" => "fedi-fe", + "git" => "https://git.pleroma.social/pleroma/fedi-fe", + "build_url" => + "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build", + "ref" => "master" + }, + "admin-fe" => %{ + "name" => "admin-fe", + "git" => "https://git.pleroma.social/pleroma/admin-fe", + "build_url" => + "https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build", + "ref" => "develop" + }, + "soapbox-fe" => %{ + "name" => "soapbox-fe", + "git" => "https://gitlab.com/soapbox-pub/soapbox-fe", + "build_url" => + "https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/${ref}/download?job=build-production", + "ref" => "v1.0.0", + "build_dir" => "static" + } + } config :pleroma, :web_cache_ttl, activity_pub: nil, -- cgit v1.2.3 From 99bfdffb1dfa283d1d039c8d46b7da095876197d Mon Sep 17 00:00:00 2001 From: lain Date: Thu, 30 Jul 2020 14:17:58 +0200 Subject: Config: Add kenoma as available frontend. --- config/config.exs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index bf24d1bd9..82be82747 100644 --- a/config/config.exs +++ b/config/config.exs @@ -656,14 +656,21 @@ config :pleroma, :static_fe, enabled: false # be used. # # config :pleroma, :frontends, -# primary: %{"name" => "pleroma", "ref" => "develop"}, -# admin: %{"name" => "admin", "ref" => "stable"}, +# primary: %{"name" => "pleroma-fe", "ref" => "develop"}, +# admin: %{"name" => "admin-fe", "ref" => "stable"}, # available: %{...} config :pleroma, :frontends, available: %{ - "pleroma" => %{ - "name" => "pleroma", + "kenoma" => %{ + "name" => "kenoma", + "git" => "https://git.pleroma.social/lambadalambda/kenoma", + "build_url" => + "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build", + "ref" => "master" + }, + "pleroma-fe" => %{ + "name" => "pleroma-fe", "git" => "https://git.pleroma.social/pleroma/pleroma-fe", "build_url" => "https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/${ref}/download?job=build", -- cgit v1.2.3 From 187d9bda0f28d5cc9548abc0b81f4f34e2aaacb1 Mon Sep 17 00:00:00 2001 From: lain Date: Mon, 3 Aug 2020 16:39:01 +0200 Subject: Description: Add new fields for frontend configuration. --- config/description.exs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index b96fe9705..969d50a1d 100644 --- a/config/description.exs +++ b/config/description.exs @@ -3515,6 +3515,23 @@ config :pleroma, :config_description, [ key: "ref", type: :string, description: "reference of the installed primary frontend to be used" + }, + %{ + key: "git", + type: :string, + description: "URL of the git repository of the frontend" + }, + %{ + key: "build_url", + type: :string, + description: + "Either an url to a zip file containing the frontend or a template to build it by inserting the `ref`. The string `${ref}` will be replaced by the configured `ref`.", + example: "https://some.url/builds/${ref}.zip" + }, + %{ + key: "build_dir", + type: :string, + description: "The directory inside the zip file " } ] }, @@ -3532,6 +3549,23 @@ config :pleroma, :config_description, [ key: "ref", type: :string, description: "reference of the installed Admin frontend to be used" + }, + %{ + key: "git", + type: :string, + description: "URL of the git repository of the frontend" + }, + %{ + key: "build_url", + type: :string, + description: + "Either an url to a zip file containing the frontend or a template to build it by inserting the `ref`. The string `${ref}` will be replaced by the configured `ref`.", + example: "https://some.url/builds/${ref}.zip" + }, + %{ + key: "build_dir", + type: :string, + description: "The directory inside the zip file " } ] } -- cgit v1.2.3 From 03da653a123341036e0caa84c6a7b4edd129afed Mon Sep 17 00:00:00 2001 From: lain Date: Thu, 6 Aug 2020 16:41:56 +0200 Subject: Description: Refactor. --- config/description.exs | 95 ++++++++++++++++++++------------------------------ 1 file changed, 37 insertions(+), 58 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index b56ea3339..1f50c9952 100644 --- a/config/description.exs +++ b/config/description.exs @@ -12,6 +12,36 @@ websocket_config = [ compress: false ] +frontend_options = [ + %{ + key: "name", + type: :string, + description: "Name of the installed Admin frontend" + }, + %{ + key: "ref", + type: :string, + description: "reference of the installed Admin frontend to be used" + }, + %{ + key: "git", + type: :string, + description: "URL of the git repository of the frontend" + }, + %{ + key: "build_url", + type: :string, + description: + "Either an url to a zip file containing the frontend or a template to build it by inserting the `ref`. The string `${ref}` will be replaced by the configured `ref`.", + example: "https://some.url/builds/${ref}.zip" + }, + %{ + key: "build_dir", + type: :string, + description: "The directory inside the zip file " + } +] + config :pleroma, :config_description, [ %{ group: :pleroma, @@ -3552,69 +3582,18 @@ config :pleroma, :config_description, [ key: :primary, type: :map, description: "Primary frontend, the one that is served for all pages by default", - children: [ - %{ - key: "name", - type: :string, - description: "Name of the installed primary frontend" - }, - %{ - key: "ref", - type: :string, - description: "reference of the installed primary frontend to be used" - }, - %{ - key: "git", - type: :string, - description: "URL of the git repository of the frontend" - }, - %{ - key: "build_url", - type: :string, - description: - "Either an url to a zip file containing the frontend or a template to build it by inserting the `ref`. The string `${ref}` will be replaced by the configured `ref`.", - example: "https://some.url/builds/${ref}.zip" - }, - %{ - key: "build_dir", - type: :string, - description: "The directory inside the zip file " - } - ] + children: frontend_options }, %{ key: :admin, type: :map, description: "Admin frontend", - children: [ - %{ - key: "name", - type: :string, - description: "Name of the installed Admin frontend" - }, - %{ - key: "ref", - type: :string, - description: "reference of the installed Admin frontend to be used" - }, - %{ - key: "git", - type: :string, - description: "URL of the git repository of the frontend" - }, - %{ - key: "build_url", - type: :string, - description: - "Either an url to a zip file containing the frontend or a template to build it by inserting the `ref`. The string `${ref}` will be replaced by the configured `ref`.", - example: "https://some.url/builds/${ref}.zip" - }, - %{ - key: "build_dir", - type: :string, - description: "The directory inside the zip file " - } - ] + children: frontend_options + }, + %{ + key: :available, + type: :map, + description: "A map containing frontends that we have some knowledge of" } ] } -- cgit v1.2.3 From 3f88366e2aebf34e81b3bec7db5c29175cdeca23 Mon Sep 17 00:00:00 2001 From: lain Date: Fri, 7 Aug 2020 11:07:02 +0000 Subject: Apply 1 suggestion(s) to 1 file(s) --- config/description.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 1f50c9952..c7c8524dd 100644 --- a/config/description.exs +++ b/config/description.exs @@ -3593,7 +3593,7 @@ config :pleroma, :config_description, [ %{ key: :available, type: :map, - description: "A map containing frontends that we have some knowledge of" + description: "A map containing available frontends and parameters for their installation." } ] } -- cgit v1.2.3 From aabc26a57327b15c1aa5ee9980b7542c9e2f4899 Mon Sep 17 00:00:00 2001 From: lain Date: Tue, 18 Aug 2020 13:21:30 +0200 Subject: Pleroma.Upload: Set default upload name / description based on config. --- config/config.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index a7c9e54b1..1ed3157c3 100644 --- a/config/config.exs +++ b/config/config.exs @@ -72,7 +72,8 @@ config :pleroma, Pleroma.Upload, pool: :upload ] ], - filename_display_max_length: 30 + filename_display_max_length: 30, + default_description: nil config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads" -- cgit v1.2.3 From 52a79506c786a1388eeab24892c7b36ee9682977 Mon Sep 17 00:00:00 2001 From: lain Date: Tue, 18 Aug 2020 14:37:35 +0200 Subject: Test config: Default to filename for descriptions --- config/test.exs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/test.exs b/config/test.exs index 413c7f0b9..f0358e384 100644 --- a/config/test.exs +++ b/config/test.exs @@ -21,7 +21,10 @@ config :logger, :console, config :pleroma, :auth, oauth_consumer_strategies: [] -config :pleroma, Pleroma.Upload, filters: [], link_name: false +config :pleroma, Pleroma.Upload, + filters: [], + link_name: false, + default_description: :filename config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads" -- cgit v1.2.3 From 6e5678b5af62231bf8c18a15b91fed5ecb30e625 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Mon, 24 Aug 2020 22:43:37 +0300 Subject: Add Pleroma.Web.Preload to description.exs --- config/description.exs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index e27abf40f..ebe1f11c4 100644 --- a/config/description.exs +++ b/config/description.exs @@ -3571,5 +3571,24 @@ config :pleroma, :config_description, [ ] } ] + }, + %{ + group: :pleroma, + key: Pleroma.Web.Preload, + type: :group, + description: "Preload-related settings", + children: [ + %{ + key: :providers, + type: {:list, :module}, + description: "List of preload providers to enable", + suggestions: [ + Pleroma.Web.Preload.Providers.Instance, + Pleroma.Web.Preload.Providers.User, + Pleroma.Web.Preload.Providers.Timelines, + Pleroma.Web.Preload.Providers.StatusNet + ] + } + ] } ] -- cgit v1.2.3 From 6d6e43fd09a66740d447e77e9878d9d35bc07414 Mon Sep 17 00:00:00 2001 From: lain Date: Tue, 25 Aug 2020 11:49:44 +0200 Subject: Description: Update description. --- config/description.exs | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index c50910911..29a657333 100644 --- a/config/description.exs +++ b/config/description.exs @@ -12,20 +12,35 @@ websocket_config = [ compress: false ] -frontend_options = [ +installed_frontend_options = [ %{ key: "name", label: "Name", type: :string, description: - "Name of the frontend. Valid config must include both `Name` and `Reference` values." + "Name of the installed frontend. Valid config must include both `Name` and `Reference` values." }, %{ key: "ref", label: "Reference", type: :string, description: - "Reference of the frontend to be used. Valid config must include both `Name` and `Reference` values." + "Reference of the installed frontend to be used. Valid config must include both `Name` and `Reference` values." + } +] + +frontend_options = [ + %{ + key: "name", + label: "Name", + type: :string, + description: "Name of the frontend." + }, + %{ + key: "ref", + label: "Reference", + type: :string, + description: "Reference of the frontend to be used." }, %{ key: "git", @@ -3587,13 +3602,13 @@ config :pleroma, :config_description, [ key: :primary, type: :map, description: "Primary frontend, the one that is served for all pages by default", - children: frontend_options + children: installed_frontend_options }, %{ key: :admin, type: :map, description: "Admin frontend", - children: frontend_options + children: installed_frontend_options }, %{ key: :available, -- cgit v1.2.3