From 5982d570de8cbbb1a4812f9c96dd108d5b84f675 Mon Sep 17 00:00:00 2001 From: unarist Date: Fri, 17 Nov 2017 23:18:20 +0900 Subject: [PATCH 1/4] Move "Permissions" row into main table in /admin/accounts/:id (#5734) --- app/views/admin/accounts/show.html.haml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml index f495948281..ddb1cf15d9 100644 --- a/app/views/admin/accounts/show.html.haml +++ b/app/views/admin/accounts/show.html.haml @@ -15,6 +15,12 @@ %td= @account.display_name - 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 @@ -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') From eaf6f947737ee10b1a4555b2515e44aecc1d2531 Mon Sep 17 00:00:00 2001 From: Alex Coto Date: Fri, 17 Nov 2017 12:21:05 -0500 Subject: [PATCH 2/4] Change libinconv download URL to HTTPS (#5738) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c3b38fa8b1..f9354ac465 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,7 +48,7 @@ RUN apk -U upgrade \ && rm yarn.tar.gz \ && mv /tmp/src/yarn-v$YARN_VERSION /opt/yarn \ && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \ - && wget -O libiconv.tar.gz "http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$LIBICONV_VERSION.tar.gz" \ + && wget -O libiconv.tar.gz "https://ftp.gnu.org/pub/gnu/libiconv/libiconv-$LIBICONV_VERSION.tar.gz" \ && echo "$LIBICONV_DOWNLOAD_SHA256 *libiconv.tar.gz" | sha256sum -c - \ && tar -xzf libiconv.tar.gz -C /tmp/src \ && rm libiconv.tar.gz \ From 6547ebee48d3d0129fc95794cdb0faf9535c4ac6 Mon Sep 17 00:00:00 2001 From: Clworld Date: Sat, 18 Nov 2017 02:22:31 +0900 Subject: [PATCH 3/4] Fix regression #5467: fixes emoji copy (#5739) --- app/controllers/admin/custom_emojis_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin/custom_emojis_controller.rb b/app/controllers/admin/custom_emojis_controller.rb index 693d28b1f5..509f7a48f7 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') From 731c85909729a95dc3dfb5b48344694063dc608f Mon Sep 17 00:00:00 2001 From: Lynx Kotoura Date: Sat, 18 Nov 2017 03:59:53 +0900 Subject: [PATCH 4/4] Increase contrast of Admin badges (#5740) To comply WCAG 2.0 guidelines on contrast ratio. --- app/javascript/styles/mastodon/accounts.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/styles/mastodon/accounts.scss b/app/javascript/styles/mastodon/accounts.scss index ca55de28de..23e20a3668 100644 --- a/app/javascript/styles/mastodon/accounts.scss +++ b/app/javascript/styles/mastodon/accounts.scss @@ -542,8 +542,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); } }