we're not soapbox actually
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
63a0288885
commit
509d5ef74a
8 changed files with 16 additions and 23 deletions
|
@ -15,7 +15,7 @@ Added features:
|
||||||
- [Partial implementation of Mastodon admin API](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3671)
|
- [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)
|
- [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)
|
- [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:
|
Features not authored by me:
|
||||||
- [Chat deletion](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3029)
|
- [Chat deletion](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3029)
|
||||||
|
|
|
@ -978,8 +978,6 @@
|
||||||
|
|
||||||
config :geospatial, Geospatial.HTTP, user_agent: &Pleroma.Application.user_agent/0
|
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, module: Pleroma.Search.DatabaseSearch
|
||||||
|
|
||||||
config :pleroma, Pleroma.Search.Meilisearch,
|
config :pleroma, Pleroma.Search.Meilisearch,
|
||||||
|
@ -1009,6 +1007,8 @@
|
||||||
vectors: %{size: 384, distance: "Cosine"}
|
vectors: %{size: 384, distance: "Cosine"}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
import_config "pl-fe.exs"
|
||||||
|
|
||||||
# Import environment specific config. This must remain at the bottom
|
# Import environment specific config. This must remain at the bottom
|
||||||
# of this file so it overrides the configuration defined above.
|
# of this file so it overrides the configuration defined above.
|
||||||
import_config "#{Mix.env()}.exs"
|
import_config "#{Mix.env()}.exs"
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
# Soapbox default config overrides
|
# pl-fe default config overrides
|
||||||
# This file gets loaded after config.exs
|
# This file gets loaded after config.exs
|
||||||
# and before prod.secret.exs
|
# and before prod.secret.exs
|
||||||
import Config
|
import Config
|
||||||
|
|
||||||
# Twitter-like block behavior
|
|
||||||
config :pleroma, :activitypub, blockers_visible: false
|
|
||||||
|
|
||||||
# Sane default upload filters
|
# Sane default upload filters
|
||||||
config :pleroma, Pleroma.Upload,
|
config :pleroma, Pleroma.Upload,
|
||||||
filters: [
|
filters: [
|
||||||
|
@ -45,11 +42,7 @@
|
||||||
# Sane default media attachment limit
|
# Sane default media attachment limit
|
||||||
config :pleroma, :instance, max_media_attachments: 20
|
config :pleroma, :instance, max_media_attachments: 20
|
||||||
|
|
||||||
# Use Soapbox branding
|
|
||||||
config :pleroma, :instance,
|
config :pleroma, :instance,
|
||||||
name: "Soapbox",
|
|
||||||
description: "Social media owned by you",
|
|
||||||
instance_thumbnail: "/instance/thumbnail.png",
|
|
||||||
account_approval_required: true,
|
account_approval_required: true,
|
||||||
moderator_privileges: [
|
moderator_privileges: [
|
||||||
:users_read,
|
:users_read,
|
|
@ -92,7 +92,7 @@ defp csp_string do
|
||||||
static_url = Pleroma.Web.Endpoint.static_url()
|
static_url = Pleroma.Web.Endpoint.static_url()
|
||||||
websocket_url = Pleroma.Web.Endpoint.websocket_url()
|
websocket_url = Pleroma.Web.Endpoint.websocket_url()
|
||||||
report_uri = @config_impl.get([:http_security, :report_uri])
|
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:"
|
img_src = "img-src 'self' data: blob:"
|
||||||
media_src = "media-src 'self'"
|
media_src = "media-src 'self'"
|
||||||
|
@ -200,7 +200,7 @@ defp build_csp_multimedia_source_list do
|
||||||
|
|
||||||
defp map_tile_server do
|
defp map_tile_server do
|
||||||
with tile_server when is_binary(tile_server) <-
|
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: host} <- URI.parse(tile_server) do
|
||||||
["*.#{host}"]
|
["*.#{host}"]
|
||||||
else
|
else
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
:root {
|
:root {
|
||||||
<%= Pleroma.Web.Utils.Colors.shades_to_css(
|
<%= Pleroma.Web.Utils.Colors.shades_to_css(
|
||||||
"primary",
|
"primary",
|
||||||
Pleroma.Config.get([:frontend_configurations, :soapbox_fe, "brandColor"], "#0482d8"),
|
Pleroma.Config.get([:frontend_configurations, :pl_fe, "brandColor"], "#d80482"),
|
||||||
Pleroma.Config.get([:frontend_configurations, :soapbox_fe, "colors", "primary"], %{})
|
Pleroma.Config.get([:frontend_configurations, :pl_fe, "colors", "primary"], %{})
|
||||||
) %>
|
) %>
|
||||||
<%= Pleroma.Web.Utils.Colors.shades_to_css(
|
<%= Pleroma.Web.Utils.Colors.shades_to_css(
|
||||||
"accent",
|
"accent",
|
||||||
Pleroma.Config.get([:frontend_configurations, :soapbox_fe, "accentColor"], "#2bd110"),
|
Pleroma.Config.get([:frontend_configurations, :pl_fe, "accentColor"], "#d110b4"),
|
||||||
Pleroma.Config.get([:frontend_configurations, :soapbox_fe, "colors", "accent"], %{})
|
Pleroma.Config.get([:frontend_configurations, :pl_fe, "colors", "accent"], %{})
|
||||||
) %>
|
) %>
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<body>
|
<body>
|
||||||
<div class="instance-header">
|
<div class="instance-header">
|
||||||
<a class="instance-header__content" href="/">
|
<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>
|
<h1 class="instance-header__title"><%= Pleroma.Config.get([:instance, :name]) %></h1>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -51,7 +51,7 @@ def get_shades("#" <> base_color, overrides) do
|
||||||
shades
|
shades
|
||||||
end
|
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
|
defp get_override(level, overrides) do
|
||||||
if Map.has_key?(overrides, "#{level}") do
|
if Map.has_key?(overrides, "#{level}") do
|
||||||
|
|
|
@ -125,7 +125,7 @@ test "get oauth_consumer_strategies", %{conn: conn} do
|
||||||
|
|
||||||
describe "instance domain blocks" do
|
describe "instance domain blocks" do
|
||||||
setup do
|
setup do
|
||||||
clear_config([:mrf_simple, :reject], [{"fediverse.pl", "uses Soapbox"}])
|
clear_config([:mrf_simple, :reject], [{"fediverse.pl", "uses pl-fe"}])
|
||||||
end
|
end
|
||||||
|
|
||||||
test "get instance domain blocks", %{conn: conn} do
|
test "get instance domain blocks", %{conn: conn} do
|
||||||
|
@ -133,7 +133,7 @@ test "get instance domain blocks", %{conn: conn} do
|
||||||
|
|
||||||
assert [
|
assert [
|
||||||
%{
|
%{
|
||||||
"comment" => "uses Soapbox",
|
"comment" => "uses pl-fe",
|
||||||
"digest" => "55e3f44aefe7eb022d3b1daaf7396cabf7f181bf6093c8ea841e30c9fc7d8226",
|
"digest" => "55e3f44aefe7eb022d3b1daaf7396cabf7f181bf6093c8ea841e30c9fc7d8226",
|
||||||
"domain" => "fediverse.pl",
|
"domain" => "fediverse.pl",
|
||||||
"severity" => "suspend"
|
"severity" => "suspend"
|
||||||
|
|
|
@ -25,9 +25,9 @@ test "generates tints from a base color" do
|
||||||
} == Colors.get_shades(@base_color)
|
} == Colors.get_shades(@base_color)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "uses soapbox blue if invalid color provided" do
|
test "uses pl-fe default color if invalid color provided" do
|
||||||
assert %{
|
assert %{
|
||||||
500 => "4, 130, 216"
|
500 => "216, 4, 130"
|
||||||
} = Colors.get_shades("255, 255, 127")
|
} = Colors.get_shades("255, 255, 127")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue