Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix contributor tab css and icons #325

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 44 additions & 42 deletions lib/teiserver_web/live/account/profile/contributor.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,53 @@
}
</style>

<div class="row mt-2 mb-3">
<div class="col">
<h4>User flag</h4>
<%= if @show_flag_config do %>
You can enter any
<a href="https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes">
ISO Country code <Fontawesome.icon icon="arrow-up-right-from-square" style="regular" />
</a>
and even a few extra ones. <br /><br />
Your current country code is: "<span class="monospace"><%= @country_code %></span>".
<br /><br />
<div class="container card">
<div class="row mt-2 mb-3">
<div class="col">
<h4>User flag</h4>
<%= if @show_flag_config do %>
You can enter any
<a href="https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes">
ISO Country code <Fontawesome.icon icon="arrow-up-right-from-square" style="solid" />
</a>
and even a few extra ones. <br /><br />
Your current country code is: "<span class="monospace"><%= @country_code %></span>".
<br /><br />

<input
type="text"
name="country_code"
value={@temp_country_code}
class="form-control"
style="max-width: 150px;"
phx-keyup="set-temp_country_code"
/>
<input
type="text"
name="country_code"
value={@temp_country_code}
class="form-control"
style="max-width: 150px;"
phx-keyup="set-temp_country_code"
/>

<%= if @error_message do %>
<div class="text-danger">
<%= @error_message %>
<%= if @error_message do %>
<div class="text-danger">
<%= @error_message %>
</div>
<% end %>

<div :if={@temp_country_code && @country_code != @temp_country_code} class="pt-2">
<span class="btn btn-secondary" phx-click="revert-country_code">
<Fontawesome.icon icon="cancel" style="solid" size="2x" /><br />
Revert to <%= @country_code %>
</span>
&nbsp;&nbsp;&nbsp;
<span class="btn btn-secondary" phx-click="clear-country_code">
<Fontawesome.icon icon="arrow-rotate-left" style="solid" size="2x" /><br /> Clear
</span>
&nbsp;&nbsp;&nbsp;
<span class="btn btn-success" phx-click="save-country_code">
<Fontawesome.icon icon="check" style="solid" size="2x" /><br /> Save changes
</span>
</div>
<% else %>
You have currently set your profile to hide your flag and thus cannot select a custom one. To undo this please
<a href={~p"/account/settings"}>settings page</a>
to alter this.
<% end %>

<div :if={@temp_country_code && @country_code != @temp_country_code} class="pt-2">
<span class="btn btn-secondary" phx-click="revert-country_code">
<Fontawesome.icon icon="cancel" style="regular" size="2x" /><br />
Revert to <%= @country_code %>
</span>
&nbsp;&nbsp;&nbsp;
<span class="btn btn-secondary" phx-click="clear-country_code">
<Fontawesome.icon icon="arrow-rotate-left" style="regular" size="2x" /><br /> Clear
</span>
&nbsp;&nbsp;&nbsp;
<span class="btn btn-success" phx-click="save-country_code">
<Fontawesome.icon icon="check" style="solid" size="2x" /><br /> Save changes
</span>
</div>
<% else %>
You have currently set your profile to hide your flag and thus cannot select a custom one. To undo this please
<a href={~p"/account/settings"}>settings page</a>
to alter this.
<% end %>
</div>
</div>
</div>
Loading