fix a few, more to go (#2869)

* fix a few, more to go

* chore: comments (#2871)

* chore: comments

* chore: typo

* chore: stricter typescript (#2872)

* chore: comments

* chore: stricter typescript

---------

Co-authored-by: Matt Hill <MattDHill@users.noreply.github.com>

* minor styling

---------

Co-authored-by: Alex Inkin <alexander@inkin.ru>
This commit is contained in:
Matt Hill
2025-04-12 09:53:03 -06:00
committed by GitHub
parent 6a312e3fdd
commit 2e6e9635c3
55 changed files with 440 additions and 343 deletions

View File

@@ -48,6 +48,6 @@ export class LogsWindowComponent {
}
onBottom(entries: readonly IntersectionObserverEntry[]) {
this.scroll = entries[entries.length - 1].isIntersecting
this.scroll = !!entries[entries.length - 1]?.isIntersecting
}
}

View File

@@ -25,9 +25,12 @@ export function convertBytes(bytes: number): string {
export class DurationToSecondsPipe implements PipeTransform {
transform(duration?: string | null): number {
if (!duration) return 0
const [, num, , unit] =
duration.match(/^([0-9]*(\.[0-9]+)?)(ns|µs|ms|s|m|d)$/) || []
return Number(num) * unitsToSeconds[unit]
const regex = /^([0-9]*(\.[0-9]+)?)(ns|µs|ms|s|m|d)$/
const [, num, , unit] = duration.match(regex) || []
const multiplier = (unit && unitsToSeconds[unit]) || NaN
return unit ? Number(num) * multiplier : NaN
}
}

View File

@@ -294,13 +294,3 @@ a {
margin-right: 0.5rem;
}
}
h1,
h2,
h3,
h4,
h5,
h6,
hr {
margin: 0;
}