From d2733e16bcab2fa0d2ac9c723a29cb18f9d7dd9b Mon Sep 17 00:00:00 2001 From: salam Date: Fri, 16 Oct 2026 17:46:23 +0200 Subject: [PATCH] wip --- app/Traits/Sofascore/GrappingSofascore.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/app/Traits/Sofascore/GrappingSofascore.php b/app/Traits/Sofascore/GrappingSofascore.php index aaeca454..28ea1bab 100644 --- a/app/Traits/Sofascore/GrappingSofascore.php +++ b/app/Traits/Sofascore/GrappingSofascore.php @@ -252,8 +252,10 @@ trait GrappingSofascore $this->restart = 1; break; case 'clear': - $this->restart = 1; - $this->clear_folder($folder, 'all'); + if ($this->confirm_delete() == 'Yes') { + $this->restart = 1; + $this->clear_folder($folder, 'all'); + } break; } @@ -432,4 +434,16 @@ trait GrappingSofascore ] ); } + + protected function confirm_delete(): string + { + return select( + label: 'Confirm delete!', + default: 'no', + options: [ + 'no' => 'No', + 'yes' => 'Yes', + ] + ); + } }