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 +4 -4
- data/README.md +6 -9
- data/app/views/faw_toast/_toast.html.erb +9 -1
- data/lib/faw_toast/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20b5f4ba4431cccf4fb2e389d96eb476f6bcad0e647510b7efd45c0dc6e739b6
|
4
|
+
data.tar.gz: f59a37ec861743eedfa4a7a1d6eb71f681a395345c60fc34f2ed4dfbae34c5dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
-
|
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
|
-
<%
|
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
|
+
|
data/lib/faw_toast/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2025-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|