fixes after rebase
This commit is contained in:
parent
f679486540
commit
b081080dd9
5 changed files with 5 additions and 5 deletions
|
@ -29,7 +29,7 @@ defmodule Pleroma.Web.Endpoint do
|
||||||
)
|
)
|
||||||
|
|
||||||
# Careful! No `only` restriction here, as we don't know what frontends contain.
|
# Careful! No `only` restriction here, as we don't know what frontends contain.
|
||||||
plug(Pleroma.Plugs.FrontendStatic,
|
plug(Pleroma.Web.Plugs.FrontendStatic,
|
||||||
at: "/",
|
at: "/",
|
||||||
frontend_type: :primary,
|
frontend_type: :primary,
|
||||||
gzip: true,
|
gzip: true,
|
||||||
|
@ -41,7 +41,7 @@ defmodule Pleroma.Web.Endpoint do
|
||||||
|
|
||||||
plug(Plug.Static.IndexHtml, at: "/pleroma/admin/")
|
plug(Plug.Static.IndexHtml, at: "/pleroma/admin/")
|
||||||
|
|
||||||
plug(Pleroma.Plugs.FrontendStatic,
|
plug(Pleroma.Web.Plugs.FrontendStatic,
|
||||||
at: "/pleroma/admin",
|
at: "/pleroma/admin",
|
||||||
frontend_type: :admin,
|
frontend_type: :admin,
|
||||||
gzip: true,
|
gzip: true,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Plugs.FrontendStatic do
|
defmodule Pleroma.Web.Plugs.FrontendStatic do
|
||||||
require Pleroma.Constants
|
require Pleroma.Constants
|
||||||
|
|
||||||
@moduledoc """
|
@moduledoc """
|
|
@ -16,7 +16,7 @@ defmodule Pleroma.Web.Plugs.InstanceStatic do
|
||||||
instance_path =
|
instance_path =
|
||||||
Path.join(Pleroma.Config.get([:instance, :static_dir], "instance/static/"), path)
|
Path.join(Pleroma.Config.get([:instance, :static_dir], "instance/static/"), path)
|
||||||
|
|
||||||
frontend_path = Pleroma.Plugs.FrontendStatic.file_path(path, :primary)
|
frontend_path = Pleroma.Web.Plugs.FrontendStatic.file_path(path, :primary)
|
||||||
|
|
||||||
(File.exists?(instance_path) && instance_path) ||
|
(File.exists?(instance_path) && instance_path) ||
|
||||||
(frontend_path && File.exists?(frontend_path) && frontend_path) ||
|
(frontend_path && File.exists?(frontend_path) && frontend_path) ||
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.FrontendTest do
|
defmodule Mix.Tasks.Pleroma.FrontendTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase
|
||||||
alias Mix.Tasks.Pleroma.Frontend
|
alias Mix.Tasks.Pleroma.Frontend
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue