Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
add discord under social links (#12914)
Devin Zhang608d64f39916
diff --git a/core/app/models/concerns/spree/stores/socials.rb b/core/app/models/concerns/spree/stores/socials.rbindex 5321b4b3a8..d4c232e5cb 100644--- a/core/app/models/concerns/spree/stores/socials.rb+++ b/core/app/models/concerns/spree/stores/socials.rb@@ -3,7 +3,7 @@ module Spreemodule Socialsextend ActiveSupport::Concern- SUPPORTED_SOCIAL_NETWORKS = %w[instagram facebook twitter pinterest tiktok youtube spotify].freeze+ SUPPORTED_SOCIAL_NETWORKS = %w[instagram facebook twitter pinterest tiktok youtube spotify discord].freezeSOCIAL_NETWORKS_CONFIG = {twitter: {@@ -33,6 +33,10 @@ module Spreespotify: {input_placeholder: 'https://open.spotify.com/user/your_handle',profile_link: 'https://open.spotify.com/user/your_handle'+ },+ discord: {+ input_placeholder: 'https://discord.com/invite/your_handle',+ profile_link: 'https://discord.com/invite/your_handle'}}.freeze@@ -61,7 +65,7 @@ module Spreeenddef social_links- @social_links ||= [instagram_link, facebook_link, twitter_link, pinterest_link, youtube_link, tiktok_link, spotify_link].compact_blank+ @social_links ||= [instagram_link, facebook_link, twitter_link, pinterest_link, youtube_link, tiktok_link, spotify_link, discord_link].compact_blankendendenddiff --git a/storefront/app/views/themes/default/spree/shared/icons/_discord.html.erb b/storefront/app/views/themes/default/spree/shared/icons/_discord.html.erbnew file mode 100644index 0000000000..b718832be6--- /dev/null+++ b/storefront/app/views/themes/default/spree/shared/icons/_discord.html.erb@@ -0,0 +1,9 @@+<svg+ xmlns='http://www.w3.org/2000/svg'+ width='16'+ height='16'+ viewBox='0 0 16 16'+ fill='currentColor'+>+ <path d="M18.942 5.556a16.299 16.299 0 0 0-4.126-1.297c-.178.321-.385.754-.529 1.097a15.175 15.175 0 0 0-4.573 0 11.583 11.583 0 0 0-.535-1.097 16.274 16.274 0 0 0-4.129 1.3c-2.611 3.946-3.319 7.794-2.965 11.587a16.494 16.494 0 0 0 5.061 2.593 12.65 12.65 0 0 0 1.084-1.785 10.689 10.689 0 0 1-1.707-.831c.143-.106.283-.217.418-.331 3.291 1.539 6.866 1.539 10.118 0 .137.114.277.225.418.331-.541.326-1.114.606-1.71.832a12.52 12.52 0 0 0 1.084 1.785 16.46 16.46 0 0 0 5.064-2.595c.415-4.396-.709-8.209-2.973-11.589zM8.678 14.813c-.988 0-1.798-.922-1.798-2.045s.793-2.047 1.798-2.047 1.815.922 1.798 2.047c.001 1.123-.793 2.045-1.798 2.045zm6.644 0c-.988 0-1.798-.922-1.798-2.045s.793-2.047 1.798-2.047 1.815.922 1.798 2.047c0 1.123-.793 2.045-1.798 2.045z"/>+</svg>