Open RS apps in new tab
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
dbbf116c52
commit
c43e43d89c
@ -1,4 +1,4 @@
|
||||
<%= link_to @href, class: @class, data: {
|
||||
<%= link_to @href, class: @class, target: @target, data: {
|
||||
'dropdown-target': "menuItem",
|
||||
'action': "keydown.up->dropdown#previousItem:prevent keydown.down->dropdown#nextItem:prevent"
|
||||
} do %>
|
||||
|
@ -1,8 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DropdownLinkComponent < ViewComponent::Base
|
||||
def initialize(href:, separator: false, add_class: nil)
|
||||
def initialize(href:, open_in_new_tab: false, separator: false, add_class: nil)
|
||||
@href = href
|
||||
@target = open_in_new_tab ? "_blank" : nil
|
||||
@class = class_str(separator, add_class)
|
||||
end
|
||||
|
||||
|
@ -12,7 +12,8 @@
|
||||
</div>
|
||||
<%= render DropdownComponent.new do %>
|
||||
<%= render DropdownLinkComponent.new(
|
||||
href: launch_app_services_storage_rs_auth_url(@auth)
|
||||
href: launch_app_services_storage_rs_auth_url(@auth),
|
||||
open_in_new_tab: true
|
||||
) do %>
|
||||
Launch app
|
||||
<% end %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user