avo 2.13.2.pre.1 → 2.13.2.pre.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of avo might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc519d3091408bc2355cb12d6b86671f8b77270e479de775d3290a18c7933a5f
4
- data.tar.gz: 244a5fcc3837878903f797177cf791a7981f5d1ccd07b60245a9226fde24b978
3
+ metadata.gz: 7d2a2d60bd6f10125e4f440dd60f8045c72f9050b9017cbd7be1b77ab27cc686
4
+ data.tar.gz: 7cea0139417cc49901959a8bd43480511abc7c983bf2714d6f2e28eb134d03f3
5
5
  SHA512:
6
- metadata.gz: 13d4188612ef439fd452a4e13fdd5d294e44e4024a3c0c23812cf0580bcd76af03a9a06225ac0ea32f1ee4ff938b1b4ce21481b09716f44c4299151472c81e97
7
- data.tar.gz: b66aac0a5d64487839e61e5d30409063a877dd65d9d693fc140b17c5222c4605ef5ebfd51b01d55fd7638d2011fcb04e3fa0dd005ba58b89201a683e692fea48
6
+ metadata.gz: 85079752935621f43145afa39b290ec6219ab1f01bb8c21d61ad23563f36e2d543f205fc640624c23a47b776c7c7a7784a39ec7c68571e390421acd10314c0c5
7
+ data.tar.gz: dce5b77f030a299d9e157381cdbee094acff2e3a3e28f111d8491a06043c5ca09ca1b9c29b172b1f7ed1e3cba7251f694d544e0e7a0d9d6e33aba3fb8e7eabff
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (2.13.2.pre.1)
4
+ avo (2.13.2.pre.2)
5
5
  active_link_to
6
6
  addressable
7
7
  breadcrumbs_on_rails
@@ -1,6 +1,7 @@
1
1
  class Avo::Configuration::Branding
2
- def initialize(colors: nil, logo: nil, logomark: nil)
2
+ def initialize(colors: nil, chart_colors: nil, logo: nil, logomark: nil)
3
3
  @colors = colors
4
+ @chart_colors = chart_colors
4
5
  @logo = logo
5
6
  @logomark = logomark
6
7
 
@@ -10,6 +11,7 @@ class Avo::Configuration::Branding
10
11
  500 => "8 134 222",
11
12
  600 => "6 107 178"
12
13
  }
14
+ @default_chart_colors = ["#0B8AE2", "#34C683", "#2AB1EE", "#34C6A8"]
13
15
  @default_logo = "/avo-assets/logo.png"
14
16
  @default_logomark = "/avo-assets/logomark.png"
15
17
  end
@@ -32,6 +34,12 @@ class Avo::Configuration::Branding
32
34
  @logomark || @default_logomark
33
35
  end
34
36
 
37
+ def chart_colors
38
+ return @default_chart_colors if Avo::App.license.lacks_with_trial(:branding)
39
+
40
+ @chart_colors || @default_chart_colors
41
+ end
42
+
35
43
  private
36
44
 
37
45
  def colors
@@ -29,7 +29,7 @@ module Avo
29
29
  default = {
30
30
  # figure our the available height for the chart
31
31
  height: "#{(rows * card_height) - card_heading}px",
32
- colors: %w[#0B8AE2 #34C683 #2AB1EE #34C6A8],
32
+ colors: ::Avo.configuration.branding.chart_colors,
33
33
  library: {
34
34
  discrete: false,
35
35
  points: false,
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "2.13.2.pre.1" unless const_defined?(:VERSION)
2
+ VERSION = "2.13.2.pre.2" unless const_defined?(:VERSION)
3
3
  end
@@ -62,6 +62,7 @@ Avo.configure do |config|
62
62
  # 500 => "#0886DE",
63
63
  # 600 => "#066BB2",
64
64
  # },
65
+ # chart_colors: ["#0B8AE2", "#34C683", "#2AB1EE", "#34C6A8"],
65
66
  # logo: "/avo-assets/logo.png"
66
67
  # logomark: "/avo-assets/logomark.png",
67
68
  # }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.13.2.pre.1
4
+ version: 2.13.2.pre.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin