Fix Twitter/X consistency (#20918)
* Fix Twitter/X consistency * Adjust tests * Adjust test regex
This commit is contained in:
parent
c32663f8e9
commit
55701f4303
7 changed files with 18 additions and 9 deletions
|
|
@ -1,3 +1,7 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M22.162 5.656a8.385 8.385 0 0 1-2.402.658A4.196 4.196 0 0 0 21.6 4c-.82.488-1.719.83-2.656 1.015a4.182 4.182 0 0 0-7.126 3.814 11.874 11.874 0 0 1-8.62-4.37 4.168 4.168 0 0 0-.566 2.103c0 1.45.738 2.73 1.86 3.48a4.168 4.168 0 0 1-1.894-.522v.052a4.185 4.185 0 0 0 3.355 4.1 4.211 4.211 0 0 1-1.89.073A4.185 4.185 0 0 0 7.97 16.65a8.395 8.395 0 0 1-6.19 1.732 11.83 11.83 0 0 0 6.409 1.88c7.693 0 11.9-6.373 11.9-11.9 0-.18-.005-.362-.013-.54a8.497 8.497 0 0 0 2.087-2.165v-.001Z" fill="#1EA1F1"/>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
|
||||
<g id="surface1">
|
||||
<path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 12 0 C 18.628906 0 24 5.371094 24 12 C 24 18.628906 18.628906 24 12 24 C 5.371094 24 0 18.628906 0 12 C 0 5.371094 5.371094 0 12 0 Z M 12 0 "/>
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 14.9375 7.386719 L 16.5 7.386719 L 13.082031 11.292969 L 17.105469 16.613281 L 13.953125 16.613281 L 11.488281 13.386719 L 8.664062 16.613281 L 7.097656 16.613281 L 10.753906 12.433594 L 6.894531 7.386719 L 10.125 7.386719 L 12.355469 10.335938 Z M 14.386719 15.675781 L 15.253906 15.675781 L 9.652344 8.273438 L 8.722656 8.273438 Z M 14.386719 15.675781 "/>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 613 B After Width: | Height: | Size: 893 B |
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" style="padding-bottom:2px;">
|
||||
<g id="surface1">
|
||||
<path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 12 0 C 18.628906 0 24 5.371094 24 12 C 24 18.628906 18.628906 24 12 24 C 5.371094 24 0 18.628906 0 12 C 0 5.371094 5.371094 0 12 0 Z M 12 0 "/>
|
||||
<path style=" stroke:none;fill-rule:evenodd;fill-opacity:1;" d="M 12 0 C 18.628906 0 24 5.371094 24 12 C 24 18.628906 18.628906 24 12 24 C 5.371094 24 0 18.628906 0 12 C 0 5.371094 5.371094 0 12 0 Z M 12 0 "/>
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 14.9375 7.386719 L 16.5 7.386719 L 13.082031 11.292969 L 17.105469 16.613281 L 13.953125 16.613281 L 11.488281 13.386719 L 8.664062 16.613281 L 7.097656 16.613281 L 10.753906 12.433594 L 6.894531 7.386719 L 10.125 7.386719 L 12.355469 10.335938 Z M 14.386719 15.675781 L 15.253906 15.675781 L 9.652344 8.273438 L 8.722656 8.273438 Z M 14.386719 15.675781 "/>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 893 B After Width: | Height: | Size: 841 B |
|
|
@ -5,9 +5,9 @@
|
|||
--brand-apple-color: #fff;
|
||||
--brand-apple-bg-hover: #1b1b1b;
|
||||
|
||||
--brand-twitter-bg: #1da1f2;
|
||||
--brand-twitter-bg: #151616;
|
||||
--brand-twitter-color: #fff;
|
||||
--brand-twitter-bg-hover: #0096f2;
|
||||
--brand-twitter-bg-hover: #323436;
|
||||
|
||||
--brand-github-bg: #24292e;
|
||||
--brand-github-color: #fff;
|
||||
|
|
|
|||
|
|
@ -2,12 +2,17 @@ module Authentication
|
|||
module Providers
|
||||
# Twitter authentication provider, uses omniauth-twitter as backend
|
||||
class Twitter < Provider
|
||||
OFFICIAL_NAME = "Twitter (X)".freeze
|
||||
SETTINGS_URL = "https://twitter.com/settings/applications".freeze
|
||||
|
||||
def self.settings_url
|
||||
SETTINGS_URL
|
||||
end
|
||||
|
||||
def self.official_name
|
||||
OFFICIAL_NAME
|
||||
end
|
||||
|
||||
def self.sign_in_path(**kwargs)
|
||||
# see https://github.com/arunagw/omniauth-twitter#authentication-options
|
||||
mandatory_params = { secure_image_url: true }
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<% next if provider.provider_name == :apple %>
|
||||
<% unless @user.authenticated_through?(provider.provider_name) %>
|
||||
<%= form_with url: provider.sign_in_path(state: "profile", origin: URL.url("/settings")), class: "flex w-100", local: true do |f| %>
|
||||
<%= f.button type: :submit, class: "crayons-btn crayons-btn--icon-left crayons-btn--brand-#{provider.provider_name} m-1" do %>
|
||||
<%= f.button type: :submit, class: "crayons-btn crayons-btn--icon-left crayons-btn--brand-#{provider.provider_name} m-1 w-100" do %>
|
||||
<%= crayons_icon_tag(provider.provider_name, title: provider.official_name) %>
|
||||
<%= t("views.settings.account.connect", provider: provider.official_name) %>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ describe('Authentication Section', () => {
|
|||
cy.findByLabelText('Email enabled').should('not.be.visible');
|
||||
cy.findByLabelText('Facebook enabled').should('not.be.visible');
|
||||
cy.findByLabelText('GitHub enabled').should('not.be.visible');
|
||||
cy.findByLabelText('Twitter enabled').should('not.be.visible');
|
||||
cy.findByLabelText('Twitter (X) enabled').should('not.be.visible');
|
||||
|
||||
cy.signOutUser().then(() => {
|
||||
cy.findByRole('link', { name: 'Create account' }).click();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ RSpec.describe "Creator config edit", js: true do
|
|||
find("summary", text: "Authentication").click
|
||||
|
||||
Authentication::Providers.available_providers.each do |provider|
|
||||
element = find(".config-authentication__item--label", text: /#{provider.official_name}/i)
|
||||
element = find(".config-authentication__item--label", text: provider.official_name)
|
||||
expect(element).not_to be_nil
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue