-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #831 from eyra/link-panl-integration
Link panl integration
- Loading branch information
Showing
731 changed files
with
12,035 additions
and
41,452 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,3 +51,4 @@ logfile | |
/mix_home/ | ||
/core/config/dev.secret.exs | ||
/core/docker.env | ||
/core/playground.exs |
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 |
---|---|---|
@@ -1,12 +1,5 @@ | ||
[ | ||
# https://github.com/phoenixframework/phoenix/issues/5437, fixed in Phoenix 1.7.3 or higher | ||
{"systems/benchmark/export_controller.ex", :no_return}, | ||
{"systems/benchmark/export_controller.ex", :call}, | ||
# issue with HTTPPoison not supporting HTTP method :mkcol | ||
{"systems/storage/yoda/client.ex", :no_return}, | ||
{"systems/storage/yoda/client.ex", :call}, | ||
# Deprecated fiunction raises exception | ||
{"systems/assignment/_director.ex", :no_return}, | ||
{"systems/assignment/_private.ex", :no_return}, | ||
{"systems/campaign/builders/promotion_landing_page.ex", :no_return} | ||
{"systems/benchmark/export_controller.ex", :call} | ||
] |
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
defmodule Next.Account.CreatorSigninView do | ||
use CoreWeb, :live_component | ||
|
||
import Frameworks.Pixel.Line | ||
import Systems.Account.UserForm | ||
alias Systems.Account.User | ||
|
||
@impl true | ||
def update(%{blocks: blocks, email: email}, socket) do | ||
{ | ||
:ok, | ||
socket | ||
|> assign(blocks: blocks, email: email) | ||
|> update_password_form() | ||
} | ||
end | ||
|
||
defp update_password_form(%{assigns: %{email: email}} = socket) do | ||
attrs = | ||
if User.valid_email?(email) do | ||
%{"email" => email} | ||
else | ||
%{} | ||
end | ||
|
||
assign(socket, :password_form, to_form(attrs)) | ||
end | ||
|
||
@impl true | ||
def render(assigns) do | ||
~H""" | ||
<div> | ||
<%= for block <- @blocks do %> | ||
<%= if block == :surfconext do %> | ||
<Text.body_small><%= raw(dgettext("eyra-next", "surfconext.signin.body")) %></Text.body_small> | ||
<.spacing value="XS" /> | ||
<.surfconext_signin /> | ||
<% end %> | ||
<%= if block == :password do %> | ||
<.password_signin for={@password_form} user_type={:creator}/> | ||
<% end %> | ||
<%= if block == :seperator do %> | ||
<.spacing value="S" /> | ||
<.line /> | ||
<.spacing value="M" /> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
""" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
defmodule Next.Account.ParticipantSigninView do | ||
use CoreWeb, :live_component | ||
|
||
import Frameworks.Pixel.Line | ||
import Systems.Account.UserForm | ||
|
||
alias Systems.Account.User | ||
|
||
@impl true | ||
def update(%{blocks: blocks, email: email}, socket) do | ||
{ | ||
:ok, | ||
socket | ||
|> assign(email: email, blocks: blocks) | ||
|> update_password_form() | ||
} | ||
end | ||
|
||
defp update_password_form(%{assigns: %{email: email}} = socket) do | ||
attrs = | ||
if User.valid_email?(email) do | ||
%{"email" => email} | ||
else | ||
%{} | ||
end | ||
|
||
assign(socket, :password_form, to_form(attrs)) | ||
end | ||
|
||
@impl true | ||
def render(assigns) do | ||
~H""" | ||
<div> | ||
<%= for block <- @blocks do %> | ||
<%= if block == :google do %> | ||
<.google_signin /> | ||
<% end %> | ||
<%= if block == :password do %> | ||
<.password_signin for={@password_form} user_type={:participant}/> | ||
<% end %> | ||
<%= if block == :seperator do %> | ||
<.spacing value="S" /> | ||
<.line /> | ||
<.spacing value="M" /> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
""" | ||
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 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,58 @@ | ||
defmodule Next.Account.SigninPage do | ||
use CoreWeb, :live_view | ||
import CoreWeb.Layouts.Stripped.Html | ||
import CoreWeb.Layouts.Stripped.Composer | ||
import Frameworks.Pixel.Line | ||
|
||
alias Frameworks.Pixel.Tabbar | ||
|
||
alias Next.Account.SigninPageBuilder | ||
|
||
@impl true | ||
def mount(params, _session, socket) do | ||
user_type = Map.get(params, "user_type", "participant") | ||
initial_tab = Map.get(params, "tab", user_type) | ||
tabbar_id = "account_signin" | ||
|
||
{ | ||
:ok, | ||
socket | ||
|> assign( | ||
email: Map.get(params, "email"), | ||
user_type: user_type, | ||
initial_tab: initial_tab, | ||
tabbar_id: tabbar_id, | ||
show_errors: true | ||
) | ||
|> update_view_model() | ||
|> update_menus() | ||
} | ||
end | ||
|
||
defp update_view_model(socket) do | ||
vm = SigninPageBuilder.view_model(nil, socket.assigns) | ||
assign(socket, vm: vm) | ||
end | ||
|
||
@impl true | ||
def render(assigns) do | ||
~H""" | ||
<.stripped menus={@menus}> | ||
<div id="signup_content" phx-hook="LiveContent" data-show-errors={true}> | ||
<Area.form> | ||
<Margin.y id={:page_top} /> | ||
<Margin.y id={:page_top} /> | ||
<Text.title2><%= dgettext("eyra-account", "signin.title") %></Text.title2> | ||
<Tabbar.container id={@tabbar_id} tabs={@vm.tabs} initial_tab={@initial_tab} type={:segmented} size={:full} /> | ||
<.spacing value="M" /> | ||
<.line /> | ||
<.spacing value="M" /> | ||
<div id="tabbar_content" phx-hook="LiveContent" data-show-errors={@show_errors}> | ||
<Tabbar.content include_top_margin={false} tabs={@vm.tabs} /> | ||
</div> | ||
</Area.form> | ||
</div> | ||
</.stripped> | ||
""" | ||
end | ||
end |
Oops, something went wrong.