-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade deps and cleanup unused pages (#1)
- Loading branch information
Showing
21 changed files
with
1,343 additions
and
2,086 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file | ||
# | ||
# To ban all spiders from the entire site uncomment the next two lines: | ||
# User-agent: * | ||
# Disallow: / | ||
User-agent: * | ||
Disallow: / |
Large diffs are not rendered by default.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
apps/toniefy/lib/toniex_web/controllers/page_controller.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,3 @@ | ||
defmodule ToniexWeb.PageController do | ||
use ToniexWeb, :controller | ||
|
||
def privacy(conn, _params) do | ||
render(conn, "privacy.html") | ||
end | ||
|
||
def donate(conn, _params) do | ||
render(conn, "donate.html") | ||
end | ||
|
||
def donate_success(conn, _params) do | ||
render(conn, "donate_success.html") | ||
end | ||
end |
44 changes: 0 additions & 44 deletions
44
apps/toniefy/lib/toniex_web/controllers/user_registration_controller.ex
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
defmodule ToniexWeb.LiveAuth do | ||
import Phoenix.LiveView | ||
|
||
alias Toniex.Accounts | ||
|
||
def on_mount(:default, _params, session, socket) do | ||
{:cont, fetch_current_user(socket, session)} | ||
end | ||
|
||
def on_mount(:require_authenticated_user, _params, session, socket) do | ||
socket = fetch_current_user(socket, session) | ||
|
||
if socket.assigns.current_user do | ||
{:cont, socket} | ||
else | ||
{:halt, socket} | ||
end | ||
end | ||
|
||
defp fetch_current_user(socket, session) do | ||
if user_token = session["user_token"] do | ||
assign_new(socket, :current_user, fn -> | ||
Accounts.get_user_by_session_token(user_token) | ||
end) | ||
else | ||
assign(socket, current_user: nil) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
<div class="space-x-8"> | ||
<%= if @current_user do %> | ||
<%= live_patch "Meine Bibliothek", to: Routes.library_index_path(@conn, :index), class: active_class(@conn.request_path, Routes.library_index_path(@conn, :index), "header__nav-link", "header__nav-link--active") %> | ||
<%= link "Henris Spardose", to: Routes.page_path(@conn, :donate), class: active_class(@conn.request_path, Routes.page_path(@conn, :donate), "header__nav-link", "header__nav-link--active") %> | ||
<%= link "Einstellungen", to: Routes.user_settings_path(@conn, :edit), class: active_class(@conn.request_path, Routes.user_settings_path(@conn, :edit), "header__nav-link", "header__nav-link--active") %> | ||
<%= link "Logout", to: Routes.user_session_path(@conn, :delete), method: :delete, class: "header__nav-link" %> | ||
<% else %> | ||
|
@@ -20,7 +19,5 @@ | |
<%= @inner_content %> | ||
</main> | ||
<footer class="flex justify-center sm:justify-end items-end px-4 py-6 mt-8 mx-auto space-x-6 max-w-screen-md"> | ||
<p class="text-sm"><%= link "Datenschutz", to: Routes.page_path(@conn, :privacy), class: "footer__link" %></p> | ||
<p class="text-sm"><%= link "Kontakt", to: "mailto:[email protected]?subject=Toniefy Kontakt", class: "footer__link" %></p> | ||
<p class="font-semibold text-sm text-gray-400">toniefy <span class="text-primary-main">|</span> 2021</p> | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
<div class="space-x-8"> | ||
<%= if @current_user do %> | ||
<%= live_patch "Meine Bibliothek", to: Routes.library_index_path(@socket, :index), class: active_class(@uri.path, Routes.library_index_path(@socket, :index), "header__nav-link", "header__nav-link--active") %> | ||
<%= link "Henris Spardose", to: Routes.page_path(@socket, :donate), class: active_class(@uri.path, Routes.page_path(@socket, :donate), "header__nav-link", "header__nav-link--active") %> | ||
<%= link "Einstellungen", to: Routes.user_settings_path(@socket, :edit), class: "header__nav-link" %> | ||
<%= link "Logout", to: Routes.user_session_path(@socket, :delete), method: :delete, class: "header__nav-link" %> | ||
<% else %> | ||
|
@@ -20,7 +19,5 @@ | |
<%= @inner_content %> | ||
</main> | ||
<footer class="flex justify-center sm:justify-end items-end px-4 py-6 mt-8 mx-auto space-x-6 max-w-screen-md"> | ||
<p class="text-sm"><%= link "Datenschutz", to: Routes.page_path(@socket, :privacy), class: "footer__link" %></p> | ||
<p class="text-sm"><%= link "Kontakt", to: "mailto:[email protected]?subject=Toniefy Kontakt", class: "footer__link" %></p> | ||
<p class="font-semibold text-sm text-gray-400">toniefy <span class="text-primary-main">|</span> 2021</p> | ||
</footer> |
Oops, something went wrong.