forked from AkkomaGang/akkoma
parent
fef48af31e
commit
82fa766ed7
4684 changed files with 216 additions and 15691 deletions
|
@ -9,14 +9,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
### Added
|
||||
- Added move account API
|
||||
- Added ability to set instance accent-color via theme-color
|
||||
- A fallback page for when a user does not have a frontend installed
|
||||
|
||||
### Removed
|
||||
- SSH frontend, to be potentially re-enabled via a bridge rather than wired into the main system
|
||||
- Gopher frontend, as above
|
||||
- All pre-compiled javascript
|
||||
|
||||
### Fixed
|
||||
- ES8 support for bulk indexing activities
|
||||
|
||||
### Upgrade Notes
|
||||
- The bundled frontend has been removed, you will need to run the `pleroma.frontend install` mix task to install your frontend of choice. Configuration by default is set to `pleroma-fe`.
|
||||
|
||||
## 2.5.2
|
||||
|
||||
### Added
|
||||
|
|
|
@ -718,6 +718,7 @@
|
|||
# available: %{...}
|
||||
|
||||
config :pleroma, :frontends,
|
||||
primary: %{"name" => "pleroma-fe", "ref" => "develop"},
|
||||
available: %{
|
||||
"pleroma-fe" => %{
|
||||
"name" => "pleroma-fe",
|
||||
|
@ -726,7 +727,7 @@
|
|||
"ref" => "develop",
|
||||
"build_dir" => "dist"
|
||||
},
|
||||
# mastodon-Fe cannot be set as a primary - this is only here so we can update this seperately
|
||||
# Mastodon-Fe cannot be set as a primary - this is only here so we can update this seperately
|
||||
"mastodon-fe" => %{
|
||||
"name" => "mastodon-fe",
|
||||
"git" => "https://akkoma.dev/AkkomaGang/masto-fe",
|
||||
|
|
|
@ -1096,7 +1096,7 @@ You can set a frontends for the key `primary` and `admin` and the options of `na
|
|||
|
||||
The key `primary` refers to the frontend that will be served by default for general requests. The key `admin` refers to the frontend that will be served at the `/pleroma/admin` path.
|
||||
|
||||
If you don't set anything here, the bundled frontends will be used.
|
||||
If you don't set anything here, you will not have _any_ frontend at all.
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -1114,6 +1114,14 @@ config :pleroma, :frontends,
|
|||
|
||||
This would serve the frontend from the the folder at `$instance_static/frontends/pleroma/stable`. You have to copy the frontend into this folder yourself. You can choose the name and ref any way you like, but they will be used by mix tasks to automate installation in the future, the name referring to the project and the ref referring to a commit.
|
||||
|
||||
Refer to [the frontend CLI task](../../administration/CLI_tasks/frontend) for how to install the frontend's files
|
||||
|
||||
If you wish masto-fe to also be enabled, you will also need to run the install task for `mastodon-fe`. Not doing this will lead to the frontend not working.
|
||||
|
||||
If you choose not to install a frontend for whatever reason, it is recommended that you enable [`:static_fe`](#static_fe) to allow remote users to click "view remote source". Don't bother with this if you've got no unauthenticated access though.
|
||||
|
||||
You can also replace the default "no frontend" page by placing an `index.html` file under your `instance/static/` directory.
|
||||
|
||||
### Theme settings
|
||||
|
||||
Settings to change theme as exposed to the outside world, for software
|
||||
|
|
|
@ -224,6 +224,5 @@ doas -u akkoma env MIX_ENV=prod mix pleroma.user new <username> <your@emailaddre
|
|||
#### Further reading
|
||||
|
||||
{! backend/installation/further_reading.include !}
|
||||
## Questions
|
||||
|
||||
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||
{! backend/support.include !}
|
||||
|
|
|
@ -215,6 +215,5 @@ sudo -Hu akkoma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress>
|
|||
#### Further reading
|
||||
|
||||
{! backend/installation/further_reading.include !}
|
||||
## Questions
|
||||
|
||||
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||
{! backend/support.include !}
|
||||
|
|
|
@ -178,6 +178,5 @@ sudo -Hu akkoma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress>
|
|||
#### Further reading
|
||||
|
||||
{! backend/installation/further_reading.include !}
|
||||
## Questions
|
||||
|
||||
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||
{! backend/support.include !}
|
||||
|
|
|
@ -212,6 +212,5 @@ Restart nginx with `# service nginx restart` and you should be up and running.
|
|||
|
||||
Make sure your time is in sync, or other instances will receive your posts with
|
||||
incorrect timestamps. You should have ntpd running.
|
||||
## Questions
|
||||
|
||||
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||
{! backend/support.include !}
|
||||
|
|
|
@ -296,6 +296,5 @@ If you opted to allow sudo for the `akkoma` user but would like to remove the ab
|
|||
#### Further reading
|
||||
|
||||
{! backend/installation/further_reading.include !}
|
||||
## Questions
|
||||
|
||||
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||
{! backend/support.include !}
|
||||
|
|
|
@ -141,6 +141,5 @@ OTP releases have different service files than from-source installs so they need
|
|||
Refer to [Running mix tasks](otp_en.md#running-mix-tasks) section from OTP release installation guide.
|
||||
## Updating
|
||||
Refer to [Updating](otp_en.md#updating) section from OTP release installation guide.
|
||||
## Questions
|
||||
|
||||
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||
{! backend/support.include !}
|
||||
|
|
|
@ -206,9 +206,4 @@ incorrect timestamps. You should have ntpd running.
|
|||
|
||||
{! backend/installation/further_reading.include !}
|
||||
|
||||
## Questions
|
||||
|
||||
Questions about the installation or didn’t it work as it should be, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC.
|
||||
## Questions
|
||||
|
||||
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||
{! backend/support.include !}
|
||||
|
|
|
@ -254,6 +254,4 @@ LC_ALL=en_US.UTF-8 MIX_ENV=prod mix pleroma.user new <username> <your@emailaddre
|
|||
|
||||
{! backend/installation/further_reading.include !}
|
||||
|
||||
## Questions
|
||||
|
||||
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||
{! backend/support.include !}
|
||||
|
|
|
@ -235,7 +235,7 @@ At this point if you open your (sub)domain in a browser you should see a 502 err
|
|||
|
||||
If everything worked, you should see Akkoma-FE when visiting your domain. If that didn't happen, try reviewing the installation steps, starting Akkoma in the foreground and seeing if there are any errrors.
|
||||
|
||||
Questions about the installation or didn’t it work as it should be, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC, you can also [file an issue on our Gitea](https://akkoma.dev/AkkomaGang/akkoma/issues).
|
||||
{! backend/support.include !}
|
||||
|
||||
## Post installation
|
||||
|
||||
|
@ -302,6 +302,4 @@ This will create an account withe the username of 'joeuser' with the email addre
|
|||
|
||||
{! backend/installation/further_reading.include !}
|
||||
|
||||
## Questions
|
||||
|
||||
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||
{! backend/support.include !}
|
||||
|
|
5
docs/support.include
Normal file
5
docs/support.include
Normal file
|
@ -0,0 +1,5 @@
|
|||
## Support
|
||||
|
||||
If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/).
|
||||
|
||||
Or message via IRC on #akkoma at irc.akkoma.dev (port 6697, SSL)
|
|
@ -78,6 +78,16 @@ defmodule Pleroma.Web.Endpoint do
|
|||
}
|
||||
)
|
||||
|
||||
plug(Pleroma.Web.Plugs.FrontendStatic,
|
||||
at: "/",
|
||||
frontend_type: :mastodon,
|
||||
gzip: true,
|
||||
cache_control_for_etags: @static_cache_control,
|
||||
headers: %{
|
||||
"cache-control" => @static_cache_control
|
||||
}
|
||||
)
|
||||
|
||||
# Serve at "/" the static files from "priv/static" directory.
|
||||
#
|
||||
# You should set gzip to true if you are running phoenix.digest
|
||||
|
|
150
lib/pleroma/web/pipelines.ex
Normal file
150
lib/pleroma/web/pipelines.ex
Normal file
|
@ -0,0 +1,150 @@
|
|||
defmodule Pleroma.Web.Pipelines do
|
||||
def common do
|
||||
quote do
|
||||
pipeline :accepts_html do
|
||||
plug(:accepts, ["html"])
|
||||
end
|
||||
|
||||
pipeline :accepts_html_xml do
|
||||
plug(:accepts, ["html", "xml", "rss", "atom"])
|
||||
end
|
||||
|
||||
pipeline :accepts_html_json do
|
||||
plug(:accepts, ["html", "activity+json", "json"])
|
||||
end
|
||||
|
||||
pipeline :accepts_html_xml_json do
|
||||
plug(:accepts, ["html", "xml", "rss", "atom", "activity+json", "json"])
|
||||
end
|
||||
|
||||
pipeline :accepts_xml_rss_atom do
|
||||
plug(:accepts, ["xml", "rss", "atom"])
|
||||
end
|
||||
|
||||
pipeline :browser do
|
||||
plug(:accepts, ["html"])
|
||||
plug(:fetch_session)
|
||||
end
|
||||
|
||||
pipeline :oauth do
|
||||
plug(:fetch_session)
|
||||
plug(Pleroma.Web.Plugs.OAuthPlug)
|
||||
plug(Pleroma.Web.Plugs.UserEnabledPlug)
|
||||
plug(Pleroma.Web.Plugs.EnsureUserTokenAssignsPlug)
|
||||
end
|
||||
|
||||
# Note: expects _user_ authentication (user-unbound app-bound tokens don't qualify)
|
||||
pipeline :expect_user_authentication do
|
||||
plug(Pleroma.Web.Plugs.ExpectAuthenticatedCheckPlug)
|
||||
end
|
||||
|
||||
# Note: expects public instance or _user_ authentication (user-unbound tok ens don't qualify)
|
||||
pipeline :expect_public_instance_or_user_authentication do
|
||||
plug(Pleroma.Web.Plugs.ExpectPublicOrAuthenticatedCheckPlug)
|
||||
end
|
||||
|
||||
pipeline :authenticate do
|
||||
plug(Pleroma.Web.Plugs.OAuthPlug)
|
||||
plug(Pleroma.Web.Plugs.BasicAuthDecoderPlug)
|
||||
plug(Pleroma.Web.Plugs.UserFetcherPlug)
|
||||
plug(Pleroma.Web.Plugs.AuthenticationPlug)
|
||||
end
|
||||
|
||||
pipeline :after_auth do
|
||||
plug(Pleroma.Web.Plugs.UserEnabledPlug)
|
||||
plug(Pleroma.Web.Plugs.SetUserSessionIdPlug)
|
||||
plug(Pleroma.Web.Plugs.EnsureUserTokenAssignsPlug)
|
||||
plug(Pleroma.Web.Plugs.UserTrackingPlug)
|
||||
end
|
||||
|
||||
pipeline :base_api do
|
||||
plug(:accepts, ["json"])
|
||||
plug(:fetch_session)
|
||||
plug(:authenticate)
|
||||
plug(OpenApiSpex.Plug.PutApiSpec, module: Pleroma.Web.ApiSpec)
|
||||
end
|
||||
|
||||
pipeline :no_auth_or_privacy_expectations_api do
|
||||
plug(:base_api)
|
||||
plug(:after_auth)
|
||||
plug(Pleroma.Web.Plugs.IdempotencyPlug)
|
||||
end
|
||||
|
||||
# Pipeline for app-related endpoints (no user auth checks — app-bound toke ns must be supported)
|
||||
pipeline :app_api do
|
||||
plug(:no_auth_or_privacy_expectations_api)
|
||||
end
|
||||
|
||||
pipeline :api do
|
||||
plug(:expect_public_instance_or_user_authentication)
|
||||
plug(:no_auth_or_privacy_expectations_api)
|
||||
end
|
||||
|
||||
pipeline :authenticated_api do
|
||||
plug(:expect_user_authentication)
|
||||
plug(:no_auth_or_privacy_expectations_api)
|
||||
plug(Pleroma.Web.Plugs.EnsureAuthenticatedPlug)
|
||||
end
|
||||
|
||||
pipeline :admin_api do
|
||||
plug(:expect_user_authentication)
|
||||
plug(:base_api)
|
||||
plug(Pleroma.Web.Plugs.AdminSecretAuthenticationPlug)
|
||||
plug(:after_auth)
|
||||
plug(Pleroma.Web.Plugs.EnsureAuthenticatedPlug)
|
||||
plug(Pleroma.Web.Plugs.UserIsStaffPlug)
|
||||
plug(Pleroma.Web.Plugs.IdempotencyPlug)
|
||||
end
|
||||
|
||||
pipeline :require_privileged_staff do
|
||||
plug(Pleroma.Web.Plugs.EnsureStaffPrivilegedPlug)
|
||||
end
|
||||
|
||||
pipeline :require_admin do
|
||||
plug(Pleroma.Web.Plugs.UserIsAdminPlug)
|
||||
end
|
||||
|
||||
pipeline :pleroma_html do
|
||||
plug(:browser)
|
||||
plug(:authenticate)
|
||||
plug(Pleroma.Web.Plugs.EnsureUserTokenAssignsPlug)
|
||||
end
|
||||
|
||||
pipeline :well_known do
|
||||
plug(:accepts, ["json", "jrd+json", "xml", "xrd+xml"])
|
||||
end
|
||||
|
||||
pipeline :config do
|
||||
plug(:accepts, ["json", "xml"])
|
||||
plug(OpenApiSpex.Plug.PutApiSpec, module: Pleroma.Web.ApiSpec)
|
||||
end
|
||||
|
||||
pipeline :pleroma_api do
|
||||
plug(:accepts, ["html", "json"])
|
||||
plug(OpenApiSpex.Plug.PutApiSpec, module: Pleroma.Web.ApiSpec)
|
||||
end
|
||||
|
||||
pipeline :mailbox_preview do
|
||||
plug(:accepts, ["html"])
|
||||
|
||||
plug(:put_secure_browser_headers, %{
|
||||
"content-security-policy" =>
|
||||
"default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' 'unsafe-eval'"
|
||||
})
|
||||
end
|
||||
|
||||
pipeline :http_signature do
|
||||
plug(Pleroma.Web.Plugs.HTTPSignaturePlug)
|
||||
plug(Pleroma.Web.Plugs.MappedSignatureToIdentityPlug)
|
||||
end
|
||||
|
||||
pipeline :static_fe do
|
||||
plug(Pleroma.Web.Plugs.StaticFEPlug)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
defmacro __using__(which) when is_atom(which) do
|
||||
apply(__MODULE__, which, [])
|
||||
end
|
||||
end
|
3
mix.exs
3
mix.exs
|
@ -160,8 +160,7 @@ defp deps do
|
|||
{:timex, "~> 3.6"},
|
||||
{:ueberauth, "~> 0.4"},
|
||||
{:linkify,
|
||||
git: "https://git.ihatebeinga.live/floatingghost/linkify.git",
|
||||
branch: "bugfix/line-ending-buffer"},
|
||||
git: "https://akkoma.dev/AkkomaGang/linkify.git", branch: "bugfix/line-ending-buffer"},
|
||||
{:http_signatures, "~> 0.1.1"},
|
||||
{:telemetry, "~> 0.3"},
|
||||
{:poolboy, "~> 1.5"},
|
||||
|
|
2
mix.lock
2
mix.lock
|
@ -72,7 +72,7 @@
|
|||
"jose": {:hex, :jose, "1.11.1", "59da64010c69aad6cde2f5b9248b896b84472e99bd18f246085b7b9fe435dcdb", [:mix, :rebar3], [], "hexpm", "078f6c9fb3cd2f4cfafc972c814261a7d1e8d2b3685c0a76eb87e158efff1ac5"},
|
||||
"jumper": {:hex, :jumper, "1.0.1", "3c00542ef1a83532b72269fab9f0f0c82bf23a35e27d278bfd9ed0865cecabff", [:mix], [], "hexpm", "318c59078ac220e966d27af3646026db9b5a5e6703cb2aa3e26bcfaba65b7433"},
|
||||
"libring": {:hex, :libring, "1.4.0", "41246ba2f3fbc76b3971f6bce83119dfec1eee17e977a48d8a9cfaaf58c2a8d6", [:mix], [], "hexpm"},
|
||||
"linkify": {:git, "https://git.ihatebeinga.live/floatingghost/linkify.git", "2567e2c1073fa371fd26fd66dfa5bc77b6919c16", [branch: "bugfix/line-ending-buffer"]},
|
||||
"linkify": {:git, "https://akkoma.dev/AkkomaGang/linkify.git", "2567e2c1073fa371fd26fd66dfa5bc77b6919c16", [branch: "bugfix/line-ending-buffer"]},
|
||||
"majic": {:hex, :majic, "1.0.0", "37e50648db5f5c2ff0c9fb46454d034d11596c03683807b9fb3850676ffdaab3", [:make, :mix], [{:elixir_make, "~> 0.6.1", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "7905858f76650d49695f14ea55cd9aaaee0c6654fa391671d4cf305c275a0a9e"},
|
||||
"makeup": {:hex, :makeup, "1.0.5", "d5a830bc42c9800ce07dd97fa94669dfb93d3bf5fcf6ea7a0c67b2e0e4a7f26c", [:mix], [{:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cfa158c02d3f5c0c665d0af11512fed3fba0144cf1aadee0f2ce17747fba2ca9"},
|
||||
"makeup_elixir": {:hex, :makeup_elixir, "0.14.1", "4f0e96847c63c17841d42c08107405a005a2680eb9c7ccadfd757bd31dabccfb", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f2438b1a80eaec9ede832b5c41cd4f373b38fd7aa33e3b22d9db79e640cbde11"},
|
||||
|
|
BIN
priv/static/0.js
BIN
priv/static/0.js
Binary file not shown.
BIN
priv/static/1.js
BIN
priv/static/1.js
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
priv/static/2.js
BIN
priv/static/2.js
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
priv/static/3.js
BIN
priv/static/3.js
Binary file not shown.
Binary file not shown.
BIN
priv/static/4.js
BIN
priv/static/4.js
Binary file not shown.
BIN
priv/static/5.js
BIN
priv/static/5.js
Binary file not shown.
BIN
priv/static/6.js
BIN
priv/static/6.js
Binary file not shown.
BIN
priv/static/7.js
BIN
priv/static/7.js
Binary file not shown.
BIN
priv/static/8.js
BIN
priv/static/8.js
Binary file not shown.
BIN
priv/static/9.js
BIN
priv/static/9.js
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 66 KiB |
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=renderer content=webkit><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><title>Admin FE</title><link rel="shortcut icon" href=favicon.ico><link href=chunk-elementUI.2a81c299.css rel=stylesheet><link href=chunk-libs.d18a5451.css rel=stylesheet><link href=app.e364df13.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=static/js/runtime.9abfb7da.js></script><script type=text/javascript src=static/js/chunk-elementUI.a6aa984a.js></script><script type=text/javascript src=static/js/chunk-libs.b57004be.js></script><script type=text/javascript src=static/js/app.ca59280e.js></script></body></html>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue