File tree Expand file tree Collapse file tree 4 files changed +10
-22
lines changed Expand file tree Collapse file tree 4 files changed +10
-22
lines changed Original file line number Diff line number Diff line change 1
1
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
2
2
import "@hotwired/turbo-rails"
3
3
import "controllers"
4
- import Swal from 'sweetalert2' ;
5
-
6
- document . addEventListener ( 'DOMContentLoaded' , ( ) => {
7
- const Toast = Swal . mixin ( {
8
- toast : true ,
9
- position : "top-end" ,
10
- showConfirmButton : false ,
11
- timer : 3000 ,
12
- timerProgressBar : true ,
13
- didOpen : ( toast ) => {
14
- toast . onmouseenter = Swal . stopTimer ;
15
- toast . onmouseleave = Swal . resumeTimer ;
16
- }
17
- } ) ;
18
- // Toast.fire({
19
- // icon: "success",
20
- // title: "Signed in successfully"
21
- // });
22
-
23
- } ) ;
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ export default class extends Controller {
11
11
if ( this . messageValue ) {
12
12
const Toast = Swal . mixin ( {
13
13
toast : true ,
14
- position : 'top-end' ,
14
+ position : 'top' ,
15
+ width : '600px' ,
15
16
showConfirmButton : false ,
16
17
timer : 3000 ,
17
18
timerProgressBar : true
Original file line number Diff line number Diff line change 15
15
# Enable server timing.
16
16
config . server_timing = true
17
17
18
+ config . importmap . cache_sweepers << Rails . root . join ( "app/javascript" )
19
+ config . importmap . cache_sweepers << Rails . root . join ( "app/assets" )
20
+
21
+ config . cache_classes = false
22
+ config . action_controller . perform_caching = false
23
+ config . cache_store = :null_store
24
+
18
25
# Enable/disable Action Controller caching. By default Action Controller caching is disabled.
19
26
# Run rails dev:cache to toggle Action Controller caching.
20
27
if Rails . root . join ( "tmp/caching-dev.txt" ) . exist?
Original file line number Diff line number Diff line change 4
4
pin "@hotwired/turbo-rails" , to : "turbo.min.js"
5
5
pin "@hotwired/stimulus" , to : "stimulus.min.js"
6
6
pin "@hotwired/stimulus-loading" , to : "stimulus-loading.js"
7
- pin_all_from "app/javascript/controllers" , under : "controllers"
7
+ pin_all_from "app/javascript/controllers" , under : "controllers" , preload : true
8
8
pin "sweetalert2" # @11.15.10
You can’t perform that action at this time.
0 commit comments