diff --git a/app/assets/images/twitter-icon.svg b/app/assets/images/twitter-icon.svg index 886cdf543..87e36ea6c 100644 --- a/app/assets/images/twitter-icon.svg +++ b/app/assets/images/twitter-icon.svg @@ -1,3 +1,7 @@ - - + + + + + + diff --git a/app/assets/images/twitter.svg b/app/assets/images/twitter.svg index 87e36ea6c..8077b8f5a 100644 --- a/app/assets/images/twitter.svg +++ b/app/assets/images/twitter.svg @@ -1,7 +1,7 @@ - + - + diff --git a/app/assets/stylesheets/components/buttons.scss b/app/assets/stylesheets/components/buttons.scss index 76a27b7d7..3914befba 100644 --- a/app/assets/stylesheets/components/buttons.scss +++ b/app/assets/stylesheets/components/buttons.scss @@ -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; diff --git a/app/services/authentication/providers/twitter.rb b/app/services/authentication/providers/twitter.rb index dd13e3944..2fd6b99bd 100644 --- a/app/services/authentication/providers/twitter.rb +++ b/app/services/authentication/providers/twitter.rb @@ -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 } diff --git a/app/views/users/_additional_authentication.html.erb b/app/views/users/_additional_authentication.html.erb index e4b2192d3..7bbae3b80 100644 --- a/app/views/users/_additional_authentication.html.erb +++ b/app/views/users/_additional_authentication.html.erb @@ -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 %> diff --git a/cypress/e2e/seededFlows/adminFlows/config/authenticationSection.spec.js b/cypress/e2e/seededFlows/adminFlows/config/authenticationSection.spec.js index eabc69c6c..1190ddef3 100644 --- a/cypress/e2e/seededFlows/adminFlows/config/authenticationSection.spec.js +++ b/cypress/e2e/seededFlows/adminFlows/config/authenticationSection.spec.js @@ -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(); diff --git a/spec/system/authentication/creator_config_edit_spec.rb b/spec/system/authentication/creator_config_edit_spec.rb index 37b241ed5..8ccc7e91b 100644 --- a/spec/system/authentication/creator_config_edit_spec.rb +++ b/spec/system/authentication/creator_config_edit_spec.rb @@ -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