Skip to content

fix: stop the timerbar when timer paused#2410

Merged
antfu merged 1 commit into
slidevjs:mainfrom
toreis-up:fix/timer-bar
Dec 18, 2025
Merged

fix: stop the timerbar when timer paused#2410
antfu merged 1 commit into
slidevjs:mainfrom
toreis-up:fix/timer-bar

Conversation

@toreis-up

Copy link
Copy Markdown
Member

This pull request introduces a small but important improvement to the useTimer composable. The main change ensures that when the timer is paused, the elapsed time calculation correctly reflects the duration between the start and pause events, rather than continuing to increment.

  • Timer pause logic:
    • In useTimer.ts, the computed passedMs now returns the difference between pausedAt and startedAt when the timer status is 'paused', ensuring accurate elapsed time reporting during pauses.

resolves #2399

Copilot AI review requested due to automatic review settings December 16, 2025 13:00
@pkg-pr-new

pkg-pr-new Bot commented Dec 16, 2025

Copy link
Copy Markdown

Open in StackBlitz

@slidev/client

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/client@2410

create-slidev

npm i https://pkg.pr.new/slidevjs/slidev/create-slidev@2410

create-slidev-theme

npm i https://pkg.pr.new/slidevjs/slidev/create-slidev-theme@2410

@slidev/parser

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/parser@2410

@slidev/cli

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/cli@2410

@slidev/types

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/types@2410

commit: b915618

@netlify

netlify Bot commented Dec 16, 2025

Copy link
Copy Markdown

Deploy Preview for slidev failed.

Name Link
🔨 Latest commit b915618
🔍 Latest deploy log https://app.netlify.com/projects/slidev/deploys/694157fa4720740008c89ebd

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@antfu
antfu merged commit 8b1a1c3 into slidevjs:main Dec 18, 2025
22 of 26 checks passed
@toreis-up
toreis-up deleted the fix/timer-bar branch December 18, 2025 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The timer bar at the top of the screen does not appear to stop

3 participants