|
58 | 58 | = t('users.show.api_documentation') |
59 | 59 | = render partial: "shared/svgs/external_link_icon" |
60 | 60 | .account-page-card{'data-controller': 'reveal-component'} |
61 | | - .account-page-card-container |
62 | | - .account-page-card-sub-container |
63 | | - %h4.account-page-card-title= t('users.show.external_tools') |
64 | | - %p.account-page-card-desc= t('users.show.external_tools_description') |
65 | | - - external_tools_list.each do |tool| |
66 | | - - saved_key = user_external_tool_apikey(@user, tool[:name]) |
67 | | - .account-page-subscription |
68 | | - %a{'data-action': 'click->reveal-component#toggle', 'data-id': "external_tool_form_#{tool[:name]}", style: 'cursor: pointer;'} |
69 | | - = tool[:label] |
70 | | - %div |
71 | | - - if saved_key.present? |
72 | | - = render ChipButtonComponent.new(text: t('users.show.external_tool_connected'), type: 'static') |
73 | | - .d-none{id: "external_tool_form_#{tool[:name]}"} |
74 | | - = form_tag user_external_tools_path(url_encode(@user.username)) do |
75 | | - = hidden_field_tag 'user[tool_name]', tool[:name] |
76 | | - = text_field_tag 'user[apikey]', saved_key, class: 'register-input-long', placeholder: t('users.show.external_tool_apikey_placeholder') |
77 | | - .mt-2 |
78 | | - = render Buttons::RegularButtonComponent.new(id: "save_#{tool[:name]}_apikey", variant: 'secondary', size: 'slim', type: 'submit', value: t('users.show.external_tool_apikey_save')) |
| 61 | + %h4.account-page-card-title= t('users.show.external_tools') |
| 62 | + %p.account-page-card-desc= t('users.show.external_tools_description') |
| 63 | + - external_tools_list.each do |tool| |
| 64 | + - saved_key = user_external_tool_apikey(@user, tool[:name]) |
| 65 | + .account-page-subscription |
| 66 | + %a{'data-action': 'click->reveal-component#toggle', 'data-id': "external_tool_form_#{tool[:name]}", style: 'cursor: pointer;'} |
| 67 | + = tool[:label] |
| 68 | + .d-none.mt-3{id: "external_tool_form_#{tool[:name]}"} |
| 69 | + = form_tag user_external_tools_path(url_encode(@user.username)) do |
| 70 | + = hidden_field_tag 'user[tool_name]', tool[:name] |
| 71 | + = render Input::TextInputComponent.new(name: 'user[apikey]', value: saved_key, placeholder: t('users.show.external_tool_apikey_placeholder')) |
| 72 | + .mt-3 |
| 73 | + = render Buttons::RegularButtonComponent.new(id: "save_#{tool[:name]}_apikey", variant: 'secondary', size: 'slim', type: 'submit', value: t('users.show.external_tool_apikey_save')) |
79 | 74 | .account-page-card{'data-controller': 'reveal-component'} |
80 | 75 | %h4.account-page-card-title |
81 | 76 | = t('users.show.custom_semantic_resource') |
|
0 commit comments