feat(ui): Sync UI tab state with URL and update routes/links

This commit is contained in:
2025-11-26 18:34:29 +00:00
parent b36552aef2
commit be92d93f3f
9 changed files with 117 additions and 31 deletions

View File

@@ -1,4 +1,5 @@
import { Component, inject, signal, computed, OnInit, OnDestroy, ViewChild, ElementRef, effect } from '@angular/core';
import { Location } from '@angular/common';
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { ApiService } from '../../core/services/api.service';
@@ -58,7 +59,7 @@ import {
<div class="space-y-6">
<!-- Header -->
<div>
<a routerLink="/services" class="text-sm text-muted-foreground hover:text-foreground inline-flex items-center gap-1 mb-2">
<a (click)="goBack()" class="cursor-pointer text-sm text-muted-foreground hover:text-foreground inline-flex items-center gap-1 mb-2">
<svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7" />
</svg>
@@ -422,6 +423,7 @@ import {
`,
})
export class ServiceDetailComponent implements OnInit, OnDestroy {
private location = inject(Location);
private route = inject(ActivatedRoute);
private router = inject(Router);
private api = inject(ApiService);
@@ -479,6 +481,10 @@ export class ServiceDetailComponent implements OnInit, OnDestroy {
}
}
goBack(): void {
this.location.back();
}
ngOnDestroy(): void {
this.logStream.disconnect();
}