playbook_ui 7.0.1.pre.alpha11 → 7.0.1.pre.alpha12

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: 4c32403a6cb41b9155eb58cb9d56a0e0460a8beea17b160ea95d72cabe17965b
4
- data.tar.gz: 596af6f87f57a2256b9b92a9911755ad0a396408dd9e47e1d2c131dc1a66ed85
3
+ metadata.gz: 4fe0f6e73d47c5dc6e885e636aaaa37acc5354f4cffac8ba5ca8cd21fa719cf3
4
+ data.tar.gz: 47814061793d8e5bb67bd90747d127033dfb8f99401cb6abc674daa98168742f
5
5
  SHA512:
6
- metadata.gz: 8b97712fe73c092847611e612ad8058556b1cc852490993ffe3231ddfee1c4879bf5bb0972a0192b82c3ee986feb69dfd8b1de8dd8133740d1e6a7ba3f7fe38b
7
- data.tar.gz: 3689749d6443734eefa3e5570171fe9b6d068a0f986ca1f91a7be2eb300d2d4c9ec50364babc961497fa90389557ec6e6b153006b10d0168b84967a40b9a518c
6
+ metadata.gz: fa54ac8af29c6fedfe23c06aeab73d1244d27c1935d4b3ef9db6a127b4d71e875ca10cf1f36c3d630a332170d165b8bb4f4cded58e96b553b4eb25e6389d2cb7
7
+ data.tar.gz: 94297d8c94a6c8c99590c492cafafc868b095ce18953150f53e965aa8a576155575f5119b51cacd8d58c3fc7ea9fe340ef26dc538d9617caa0f891ff3ce14a0b
@@ -3,7 +3,7 @@
3
3
  module Playbook
4
4
  class ApplicationController < ActionController::Base
5
5
  protect_from_forgery with: :exception
6
-
6
+
7
7
  helper Webpacker::Helper
8
8
  helper Playbook::PbKitHelper
9
9
  helper Playbook::PbDocHelper
@@ -11,6 +11,5 @@ module Playbook
11
11
  append_view_path Playbook::Engine.root + "app/pb_kits"
12
12
  end
13
13
 
14
- ENV["playbook"] = "true"
15
-
14
+
16
15
  end
@@ -8,6 +8,11 @@ module Playbook
8
8
  before_action :set_kit, only: %i[kit_show_rails kit_show_react]
9
9
  before_action :ensure_kit_type_exists, only: %i[kit_show_rails kit_show_react]
10
10
  before_action :set_category, only: %i[kit_category_show_rails kit_category_show_react]
11
+ before_action :set_playbook
12
+
13
+ def set_playbook
14
+ @playbook = true
15
+ end
11
16
 
12
17
  def enable_dark_mode
13
18
  cookies[:dark_mode] = {
@@ -22,7 +22,7 @@ module Playbook
22
22
 
23
23
  private
24
24
  def rails_props(props)
25
- if ENV["playbook"].nil?
25
+ if @playbook.nil?
26
26
  props
27
27
  else
28
28
  dark_mode_props(props)
@@ -30,7 +30,7 @@ module Playbook
30
30
  end
31
31
 
32
32
  def react_props
33
- if ENV["playbook"].nil?
33
+ if @playbook.nil?
34
34
  false
35
35
  else
36
36
  dark_mode
@@ -1,5 +1,8 @@
1
1
 
2
2
  <div class="pb--page--topNav <%= cookies[:dark_mode] == "true" ? 'dark' : '' %>">
3
+ <% if @playbook.nil?%>
4
+ <p>playbok is nil</p>
5
+ <% end %>
3
6
  <%= pb_rails("flex", props:{spacing:"between",vertical: "center"}) do%>
4
7
  <%= pb_rails("flex", props:{spacing:"between",vertical: "center"}) do%>
5
8
  <%= link_to root_url do %>
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Playbook
3
- VERSION = "7.0.1-alpha11"
3
+ VERSION = "7.0.1-alpha12"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.1.pre.alpha11
4
+ version: 7.0.1.pre.alpha12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX