mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
ST port labels and move logout to settings (#3134)
* chore: update packages (#3132) * chore: update packages * start tunnel messaging * chore: standalone * pbpaste instead --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> * port labels and move logout to settings * enable-disable forwards * Fix docs URLs in start-tunnel installer output (#3135) --------- Co-authored-by: Alex Inkin <alexander@inkin.ru> Co-authored-by: gStart9 <106188942+gStart9@users.noreply.github.com>
This commit is contained in:
20
web/projects/shared/src/pipes/exver-compares.pipe.ts
Normal file
20
web/projects/shared/src/pipes/exver-compares.pipe.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { inject, Pipe, PipeTransform } from '@angular/core'
|
||||
import { Exver } from '../services/exver.service'
|
||||
|
||||
@Pipe({
|
||||
name: 'compareExver',
|
||||
})
|
||||
export class ExverComparesPipe implements PipeTransform {
|
||||
private readonly exver = inject(Exver)
|
||||
|
||||
transform(first: string, second: string): SemverResult {
|
||||
try {
|
||||
return this.exver.compareExver(first, second) as SemverResult
|
||||
} catch (e) {
|
||||
console.error(`exver comparison failed`, e, first, second)
|
||||
return 'comparison-impossible'
|
||||
}
|
||||
}
|
||||
}
|
||||
// left compared to right - if 1, version on left is higher; if 0, values the same; if -1, version on left is lower
|
||||
type SemverResult = 0 | 1 | -1 | 'comparison-impossible'
|
||||
Reference in New Issue
Block a user