web47core 3.2.3.45 → 3.2.3.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8870399f95e59eac84d25e3752f2e8694986a76c609471ce639d11d0939ff540
4
- data.tar.gz: 37e7ff4979d9fda9e459969949e2b2108ce87eaee88ecb015dd36883c8384e07
3
+ metadata.gz: fac443ea8a3048e4785964d2899475fd8ac9025610a8f654250a900831228d06
4
+ data.tar.gz: ad2d4ae7bf3120c6ea32c065a486f0c8c7c7533b228b2cdb3c9ea1933648fad2
5
5
  SHA512:
6
- metadata.gz: aa0b881dc84f4f54c6e18ab89f1719b633a5c1538871aa9c4079b5c8c4c84f7e69e1bbdd7e86ca13880cf454ea5b653ddd89a00caca8ebebb232ea2dbb5603f1
7
- data.tar.gz: 3c3b5e02b342e9afa8dbccfab990f7d7d44e284eef1c59ea19ed79e42a74c3636e727a298f7f5dce073532e4365e501ea8da98640dd584639f11f1b6ae5af91d
6
+ metadata.gz: d8ad5891e0a99c57d3a4d507c368adf58060d2ff3b85558dbef0be63f3ef67ed0971270ec5d7bf46f46a5cef06fccd70b2b157b8a8c27293746d3be961838c09
7
+ data.tar.gz: e9c1e1d9ade0fb0923f42199477d47692b83564c372a900217acefc8904291c1eefefd90f02a06284cc49a89a94899f29f5444b0bc71e9e953ea8ea44ae5b12c
@@ -40,11 +40,11 @@ class StatusController < ActionController::Base
40
40
  def ui_decorators(components)
41
41
  components.each do |key, values|
42
42
  if values[:success]
43
- components[key][:icon_name] = 'check_circle'
44
- components[key][:icon_color] = 'green-text'
43
+ components[key][:icon_name] = 'circle-check'
44
+ components[key][:icon_color] = :green
45
45
  else
46
- components[key][:icon_name] = 'error'
47
- components[key][:icon_color] = 'red-text'
46
+ components[key][:icon_name] = 'circle-x'
47
+ components[key][:icon_color] = :red
48
48
  end
49
49
  end
50
50
  end
@@ -6,30 +6,23 @@ module SvgIconHelper
6
6
  def svg_icon(name, size: 24, type: :outline, classes: [], color: 'currentColor', stroke_width: 2)
7
7
  return if name.blank?
8
8
 
9
- key = ['svg_icon', name, size.to_s, type.to_s, classes.to_s, color, stroke_width.to_s].join(':')
10
- Rails.cache.fetch(key, expires_in: 15.minutes) do
11
- fetch_svg_icon(name, size: size, type: type, classes: classes, color: color, stroke_width: stroke_width)
12
- end
9
+ fetch_svg_icon(name, size: size, type: type, classes: classes, color: color, stroke_width: stroke_width)
13
10
  end
14
11
 
15
12
  def fetch_svg_icon(name, size: 24, type: :outline, classes: [], color: 'currentColor', stroke_width: 2)
16
13
  return if name.blank?
17
14
 
18
15
  classes = classes.compact.flatten.join(' ')
19
- key = "icon_partial_path:#{name}:#{type}"
20
- (partial, stroke) = Rails.cache.fetch(key, expires_in: 15.minutes) do
21
- preferred_path = if I18n.exists?("nav.icons.#{name}")
22
- "icons/#{I18n.t("nav.icons.#{name}")}"
23
- else
24
- "icons/#{type}/#{name}"
25
- end
26
- outline_path = "icons/outline/#{name}"
27
- filled_path = "icons/filled/#{name}"
28
-
29
- [preferred_path, outline_path, filled_path].collect do |path|
30
- [preferred_path, color] if lookup_context.exists?(path, [], true)
31
- end.compact.first
32
- end
16
+ preferred_path = if I18n.exists?("nav.icons.#{name}")
17
+ "icons/#{I18n.t("nav.icons.#{name}")}"
18
+ else
19
+ "icons/#{type}/#{name}"
20
+ end
21
+ outline_path = "icons/outline/#{name}"
22
+ filled_path = "icons/filled/#{name}"
23
+ (partial, stroke) = [preferred_path, outline_path, filled_path].collect do |path|
24
+ [preferred_path, color] if lookup_context.exists?(path, [], true)
25
+ end.compact.first
33
26
  if partial.blank?
34
27
  partial = 'icons/outline/bug'
35
28
  stroke = 'red'
@@ -48,8 +41,7 @@ module SvgIconHelper
48
41
  title: name) do
49
42
  render partial
50
43
  end
51
- rescue StandardError => error
52
- puts "Error: #{error}"
44
+ rescue StandardError
53
45
  tag.svg(xmlns: 'http://www.w3.org/2000/svg',
54
46
  viewBox: '0 0 24 24',
55
47
  width: size,
@@ -6,7 +6,6 @@
6
6
  %meta{ name: 'apple-mobile-web-app-capable', content: 'yes'}
7
7
  %meta{ name: 'apple-mobile-web-app-status-bar-style', content: 'black'}
8
8
  = stylesheet_link_tag 'https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css'
9
- = stylesheet_link_tag 'https://fonts.googleapis.com/icon?family=Material+Icons'
10
9
  %title="#{Rails.env} Status"
11
10
  %body{ style: 'background-color: #006064;'}
12
11
  %header
@@ -32,7 +31,7 @@
32
31
  %td
33
32
  %h4.flow-text=key.to_s.titleize
34
33
  %td.center
35
- %i.material-icons.medium{class: value[:icon_color]}
36
- = value[:icon_name]
34
+ %svg{xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 24 24', width: 32, height: 32, fill: 'none', stroke: value[:icon_color].to_s, style: "color: #{value[:icon_color]}", 'stroke-width': 2, 'stroke-linecap': 'round', 'stroke-linejoin': 'round', title: value[:icon_name]}
35
+ = render "icons/outline/#{value[:icon_name]}"
37
36
  %td.center.hide-on-small-only
38
37
  %h4.flow-text.large=value[:message]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Web47core
4
- VERSION = '3.2.3.45'
4
+ VERSION = '3.2.3.47'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web47core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.3.45
4
+ version: 3.2.3.47
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Schroeder