Skip to content

Commit 0d4184d

Browse files
committed
🐛 reload will wait for cooldown, thanks @oliverwendenburg
Signed-off-by: Bruno Meilick <[email protected]>
1 parent 1c07581 commit 0d4184d

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bnomei/kirby3-janitor",
33
"type": "kirby-plugin",
4-
"version": "5.2.1",
4+
"version": "5.2.2",
55
"license": "MIT",
66
"homepage": "https://github.com/bnomei/kirby3-janitor",
77
"description": "Kirby Plugin for running commands like cleaning the cache from within the Panel, PHP code or a cronjob",

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/fields/Janitor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ export default {
269269
}
270270
271271
if (reload) {
272-
location.reload();
272+
setTimeout(() => location.reload(), this.cooldown || 0);
273273
}
274274
275275
if (open) {

tests/site/blueprints/pages/default.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ fields:
7676
type: janitor
7777
command: reload
7878
label: Reload Page Example
79+
cooldown: 5000
7980
icon: refresh
8081
# help: returns `reload => true` to janitor
8182

vendor/composer/installed.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php return array(
22
'root' => array(
33
'name' => 'bnomei/kirby3-janitor',
4-
'pretty_version' => '5.2.1',
5-
'version' => '5.2.1.0',
4+
'pretty_version' => '5.2.2',
5+
'version' => '5.2.2.0',
66
'reference' => null,
77
'type' => 'kirby-plugin',
88
'install_path' => __DIR__ . '/../../',
@@ -11,8 +11,8 @@
1111
),
1212
'versions' => array(
1313
'bnomei/kirby3-janitor' => array(
14-
'pretty_version' => '5.2.1',
15-
'version' => '5.2.1.0',
14+
'pretty_version' => '5.2.2',
15+
'version' => '5.2.2.0',
1616
'reference' => null,
1717
'type' => 'kirby-plugin',
1818
'install_path' => __DIR__ . '/../../',

0 commit comments

Comments
 (0)