mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -294,13 +294,3 @@ a {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
hr {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user