mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-09 01:13:55 +00:00
Feat/mac (#109)
* chore: upgrade dependencies * feat/mac: draft pipeline * feat/mac: use public folder for transient files * feat/mac: set app fullscreen * feat/mac: cmd + , toggles menu * feat/mac: update readme * refact: easier login process * refact prevent style issues with safari * refact reduce css download * style: cleanup paginator design * style: studio clock is responsive * style: fix spacing style issues with safari
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { stringFromMillis } from '../utils/time.js';
|
||||
|
||||
/*
|
||||
* Timer implements simple countdown timer functions
|
||||
* User needs to use setup function to be able to use
|
||||
*
|
||||
*/
|
||||
|
||||
import { stringFromMillis } from 'ontime-utils/time.js';
|
||||
|
||||
export class Timer {
|
||||
constructor() {
|
||||
this.clock = null;
|
||||
@@ -62,11 +62,7 @@ export class Timer {
|
||||
if (this._startedAt != null) {
|
||||
// update current timer
|
||||
this.current =
|
||||
this._startedAt +
|
||||
this.duration +
|
||||
this._pausedTotal +
|
||||
this._pausedInterval -
|
||||
now;
|
||||
this._startedAt + this.duration + this._pausedTotal + this._pausedInterval - now;
|
||||
}
|
||||
|
||||
// enable flag
|
||||
@@ -114,10 +110,7 @@ export class Timer {
|
||||
if (this._finishedAt) return this._finishedAt;
|
||||
|
||||
return Math.max(
|
||||
this._startedAt +
|
||||
this.duration +
|
||||
this._pausedInterval +
|
||||
this._pausedTotal,
|
||||
this._startedAt + this.duration + this._pausedInterval + this._pausedTotal,
|
||||
this._startedAt
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user