diff options
author | Jenkins <jenkins@jenkins.ninjawedding.org> | 2017-11-17 20:17:12 +0000 |
---|---|---|
committer | Jenkins <jenkins@jenkins.ninjawedding.org> | 2017-11-17 20:17:12 +0000 |
commit | 94c5a11cdaebee605f379f66ab57306523b5f148 (patch) | |
tree | ff74cb98b87270b709dd8d67759a068933b1e475 /app | |
parent | 45f18b8f494153fd63871d60782da992e847ec16 (diff) | |
parent | 4a2fc2d444a80050ad9ba5e83aa5e69d3148ab95 (diff) |
Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/admin/custom_emojis_controller.rb | 5 | ||||
-rw-r--r-- | app/javascript/styles/mastodon/accounts.scss | 6 | ||||
-rw-r--r-- | app/views/admin/accounts/show.html.haml | 20 |
3 files changed, 12 insertions, 19 deletions
diff --git a/app/controllers/admin/custom_emojis_controller.rb b/app/controllers/admin/custom_emojis_controller.rb index 693d28b1f..509f7a48f 100644 --- a/app/controllers/admin/custom_emojis_controller.rb +++ b/app/controllers/admin/custom_emojis_controller.rb @@ -45,9 +45,10 @@ module Admin def copy authorize @custom_emoji, :copy? - emoji = CustomEmoji.find_or_create_by(domain: nil, shortcode: @custom_emoji.shortcode) + emoji = CustomEmoji.find_or_initialize_by(domain: nil, shortcode: @custom_emoji.shortcode) + emoji.image = @custom_emoji.image - if emoji.update(image: @custom_emoji.image) + if emoji.save flash[:notice] = I18n.t('admin.custom_emojis.copied_msg') else flash[:alert] = I18n.t('admin.custom_emojis.copy_failed_msg') diff --git a/app/javascript/styles/mastodon/accounts.scss b/app/javascript/styles/mastodon/accounts.scss index 24a55c7bc..2cf98c642 100644 --- a/app/javascript/styles/mastodon/accounts.scss +++ b/app/javascript/styles/mastodon/accounts.scss @@ -582,8 +582,8 @@ } &.admin { - color: $error-red; - background-color: rgba($error-red, 0.1); - border-color: rgba($error-red, 0.5); + color: lighten($error-red, 12%); + background-color: rgba(lighten($error-red, 12%), 0.1); + border-color: rgba(lighten($error-red, 12%), 0.5); } } diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml index f49594828..ddb1cf15d 100644 --- a/app/views/admin/accounts/show.html.haml +++ b/app/views/admin/accounts/show.html.haml @@ -16,6 +16,12 @@ - if @account.local? %tr + %th= t('admin.accounts.role') + %td + = t("admin.accounts.roles.#{@account.user&.role}") + = table_link_to 'angle-double-up', t('admin.accounts.promote'), promote_admin_account_role_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') } if can?(:promote, @account.user) + = table_link_to 'angle-double-down', t('admin.accounts.demote'), demote_admin_account_role_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') } if can?(:demote, @account.user) + %tr %th= t('admin.accounts.email') %td = @account.user_email @@ -145,20 +151,6 @@ %th= t('admin.accounts.followers_url') %td= link_to @account.followers_url, @account.followers_url -- else - %hr - - .table-wrapper - %table.table - %tbody - %tr - %th= t('admin.accounts.role') - %td - = t("admin.accounts.roles.#{@account.user&.role}") - %td< - = table_link_to 'angle-double-up', t('admin.accounts.promote'), promote_admin_account_role_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') } if can?(:promote, @account.user) - = table_link_to 'angle-double-down', t('admin.accounts.demote'), demote_admin_account_role_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') } if can?(:demote, @account.user) - %hr %h3= t('admin.accounts.moderation_notes') |