we're not soapbox actually

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-09-09 16:15:45 +02:00
parent 63a0288885
commit 509d5ef74a
8 changed files with 16 additions and 23 deletions

View file

@ -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)

View file

@ -978,8 +978,6 @@
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 @@
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"

View file

@ -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 @@
# 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,

View file

@ -92,7 +92,7 @@ defp csp_string 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 @@ defp build_csp_multimedia_source_list 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

View file

@ -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"], %{})
) %>
}
</style>
@ -23,7 +23,7 @@
<body>
<div class="instance-header">
<a class="instance-header__content" href="/">
<img class="instance-header__thumbnail" src="<%= Pleroma.Config.get([:frontend_configurations, :soapbox_fe, "logo"], Pleroma.Config.get([:instance, :instance_thumbnail])) %>">
<img class="instance-header__thumbnail" src="<%= Pleroma.Config.get([:frontend_configurations, :pl_fe, "logo"], Pleroma.Config.get([:instance, :instance_thumbnail])) %>">
<h1 class="instance-header__title"><%= Pleroma.Config.get([:instance, :name]) %></h1>
</a>
</div>

View file

@ -51,7 +51,7 @@ def get_shades("#" <> base_color, overrides) 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

View file

@ -125,7 +125,7 @@ test "get oauth_consumer_strategies", %{conn: conn} 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 @@ test "get instance domain blocks", %{conn: conn} do
assert [
%{
"comment" => "uses Soapbox",
"comment" => "uses pl-fe",
"digest" => "55e3f44aefe7eb022d3b1daaf7396cabf7f181bf6093c8ea841e30c9fc7d8226",
"domain" => "fediverse.pl",
"severity" => "suspend"

View file

@ -25,9 +25,9 @@ test "generates tints from a base color" 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