2019-11-13 05:49:37 +01:00
|
|
|
h1 Account Settings
|
|
|
|
|
|
|
|
p
|
|
|
|
' Looking for your content settings?
|
|
|
|
a<> href="/settings/edit" Click here!
|
|
|
|
|
|
|
|
p
|
2020-08-18 00:05:22 +02:00
|
|
|
' Looking for two factor authentication?
|
2024-04-29 02:55:27 +02:00
|
|
|
= link "Click here!", to: ~p"/registrations/totp/edit"
|
2019-11-13 05:49:37 +01:00
|
|
|
|
2019-12-07 17:26:45 +01:00
|
|
|
p
|
|
|
|
' Looking to change your avatar?
|
2024-04-29 02:55:27 +02:00
|
|
|
= link "Click here!", to: ~p"/avatar/edit"
|
2019-12-07 17:26:45 +01:00
|
|
|
|
2020-05-03 00:17:55 +02:00
|
|
|
= if can?(@conn, :change_username, @current_user) do
|
|
|
|
p
|
|
|
|
' Looking to change your username?
|
2024-04-29 02:55:27 +02:00
|
|
|
= link "Click here!", to: ~p"/registrations/name/edit"
|
2020-05-03 00:17:55 +02:00
|
|
|
|
2019-11-13 05:49:37 +01:00
|
|
|
h3 API Key
|
|
|
|
p
|
|
|
|
' Your API key is
|
2024-03-06 20:36:14 +01:00
|
|
|
#api-key-button>
|
|
|
|
code>
|
|
|
|
= link("Click to show", to: "#", data: [click_show: "#api-key", click_hide: "#api-key-button"])
|
|
|
|
#api-key.hidden>
|
|
|
|
code>
|
|
|
|
= @current_user.authentication_token
|
|
|
|
p You can use this to allow API consumers to access your account.
|
2019-11-15 16:32:26 +01:00
|
|
|
p
|
|
|
|
' Avoid sharing this key with others, as it could be used to compromise
|
|
|
|
' your account.
|
2019-11-13 05:49:37 +01:00
|
|
|
|
2020-07-28 22:56:26 +02:00
|
|
|
h3 Change email
|
2019-11-13 05:49:37 +01:00
|
|
|
|
2024-04-29 02:55:27 +02:00
|
|
|
= form_for @email_changeset, ~p"/registrations/email", [method: :post], fn f ->
|
2020-07-28 22:56:26 +02:00
|
|
|
= if @email_changeset.action do
|
2019-11-13 05:49:37 +01:00
|
|
|
.alert.alert-danger
|
|
|
|
p Oops, something went wrong! Please check the errors below.
|
|
|
|
|
|
|
|
.field
|
2020-11-28 02:14:26 +01:00
|
|
|
= email_input f, :email, class: "input", placeholder: "Email", required: true, pattern: ~S/[^\s]+@[^\s]+\.[^\s]+/
|
2019-11-13 05:49:37 +01:00
|
|
|
= error_tag f, :email
|
|
|
|
|
2020-07-28 22:56:26 +02:00
|
|
|
.field
|
|
|
|
= password_input f, :current_password, class: "input", required: true, name: "current_password", placeholder: "Current password"
|
|
|
|
= error_tag f, :current_password
|
|
|
|
|
|
|
|
div
|
|
|
|
= submit "Change email", class: "button"
|
|
|
|
|
|
|
|
h3 Change password
|
|
|
|
|
2024-04-29 02:55:27 +02:00
|
|
|
= form_for @password_changeset, ~p"/registrations/password", fn f ->
|
2020-07-28 22:56:26 +02:00
|
|
|
= if @password_changeset.action do
|
|
|
|
.alert.alert-danger
|
|
|
|
p Oops, something went wrong! Please check the errors below.
|
|
|
|
|
2019-11-13 05:49:37 +01:00
|
|
|
.field
|
2021-02-26 06:47:45 +01:00
|
|
|
= password_input f, :password, class: "input", placeholder: "New password", minlength: 12
|
2019-11-13 05:49:37 +01:00
|
|
|
= error_tag f, :password
|
|
|
|
|
|
|
|
.field
|
2021-02-26 06:47:45 +01:00
|
|
|
= password_input f, :password_confirmation, class: "input", placeholder: "Confirm new password", minlength: 12
|
2020-01-27 00:09:37 +01:00
|
|
|
= error_tag f, :password_confirmation
|
2019-11-13 05:49:37 +01:00
|
|
|
|
2020-07-28 22:56:26 +02:00
|
|
|
.field
|
|
|
|
= password_input f, :current_password, name: "current_password", class: "input", placeholder: "Current password"
|
|
|
|
= error_tag f, :current_password
|
2019-11-13 05:49:37 +01:00
|
|
|
|
2020-07-28 22:56:26 +02:00
|
|
|
= submit "Change password", class: "button"
|