Skip to content

Commit

Permalink
fix: login page icons size
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Apr 3, 2024
1 parent 97879ac commit 2b676ce
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
6 changes: 5 additions & 1 deletion app/components/display/info_tooltip_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ def initialize(text: nil , icon: "info.svg")
end
def call
content_tag(:div, data:{controller:'tooltip', 'tooltip-interactive-value': 'true'}, title: @text, style: 'display: inline-block;') do
inline_svg_tag "icons/#{@icon}", width: '20', height: '20'
if content
content
else
inline_svg_tag "icons/#{@icon}", width: '20', height: '20'
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/annotator_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def get_semantic_types
return semantic_types if sty_ont.nil?
# The first 500 items should be more than sufficient to get all semantic types.
sty_classes = sty_ont.explore.classes({'pagesize'=>500, include: 'prefLabel'})
sty_classes.collection.each do |cls|
Array(sty_classes.collection).each do |cls|
code = cls.id.split("/").last
semantic_types[ code ] = cls.prefLabel
end
Expand Down
6 changes: 3 additions & 3 deletions app/views/login/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
class: 'btn btn-lg',disabled: !config[:enable] ,style:'width: 70px', title: t('login.login_with_provider', provider: provider.to_s.humanize), 'data-turbo': false do;
- if config[:icon]
= inline_svg "icons/#{config[:icon]}", class: 'login-active-sso'
- else
- else
= provider.to_s.humanize
- else
.disabled-login-sso
= render Display::InfoTooltipComponent.new(text: "#{provider.to_s.humanize} is disabled", icon: config[:icon])

= render Display::InfoTooltipComponent.new(text: "#{provider.to_s.humanize} is disabled") do
= inline_svg "icons/#{config[:icon]}", width: "40", height: "40"
3 changes: 1 addition & 2 deletions test/system/login_flows_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ class LoginFlowsTest < ApplicationSystemTestCase

assert_selector '.account-page-card-title', text: 'API Key'
assert_selector '.account-page-card-title', text: 'Subscriptions'
assert_selector '.account-page-card-title', text: 'Submitted Semantic Resources'
assert_selector '.account-page-card-title', text: 'Submitted Ontologies'
assert_selector '.account-page-card-title', text: 'Projects Created'

end

test "go to login page and click save" do
Expand Down

0 comments on commit 2b676ce

Please sign in to comment.