<% url = join_url(Current.account.join_code) %>
<%= tag.button class: "btn", data: { action: "dialog#open" } do %> <%= image_tag "qr-code.svg", aria: { hidden: "true" }, size: 24, class: "colorize--black" %> Show join link QR code <% end %> <%= qr_code_image(url) %>
<%= button_to_copy_to_clipboard(url) do %> <%= image_tag "copy-paste.svg", aria: { hidden: "true" }, size: 24, class: "colorize--black" %> Copy join link <% end %> <%= web_share_button(url, "Link to join Writebook", "Hit this link to join me in Writebook and start writing.") do %> <%= image_tag "share.svg", aria: { hidden: "true" }, size: 24, class: "colorize--black" %> Share join link <% end %> <% if Current.user.can_administer? %> <%= button_to account_join_code_path, class: "btn btn--regenerate" do %> <%= image_tag "refresh.svg", aria: { hidden: "true" }, size: 24, class: "colorize--black" %> Regenerate join link <% end %> <% end %>