diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 642d3a6..c63856a 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -811,10 +811,11 @@ checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" [[package]] name = "deranged" -version = "0.3.7" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" dependencies = [ + "powerfmt", "serde", ] @@ -2391,6 +2392,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-traits" version = "0.2.16" @@ -2928,6 +2935,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -4351,14 +4364,16 @@ dependencies = [ [[package]] name = "time" -version = "0.3.25" +version = "0.3.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" dependencies = [ "deranged", "itoa 1.0.9", "libc", + "num-conv", "num_threads", + "powerfmt", "serde", "time-core", "time-macros", @@ -4366,16 +4381,17 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" [[package]] name = "time-macros" -version = "0.2.11" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" dependencies = [ + "num-conv", "time-core", ] diff --git a/src/app/_services/time-tracker.service.ts b/src/app/_services/time-tracker.service.ts index 6984cf3..976bd89 100644 --- a/src/app/_services/time-tracker.service.ts +++ b/src/app/_services/time-tracker.service.ts @@ -131,6 +131,10 @@ export class TimeTrackerService { return this.storedHistoriesSubject; } + public reset() { + this.setCurrentRunHistory(this.createNew(this.currentRunHistory?.associatedName)); + } + onNewRun(plan: Plan) { if (this.timerSubscription && !this.timerSubscription.closed) this.timerSubscription.unsubscribe(); if (this.debouncedSaveStopwatch && !this.debouncedSaveStopwatch.closed) this.debouncedSaveStopwatch.unsubscribe(); diff --git a/src/app/plan-display/plan-display.component.html b/src/app/plan-display/plan-display.component.html index b767d1c..8832e73 100644 --- a/src/app/plan-display/plan-display.component.html +++ b/src/app/plan-display/plan-display.component.html @@ -46,6 +46,8 @@ +
(W) = Waypoint diff --git a/src/app/plan-display/plan-display.component.scss b/src/app/plan-display/plan-display.component.scss index 7c645b5..3892f02 100644 --- a/src/app/plan-display/plan-display.component.scss +++ b/src/app/plan-display/plan-display.component.scss @@ -145,6 +145,12 @@ notes { right: 0; } +.reset-button { + position: absolute; + bottom: 0; + right: 0; +} + .help { position: absolute; top: 0; diff --git a/src/app/plan-display/plan-display.component.ts b/src/app/plan-display/plan-display.component.ts index 53c575a..07a6f91 100644 --- a/src/app/plan-display/plan-display.component.ts +++ b/src/app/plan-display/plan-display.component.ts @@ -253,6 +253,11 @@ export class PlanDisplayComponent implements OnInit { event.stopPropagation(); } + resetClick(event: any) { + event.stopPropagation(); + this.setIndex(0); + } + onScroll(event: WheelEvent) { if (event.deltaY < 0) { this.prev();