From eff87fa922769f951d00208de0829a08a9d0a5cb Mon Sep 17 00:00:00 2001 From: pvincent Date: Thu, 25 Jan 2024 11:20:33 +0400 Subject: [PATCH] progressbar delay --- README.md | 1 + app/controllers/scores_controller.rb | 5 ++--- app/javascript/application.js | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d8a59f1..d8d4b7e 100644 --- a/README.md +++ b/README.md @@ -50,4 +50,5 @@ end * [x] plugin for completion * [x] Rails Live Reload * [x] compliance with Tailwind +* [x] Custom Progress Bar diff --git a/app/controllers/scores_controller.rb b/app/controllers/scores_controller.rb index cf3d101..0cc2fcc 100644 --- a/app/controllers/scores_controller.rb +++ b/app/controllers/scores_controller.rb @@ -18,13 +18,12 @@ class ScoresController < ApplicationController end # GET /scores/1 - def show - sleep 1.5 - end + def show; end # GET /scores/new def new @score = Score.new + sleep 0.3 end # GET /scores/1/edit diff --git a/app/javascript/application.js b/app/javascript/application.js index 0d7b494..7c48bbd 100644 --- a/app/javascript/application.js +++ b/app/javascript/application.js @@ -1,3 +1,6 @@ // Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails import "@hotwired/turbo-rails" import "controllers" + +// Customize Turbo default behaviour +Turbo.setProgressBarDelay(300) \ No newline at end of file