mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +01:00
ignore explicit activity routing
This commit is contained in:
parent
62143a3910
commit
f56ce27780
2 changed files with 2 additions and 7 deletions
|
@ -117,7 +117,7 @@ defmodule PhilomenaWeb.ActivityController do
|
||||||
topics: topics,
|
topics: topics,
|
||||||
interactions: interactions,
|
interactions: interactions,
|
||||||
layout_class: "layout--wide",
|
layout_class: "layout--wide",
|
||||||
show_sidebar: show_sidebar?(user) || !index_page?(conn)
|
show_sidebar: show_sidebar?(user)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -167,11 +167,6 @@ defmodule PhilomenaWeb.ActivityController do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp index_page?(%{assigns: %{index: true}}), do: true
|
|
||||||
|
|
||||||
defp index_page?(_conn), do: false
|
|
||||||
|
|
||||||
defp show_sidebar?(%{show_sidebar_and_watched_images: false}), do: false
|
defp show_sidebar?(%{show_sidebar_and_watched_images: false}), do: false
|
||||||
|
|
||||||
defp show_sidebar?(_user), do: true
|
defp show_sidebar?(_user), do: true
|
||||||
end
|
end
|
||||||
|
|
|
@ -418,7 +418,7 @@ defmodule PhilomenaWeb.Router do
|
||||||
scope "/", PhilomenaWeb do
|
scope "/", PhilomenaWeb do
|
||||||
pipe_through [:browser, :ensure_totp, :ensure_tor_authorized]
|
pipe_through [:browser, :ensure_totp, :ensure_tor_authorized]
|
||||||
|
|
||||||
get "/", ActivityController, :index, assigns: %{index: true}
|
get "/", ActivityController, :index
|
||||||
|
|
||||||
resources "/activity", ActivityController, only: [:index]
|
resources "/activity", ActivityController, only: [:index]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue