faw_toast 1.4.0 → 1.4.1

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: 314d01dd20348f62a6246f377322f8228ef2b021a9f4fc8ce499d76987a19f64
4
- data.tar.gz: 272d6ce0491dc17f9219050a89fcb5a8209cc61394d2c86007a74a5cf0c539ce
3
+ metadata.gz: 20b5f4ba4431cccf4fb2e389d96eb476f6bcad0e647510b7efd45c0dc6e739b6
4
+ data.tar.gz: f59a37ec861743eedfa4a7a1d6eb71f681a395345c60fc34f2ed4dfbae34c5dd
5
5
  SHA512:
6
- metadata.gz: 65ee75966b4fadf82dbf968d263753f105b7bdf5a1a0970496456ab8abbfbe2663ec50911aafd7afe645dd57b3e46770a687443099545bae7e2b817b00a2d962
7
- data.tar.gz: 92ee429a17c88b3669d62e37d001f316670e81203bdff9129ae2f83eb5478795f776ed2d14679b340aa772628ff78a1832ab4066b7d789d1ca9e436f801b0a29
6
+ metadata.gz: 40a6bcadcc29476e6b7c3caf40f8b06e41a48c283ba6ed28e945c2923181896da92d8169d21f90ec91ac92a41ab05395f2cd4d5d420ba2a4cdb4e00381273385
7
+ data.tar.gz: 777749653a1c46b020e285cd39c25767d45a7040f52d6a02dc58bdb81a852c05cbd86d261d145aed7916ebd83a72c0c78c66970be0f09e5e9074fbaf9a3fd469
data/README.md CHANGED
@@ -40,16 +40,13 @@ rails generate faw_toast:install
40
40
 
41
41
  This will:
42
42
  1. Create a configuration initializer at `config/initializers/faw_toast.rb`
43
- 2. Add the toast container to your application layout
43
+ 2. Include the following into your `application.html.erb`
44
+ * Add a style tag for the configurable css variables
45
+ * `<%= stylesheet_link_tag "faw_toast", "data-turbo-track": "reload" %>`
46
+ * `<%= javascript_include_tag "faw_toast", "data-turbo-track": "reload", type: "module" %>`
47
+ * Add the toast container div
44
48
 
45
- Include the css and javascript files in your `application.html.erb` layout file.
46
-
47
- For `propshaft`
48
- ```erb
49
- <%= stylesheet_link_tag "faw_toast", "data-turbo-track": "reload" %>
50
- <%= javascript_include_tag "faw_toast", "data-turbo-track": "reload", type: "module" %>
51
- ```
52
- and if you are using `sprockets` include the following lines in your `config/manifest.js`
49
+ If you are using `sprockets` you may need to add the following lines to your `app/config/manifest.js`
53
50
  ```javascript
54
51
  //= link faw_toast.js
55
52
  //= link faw_toast.css
@@ -1,6 +1,14 @@
1
- <% flash.each do |type, message| %>
1
+ <% if local_assigns[:type] && local_assigns[:message] %>
2
2
  <div class="faw-toast <%= flash_class(type) %>">
3
3
  <%= message %>
4
4
  <div class="faw-toast-progress"></div>
5
5
  </div>
6
+ <% else %>
7
+ <% flash.each do |type, message| %>
8
+ <div class="faw-toast <%= flash_class(type) %>">
9
+ <%= message %>
10
+ <div class="faw-toast-progress"></div>
11
+ </div>
12
+ <% end %>
6
13
  <% end %>
14
+
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FawToast
4
- VERSION = "1.4.0"
4
+ VERSION = "1.4.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faw_toast
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - alexwebgr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-27 00:00:00.000000000 Z
11
+ date: 2025-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails