Rename event
This commit is contained in:
@@ -11,10 +11,10 @@ module BridgeHelper
|
||||
}
|
||||
end
|
||||
|
||||
def bridged_share_button(description = nil)
|
||||
def bridged_share_url_button(description = nil)
|
||||
tag.button "Share", hidden: true, data: {
|
||||
controller: "bridge--share",
|
||||
action: "bridge--share#share",
|
||||
action: "bridge--share#shareUrl",
|
||||
bridge__overflow_menu_target: "item",
|
||||
bridge_title: "Share",
|
||||
bridge_share_description: description
|
||||
|
||||
@@ -3,9 +3,9 @@ import { BridgeComponent } from "@hotwired/hotwire-native-bridge"
|
||||
export default class extends BridgeComponent {
|
||||
static component = "share"
|
||||
|
||||
share() {
|
||||
shareUrl() {
|
||||
const description = this.bridgeElement.bridgeAttribute("share-description")
|
||||
this.send("share", {
|
||||
this.send("shareUrl", {
|
||||
title: document.title,
|
||||
url: window.location.href,
|
||||
description
|
||||
|
||||
@@ -31,4 +31,4 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= bridged_share_button(bridge_share_board_description(@board)) %>
|
||||
<%= bridged_share_url_button(bridge_share_board_description(@board)) %>
|
||||
|
||||
@@ -24,4 +24,4 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= bridged_share_button(bridge_share_card_description(@card)) %>
|
||||
<%= bridged_share_url_button(bridge_share_card_description(@card)) %>
|
||||
|
||||
Reference in New Issue
Block a user