Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into develop

This commit is contained in:
lain 2018-04-02 13:15:38 +02:00
commit cd543d58a1
297 changed files with 271 additions and 138925 deletions

View File

@ -50,6 +50,7 @@
name: "Pleroma",
email: "example@example.com",
limit: 5000,
upload_limit: 16_000_000,
registrations_open: true,
federating: true

View File

@ -28,7 +28,16 @@ server {
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript application/activity+json application/atom+xml;
location / {
add_header 'Access-Control-Allow-Origin' '*';
# if you do not want remote frontends to be able to access your Pleroma backend
# server, remove these lines.
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'POST, GET, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type' always;
if ($request_method = OPTIONS) {
return 204;
}
# stop removing lines here.
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

View File

@ -34,7 +34,8 @@ defmodule Pleroma.Web.Endpoint do
Plug.Parsers,
parsers: [:urlencoded, :multipart, :json],
pass: ["*/*"],
json_decoder: Jason
json_decoder: Jason,
length: Application.get_env(:pleroma, :instance) |> Keyword.get(:upload_limit)
)
plug(Plug.MethodOverride)

View File

@ -513,12 +513,16 @@ def search(%{assigns: %{user: user}} = conn, %{"q" => query} = params) do
)
statuses = Repo.all(q) ++ fetched
tags = String.split(query)
|> Enum.uniq()
|> Enum.filter(fn tag -> String.starts_with?(tag, "#") end)
|> Enum.map(fn tag -> String.slice(tag, 1..-1) end)
res = %{
"accounts" => AccountView.render("accounts.json", users: accounts, for: user, as: :user),
"statuses" =>
StatusView.render("index.json", activities: statuses, for: user, as: :activity),
"hashtags" => []
"hashtags" => tags
}
json(conn, res)

View File

@ -9,14 +9,17 @@
<link rel="icon" type="image/png" href="/favicon.png"/>
<link rel="stylesheet" media="all" href="/packs/common.css" />
<link rel="stylesheet" media="all" href="/packs/default.css" />
<link rel="stylesheet" media="all" href="/packs/pl-dark-masto-fe.css" />
<script src="/packs/common.js"></script>
<script src="/packs/locale_en.js"></script>
<link as='script' crossorigin='anonymous' href='/packs/features/getting_started.js' rel='preload'>
<link as='script' crossorigin='anonymous' href='/packs/features/compose.js' rel='preload'>
<link as='script' crossorigin='anonymous' href='/packs/features/home_timeline.js' rel='preload'>
<link as='script' crossorigin='anonymous' href='/packs/features/notifications.js' rel='preload'>
<script id='initial-state' type='application/json'><%= raw @initial_state %></script>
<script src="/packs/application.js"></script>
</head>
<body class='app-body'>
<body class='app-body no-reduce-motion'>
<div class='app-holder' data-props='{&quot;locale&quot;:&quot;en&quot;}' id='mastodon'>
</div>
</body>

BIN
priv/static/packs/about.js Normal file

Binary file not shown.

Binary file not shown.

BIN
priv/static/packs/admin.js Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,42 +1,45 @@
CACHE MANIFEST
#ver:11/12/2017, 12:40:57 PM
#ver:2018-4-1 11:28:19
#plugin:4.8.4
CACHE:
/packs/features/compose-4617f6e912b5bfa71c43.js
/packs/modals/onboarding_modal-399f44a19ddd0ddc4e9c.js
/packs/features/public_timeline-d6e6bc704f49ebf922be.js
/packs/features/community_timeline-20bc8a94c08809c127d0.js
/packs/features/hashtag_timeline-3ed7e7bf18fd2fc04c9e.js
/packs/emoji_picker-9cf581d158c1cefc73c9.js
/packs/features/notifications-99d27ff7a90c7f701400.js
/packs/features/home_timeline-c146f32b0118845677ee.js
/packs/features/account_timeline-cad2550e777d3958eca4.js
/packs/features/pinned_statuses-fc56dd5916a37286e823.js
/packs/features/favourited_statuses-b15a9a6cc711cca1eb76.js
/packs/features/status-1f1807fdb4d1fd6daf40.js
/packs/features/following-9060b3726e6ad25f3621.js
/packs/features/followers-6716b8606f70dfa12ed7.js
/packs/features/account_gallery-b13924812f8dd47200c2.js
/packs/modals/report_modal-7a2950f40d4867b9cbb0.js
/packs/features/follow_requests-281e5b40331385149920.js
/packs/features/mutes-60c139f123f8d11ed903.js
/packs/features/blocks-e9605338ea941de78465.js
/packs/features/reblogs-e284a8647e830c151a40.js
/packs/features/favourites-083fedd11007764f7fad.js
/packs/features/getting_started-b65f1e917d66a972f2bf.js
/packs/features/generic_not_found-dc757b4cfe00489a06fb.js
/packs/modals/embed_modal-c776fd6a0ea581675783.js
/packs/status/media_gallery-7642f779bf4243e58b78.js
/packs/application-1b1f37dff2aac402336b.js
/packs/share-914b479bea45d0f6d4aa.js
/packs/about-d6275c885cd0e28a1186.js
/packs/public-88b87539fc95f07f2721.js
/packs/default-99ffdcf166b2dedef105.js
/packs/admin-1bab981afc4fd0d71402.js
/packs/common-1789b98651001ef10c0b.js
/packs/common-daadaac9454e7d14470e7954e3143dca.css
/packs/default-818c1287ac3c764905d81e549d5e0160.css
/packs/base_polyfills.js
/packs/extra_polyfills.js
/packs/features/compose.js
/packs/modals/onboarding_modal.js
/packs/emoji_picker.js
/packs/features/notifications.js
/packs/features/account_timeline.js
/packs/features/home_timeline.js
/packs/features/public_timeline.js
/packs/features/community_timeline.js
/packs/features/favourited_statuses.js
/packs/features/list_timeline.js
/packs/features/following.js
/packs/features/followers.js
/packs/features/hashtag_timeline.js
/packs/features/status.js
/packs/features/account_gallery.js
/packs/features/blocks.js
/packs/features/follow_requests.js
/packs/features/reblogs.js
/packs/features/favourites.js
/packs/features/getting_started.js
/packs/features/keyboard_shortcuts.js
/packs/features/generic_not_found.js
/packs/features/list_editor.js
/packs/status/media_gallery.js
/packs/share.js
/packs/application.js
/packs/about.js
/packs/public.js
/packs/mailer.js
/packs/default.js
/packs/admin.js
/packs/common.js
/packs/common.css
/packs/mailer.css
/packs/default.css
/packs/manifest.json
NETWORK:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","file":"common.css","sourceRoot":""}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","file":"default.css","sourceRoot":""}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.3 KiB

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