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 class ManifestsController < EmptyController
def show def show
render json: {} #InstancePresenter.new, serializer: ManifestSerializer render json: InstancePresenter.new, serializer: ManifestSerializer
end end
end end

View File

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

View File

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

View File

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