This commit is contained in:
mgabdev 2020-12-22 12:49:40 -05:00
parent 34f6a1ab5b
commit 06de0c88f3
4 changed files with 9 additions and 9 deletions

View File

@ -3,7 +3,7 @@
class ManifestsController < EmptyController
def show
render json: {} #InstancePresenter.new, serializer: ManifestSerializer
render json: InstancePresenter.new, serializer: ManifestSerializer
end
end

View File

@ -8,7 +8,7 @@ class MediaProxyController < ApplicationController
def show
RedisLock.acquire(lock_options) do |lock|
if lock.acquired?
@media_attachment = MediaAttachment.remote.find(params[:id])
@media_attachment = MediaAttachment.find(params[:id])
redownload! if @media_attachment.needs_redownload? && !reject_media?
else
raise GabSocial::RaceConditionError
@ -29,6 +29,8 @@ class MediaProxyController < ApplicationController
def version
if request.path.ends_with?('/small')
:small
elsif request.path.ends_with?('/playable')
:playable
else
:original
end

View File

@ -17,10 +17,7 @@ class Settings::ProfilesController < Settings::BaseController
def update
# if verified and display_name is different, return flash error and redirect back
if @account.is_verified && params[:account][:display_name] && @account.display_name != params[:account][:display_name]
flash[:alert] = 'Unable to change Display name for verified account'
redirect_to settings_profile_path
elsif !@account.is_pro && params[:account][:username] && @account.username != params[:account][:username]
if !@account.is_pro && params[:account][:username] && @account.username != params[:account][:username]
flash[:alert] = 'Unable to change username for your account. You are not GabPRO'
redirect_to settings_profile_path
else

View File

@ -6,15 +6,16 @@
.fields-row
.fields-row__column.fields-group.fields-row__column-6
- if @account.is_pro
= f.input :username, wrapper: :with_label, input_html: { maxlength: 30 }, hint: false
- if @account.is_verified
%div
%span Verified accounts cannot change their username or display name. Please contact
%span Verified accounts cannot change their display name. Please contact
%a{:href => "https://gab.com/help", :style => "color:#3ACD80;text-decoration:none;outline:0;", :target => "_blank"} @help
%span for more information.
%br
%br
- elsif @account.is_pro
= f.input :username, wrapper: :with_label, input_html: { maxlength: 30 }, hint: false
- else
= f.input :display_name, wrapper: :with_label, input_html: { maxlength: 30 }, hint: false
= f.input :note, wrapper: :with_label, input_html: { maxlength: 500 }, hint: false