From: Andy Allan Date: Wed, 18 Dec 2024 15:06:18 +0000 (+0000) Subject: Merge pull request #5411 from tomhughes/bluesky-sharing X-Git-Tag: live~345 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/a012c5ecee85949f0a84093c7edfdd90d192768f?ds=sidebyside;hp=-c Merge pull request #5411 from tomhughes/bluesky-sharing Add Bluesky to social sharing buttons --- a012c5ecee85949f0a84093c7edfdd90d192768f diff --combined lib/social_share_button_helper.rb index 2e822ecb8,b45c7933a..9dac9a6c8 --- a/lib/social_share_button_helper.rb +++ b/lib/social_share_button_helper.rb @@@ -3,6 -3,7 +3,7 @@@ module SocialShareButtonHelpe SOCIAL_SHARE_CONFIG = { :email => "social_icons/email.svg", + :bluesky => "social_icons/bluesky.svg", :facebook => "social_icons/facebook.svg", :linkedin => "social_icons/linkedin.svg", :mastodon => "social_icons/mastodon.svg", @@@ -39,11 -40,13 +40,13 @@@ when :linkedin "https://www.linkedin.com/sharing/share-offsite/?url=#{URI.encode_www_form_component(params[:url])}" when :facebook - "https://www.facebook.com/sharer/sharer.php?u=#{URI.encode_www_form_component('params[:url]')}&t=#{URI.encode_www_form_component(params[:title])}" + "https://www.facebook.com/sharer/sharer.php?u=#{URI.encode_www_form_component(params[:url])}&t=#{URI.encode_www_form_component(params[:title])}" when :mastodon "https://mastodonshare.com/?text=#{URI.encode_www_form_component(params[:title])}&url=#{URI.encode_www_form_component(params[:url])}" when :telegram "https://t.me/share/url?url=#{URI.encode_www_form_component(params[:url])}&text=#{URI.encode_www_form_component(params[:title])}" + when :bluesky + "https://bsky.app/intent/compose?text=#{URI.encode_www_form_component(params[:title])}+#{URI.encode_www_form_component(params[:url])}" else raise ArgumentError, "Unsupported platform: #{platform}" end