diff --git a/README.md b/README.md index b58ff35eba..302d95e817 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Added features: - [Partial implementation of Mastodon admin API](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3671) - [Moderators can assign users to reports](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3670) - [Mastodon-compatible webhooks](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3683) -- UI is restyled to match pl-fe/Soapbox visuals +- UI is restyled to match pl-fe visuals Features not authored by me: - [Chat deletion](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3029) diff --git a/config/config.exs b/config/config.exs index 535621e0b6..0e921bf6dd 100644 --- a/config/config.exs +++ b/config/config.exs @@ -978,8 +978,6 @@ config :geospatial, Geospatial.Providers.Pelias, config :geospatial, Geospatial.HTTP, user_agent: &Pleroma.Application.user_agent/0 -import_config "soapbox.exs" - config :pleroma, Pleroma.Search, module: Pleroma.Search.DatabaseSearch config :pleroma, Pleroma.Search.Meilisearch, @@ -1009,6 +1007,8 @@ config :pleroma, Pleroma.Search.QdrantSearch, vectors: %{size: 384, distance: "Cosine"} } +import_config "pl-fe.exs" + # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. import_config "#{Mix.env()}.exs" diff --git a/config/soapbox.exs b/config/pl-fe.exs similarity index 87% rename from config/soapbox.exs rename to config/pl-fe.exs index b7f270e7a8..584c1c6d52 100644 --- a/config/soapbox.exs +++ b/config/pl-fe.exs @@ -1,11 +1,8 @@ -# Soapbox default config overrides +# pl-fe default config overrides # This file gets loaded after config.exs # and before prod.secret.exs import Config -# Twitter-like block behavior -config :pleroma, :activitypub, blockers_visible: false - # Sane default upload filters config :pleroma, Pleroma.Upload, filters: [ @@ -45,11 +42,7 @@ config :pleroma, :mrf_hellthread, # Sane default media attachment limit config :pleroma, :instance, max_media_attachments: 20 -# Use Soapbox branding config :pleroma, :instance, - name: "Soapbox", - description: "Social media owned by you", - instance_thumbnail: "/instance/thumbnail.png", account_approval_required: true, moderator_privileges: [ :users_read, diff --git a/lib/pleroma/web/plugs/http_security_plug.ex b/lib/pleroma/web/plugs/http_security_plug.ex index 58f38b4b1f..c43f4ecf68 100644 --- a/lib/pleroma/web/plugs/http_security_plug.ex +++ b/lib/pleroma/web/plugs/http_security_plug.ex @@ -92,7 +92,7 @@ defmodule Pleroma.Web.Plugs.HTTPSecurityPlug do static_url = Pleroma.Web.Endpoint.static_url() websocket_url = Pleroma.Web.Endpoint.websocket_url() report_uri = @config_impl.get([:http_security, :report_uri]) - sentry_dsn = @config_impl.get([:frontend_configurations, :soapbox_fe, "sentryDsn"]) + sentry_dsn = @config_impl.get([:frontend_configurations, :pl_fe, "sentryDsn"]) img_src = "img-src 'self' data: blob:" media_src = "media-src 'self'" @@ -200,7 +200,7 @@ defmodule Pleroma.Web.Plugs.HTTPSecurityPlug do defp map_tile_server do with tile_server when is_binary(tile_server) <- - @config_impl.get([:frontend_configurations, :soapbox_fe, "tileServer"]), + @config_impl.get([:frontend_configurations, :pl_fe, "tileServer"]), %{host: host} <- URI.parse(tile_server) do ["*.#{host}"] else diff --git a/lib/pleroma/web/templates/layout/app.html.eex b/lib/pleroma/web/templates/layout/app.html.eex index ac5d9800c1..0e78567e93 100644 --- a/lib/pleroma/web/templates/layout/app.html.eex +++ b/lib/pleroma/web/templates/layout/app.html.eex @@ -9,13 +9,13 @@ :root { <%= Pleroma.Web.Utils.Colors.shades_to_css( "primary", - Pleroma.Config.get([:frontend_configurations, :soapbox_fe, "brandColor"], "#0482d8"), - Pleroma.Config.get([:frontend_configurations, :soapbox_fe, "colors", "primary"], %{}) + Pleroma.Config.get([:frontend_configurations, :pl_fe, "brandColor"], "#d80482"), + Pleroma.Config.get([:frontend_configurations, :pl_fe, "colors", "primary"], %{}) ) %> <%= Pleroma.Web.Utils.Colors.shades_to_css( "accent", - Pleroma.Config.get([:frontend_configurations, :soapbox_fe, "accentColor"], "#2bd110"), - Pleroma.Config.get([:frontend_configurations, :soapbox_fe, "colors", "accent"], %{}) + Pleroma.Config.get([:frontend_configurations, :pl_fe, "accentColor"], "#d110b4"), + Pleroma.Config.get([:frontend_configurations, :pl_fe, "colors", "accent"], %{}) ) %> } @@ -23,7 +23,7 @@
diff --git a/lib/pleroma/web/utils/colors.ex b/lib/pleroma/web/utils/colors.ex index 449393f2b4..c00a938109 100644 --- a/lib/pleroma/web/utils/colors.ex +++ b/lib/pleroma/web/utils/colors.ex @@ -51,7 +51,7 @@ defmodule Pleroma.Web.Utils.Colors do shades end - def get_shades(_, overrides), do: get_shades("#0482d8", overrides) + def get_shades(_, overrides), do: get_shades("#d80482", overrides) defp get_override(level, overrides) do if Map.has_key?(overrides, "#{level}") do diff --git a/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs index c6299f0345..bf08cc4be6 100644 --- a/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs +++ b/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs @@ -125,7 +125,7 @@ defmodule Pleroma.Web.MastodonAPI.InstanceControllerTest do describe "instance domain blocks" do setup do - clear_config([:mrf_simple, :reject], [{"fediverse.pl", "uses Soapbox"}]) + clear_config([:mrf_simple, :reject], [{"fediverse.pl", "uses pl-fe"}]) end test "get instance domain blocks", %{conn: conn} do @@ -133,7 +133,7 @@ defmodule Pleroma.Web.MastodonAPI.InstanceControllerTest do assert [ %{ - "comment" => "uses Soapbox", + "comment" => "uses pl-fe", "digest" => "55e3f44aefe7eb022d3b1daaf7396cabf7f181bf6093c8ea841e30c9fc7d8226", "domain" => "fediverse.pl", "severity" => "suspend" diff --git a/test/pleroma/web/utils/colors_test.exs b/test/pleroma/web/utils/colors_test.exs index 91d23f6265..68d4a90e0c 100644 --- a/test/pleroma/web/utils/colors_test.exs +++ b/test/pleroma/web/utils/colors_test.exs @@ -25,9 +25,9 @@ defmodule Pleroma.Web.Utils.ColorsTest do } == Colors.get_shades(@base_color) end - test "uses soapbox blue if invalid color provided" do + test "uses pl-fe default color if invalid color provided" do assert %{ - 500 => "4, 130, 216" + 500 => "216, 4, 130" } = Colors.get_shades("255, 255, 127") end end