Skip to content

Commit

Permalink
feat: current workspace topic usage adjusted (#463)
Browse files Browse the repository at this point in the history
* feat: current workspace topic usage adjusted

* fix: fix linting issues

* fix: reverted publish props

---------

Co-authored-by: markuczy <[email protected]>
Co-authored-by: Henry Täschner <[email protected]>
  • Loading branch information
3 people authored Jan 20, 2025
1 parent 318a8f2 commit 08a9ad1
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions src/app/shell/components/not-found-page.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component } from '@angular/core'
import { AppStateService } from '@onecx/angular-integration-interface'
import { Workspace } from '@onecx/integration-interface'
import { Observable } from 'rxjs'

@Component({
template: `
Expand All @@ -9,22 +10,24 @@ import { Workspace } from '@onecx/integration-interface'
<h1 class="md:text-xl text-lg">{{ 'NOT_FOUND_PAGE.TITLE' | translate }}</h1>
<p class="">{{ 'NOT_FOUND_PAGE.DETAILS' | translate }}</p>
</div>
<button
pButton
[routerLink]="[workspace?.baseUrl]"
class="w-max"
[ariaLabel]="'NOT_FOUND_PAGE.ACTION' | translate"
[pTooltip]="'NOT_FOUND_PAGE.ACTION.TOOLTIP' | translate"
tooltipPosition="top"
tooltipEvent="hover"
>
{{ 'NOT_FOUND_PAGE.ACTION' | translate }}
</button>
<ng-container *ngIf="workspace$ | async as workspace">
<button
pButton
[routerLink]="[workspace.baseUrl]"
class="w-max"
[ariaLabel]="'NOT_FOUND_PAGE.ACTION' | translate"
[pTooltip]="'NOT_FOUND_PAGE.ACTION.TOOLTIP' | translate"
tooltipPosition="top"
tooltipEvent="hover"
>
{{ 'NOT_FOUND_PAGE.ACTION' | translate }}
</button>
</ng-container>
</div>
`
})
export class PageNotFoundComponent {
workspace: Workspace | undefined
workspace$: Observable<Workspace>
constructor(private readonly appStateService: AppStateService) {
this.appStateService.currentMfe$.publish({
appId: '',
Expand All @@ -34,6 +37,6 @@ export class PageNotFoundComponent {
shellName: 'portal',
productName: ''
})
this.workspace = this.appStateService.currentWorkspace$.getValue()
this.workspace$ = this.appStateService.currentWorkspace$.asObservable()
}
}

0 comments on commit 08a9ad1

Please sign in to comment.