mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-30 00:30:40 +00:00
Added e-mail edit field to settings, proper format default for webfinger
This commit is contained in:
parent
d5e086a47b
commit
2e0a38d07c
|
@ -1,4 +1,6 @@
|
||||||
class XrdController < ApplicationController
|
class XrdController < ApplicationController
|
||||||
|
before_action :set_default_format
|
||||||
|
|
||||||
def host_meta
|
def host_meta
|
||||||
@webfinger_template = "#{webfinger_url}?resource={uri}"
|
@webfinger_template = "#{webfinger_url}?resource={uri}"
|
||||||
|
|
||||||
|
@ -22,6 +24,10 @@ class XrdController < ApplicationController
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def set_default_format
|
||||||
|
request.format = 'json' if request.headers["HTTP_ACCEPT"].nil? && params[:format].nil?
|
||||||
|
end
|
||||||
|
|
||||||
def username_from_resource
|
def username_from_resource
|
||||||
if resource_param.start_with?('acct:') || resource_param.include?('@')
|
if resource_param.start_with?('acct:') || resource_param.include?('@')
|
||||||
resource_param.split('@').first.gsub('acct:', '')
|
resource_param.split('@').first.gsub('acct:', '')
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
|
= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
|
||||||
= devise_error_messages!
|
= devise_error_messages!
|
||||||
|
|
||||||
|
.field
|
||||||
|
= f.email_field :email, placeholder: 'E-mail address'
|
||||||
.field
|
.field
|
||||||
= f.password_field :password, autocomplete: "off", placeholder: 'New password'
|
= f.password_field :password, autocomplete: "off", placeholder: 'New password'
|
||||||
.field
|
.field
|
||||||
|
|
Loading…
Reference in a new issue