mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 20:43:41 +00:00
fix errors in shared and marketplace
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { HttpErrorResponse } from '@angular/common/http'
|
||||
|
||||
export class HttpError {
|
||||
constructor(private readonly error: HttpErrorResponse) {}
|
||||
|
||||
readonly code = this.error.status
|
||||
readonly message = this.error.statusText
|
||||
|
||||
constructor(private readonly error: HttpErrorResponse) {}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { RPCErrorDetails } from '../types/rpc.types'
|
||||
|
||||
export class RpcError {
|
||||
constructor(private readonly error: RPCErrorDetails) {}
|
||||
|
||||
readonly code = this.error.code
|
||||
readonly message = this.getMessage()
|
||||
|
||||
constructor(private readonly error: RPCErrorDetails) {}
|
||||
|
||||
private getMessage(): string {
|
||||
let message: string
|
||||
|
||||
|
||||
@@ -46,13 +46,6 @@ export class ResponsiveColViewportDirective extends Observable<Step> {
|
||||
@Input()
|
||||
responsiveColViewport: Observable<Step> | '' = ''
|
||||
|
||||
private readonly stream$ = this.resize$.pipe(
|
||||
map(() => this.elementRef.nativeElement.clientWidth),
|
||||
map(width => this.breakpoints.find(([step]) => width >= step)?.[1] || 'xs'),
|
||||
distinctUntilChanged(),
|
||||
tuiZonefree(this.zone),
|
||||
)
|
||||
|
||||
constructor(
|
||||
@Inject(BREAKPOINTS)
|
||||
private readonly breakpoints: readonly [number, Step][],
|
||||
@@ -64,4 +57,11 @@ export class ResponsiveColViewportDirective extends Observable<Step> {
|
||||
(this.responsiveColViewport || this.stream$).subscribe(subscriber),
|
||||
)
|
||||
}
|
||||
|
||||
private readonly stream$ = this.resize$.pipe(
|
||||
map(() => this.elementRef.nativeElement.clientWidth),
|
||||
map(width => this.breakpoints.find(([step]) => width >= step)?.[1] || 'xs'),
|
||||
distinctUntilChanged(),
|
||||
tuiZonefree(this.zone),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user