From acbe4e35cd4e2ffd2c197d4e5d87e296f9c4f5ae Mon Sep 17 00:00:00 2001 From: marzban-dev Date: Sun, 31 Aug 2025 17:56:14 +0330 Subject: [PATCH] Update slider --- frontend/composables/global/useSlider.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/composables/global/useSlider.ts b/frontend/composables/global/useSlider.ts index 6e11af2..e19d641 100644 --- a/frontend/composables/global/useSlider.ts +++ b/frontend/composables/global/useSlider.ts @@ -63,7 +63,7 @@ const useSlider = ({ duration = 0, count }: Props) => { const restartSliderTimer = () => { if (sliderTimer.value) clearInterval(sliderTimer.value); runProgress(); - + if (duration > 0) { sliderTimer.value = setInterval(() => { runProgress(); @@ -76,7 +76,9 @@ const useSlider = ({ duration = 0, count }: Props) => { restartSliderTimer(); }); - onUnmounted(() => {}); + onUnmounted(() => { + restartSliderTimer(); + }); return { activeSlide,