diff --git a/apps/web/src/app/xtream-tauri/category-content-view/category-content-view.component.ts b/apps/web/src/app/xtream-tauri/category-content-view/category-content-view.component.ts index 655bcfd9e..a3d087914 100644 --- a/apps/web/src/app/xtream-tauri/category-content-view/category-content-view.component.ts +++ b/apps/web/src/app/xtream-tauri/category-content-view/category-content-view.component.ts @@ -46,7 +46,11 @@ export class CategoryContentViewComponent implements OnInit { ngOnInit() { const { categoryId } = this.activatedRoute.snapshot.params; - if (categoryId) this.store.setSelectedCategory(categoryId); + // Only set category if it's different from the currently selected one + // This preserves the page state when navigating back from detail view + if (categoryId && this.store.selectedCategoryId() !== Number(categoryId)) { + this.store.setSelectedCategory(categoryId); + } } onPageChange(event: PageEvent) { diff --git a/apps/web/src/app/xtream-tauri/xtream-main-container.component.ts b/apps/web/src/app/xtream-tauri/xtream-main-container.component.ts index 4e3a4b4cf..1306998a7 100644 --- a/apps/web/src/app/xtream-tauri/xtream-main-container.component.ts +++ b/apps/web/src/app/xtream-tauri/xtream-main-container.component.ts @@ -53,9 +53,19 @@ export class XtreamMainContainerComponent implements OnInit { return this.translateService.instant('PORTALS.SELECT_CATEGORY'); } else { const selectedCategory = this.xtreamStore.getSelectedCategory(); - return selectedCategory - ? `Content for ${(selectedCategory as any).name}` + const categoryName = selectedCategory + ? (selectedCategory as any).name : 'Category Content'; + + // Show page number when viewing category content (not detail view) + if (!this.xtreamStore.selectedItem() && this.xtreamStore.getTotalPages() > 1) { + const currentPage = this.xtreamStore.page() + 1; // +1 because page is 0-indexed + const totalPages = this.xtreamStore.getTotalPages(); + const pageLabel = this.translateService.instant('PORTALS.PAGE'); + return `${categoryName} (${pageLabel} ${currentPage}/${totalPages})`; + } + + return `Content for ${categoryName}`; } } diff --git a/apps/web/src/assets/i18n/de.json b/apps/web/src/assets/i18n/de.json index a97d8b5f7..ca2f0622f 100644 --- a/apps/web/src/assets/i18n/de.json +++ b/apps/web/src/assets/i18n/de.json @@ -310,7 +310,9 @@ "NO_SEARCH_RESULTS": "Nichts gefunden. Versuchen Sie, Ihre Suchanfrage zu ändern" }, "REMOVED_FROM_FAVORITES": "Aus den Favoriten entfernt", - "ADDED_TO_FAVORITES": "Zu den Favoriten hinzugefügt" + "ADDED_TO_FAVORITES": "Zu den Favoriten hinzugefügt", + "SELECT_CATEGORY": "Wählen Sie eine Kategorie aus", + "PAGE": "Seite" }, "ABOUT": { "TITLE": "Über IPTVnator", diff --git a/apps/web/src/assets/i18n/en.json b/apps/web/src/assets/i18n/en.json index 658bf4f2a..b587a74a5 100644 --- a/apps/web/src/assets/i18n/en.json +++ b/apps/web/src/assets/i18n/en.json @@ -363,7 +363,8 @@ }, "STREAM_URL_COPIED": "Stream URL copied to clipboard", "COPY_STREAM_URL": "Copy Stream URL", - "SELECT_CATEGORY": "Select a category" + "SELECT_CATEGORY": "Select a category", + "PAGE": "Page" }, "INFORMATION": "Information", "REMOTE_CONTROL": { diff --git a/apps/web/src/assets/i18n/ru.json b/apps/web/src/assets/i18n/ru.json index f363a9341..b69f2fccb 100644 --- a/apps/web/src/assets/i18n/ru.json +++ b/apps/web/src/assets/i18n/ru.json @@ -306,7 +306,9 @@ "NO_SEARCH_RESULTS": "Ничего не найдено, попробуйте изменить поисковый запрос" }, "REMOVED_FROM_FAVORITES": "Удалено из избранного", - "ADDED_TO_FAVORITES": "Добавлено в избранное" + "ADDED_TO_FAVORITES": "Добавлено в избранное", + "SELECT_CATEGORY": "Выберите категорию", + "PAGE": "Страница" }, "INFORMATION": "Инфо" } \ No newline at end of file diff --git a/libs/ui/shared-portals/src/lib/live-stream-layout/live-stream-layout.component.html b/libs/ui/shared-portals/src/lib/live-stream-layout/live-stream-layout.component.html index c580d133b..6e2b5e17f 100644 --- a/libs/ui/shared-portals/src/lib/live-stream-layout/live-stream-layout.component.html +++ b/libs/ui/shared-portals/src/lib/live-stream-layout/live-stream-layout.component.html @@ -26,7 +26,7 @@ - @if (player === 'videojs' || player === 'html5') { @if (streamUrl) { -
- -
- } } @if (streamUrl) { -
-
- + @if (player === 'videojs' || player === 'html5') { + @if (streamUrl) { +
+ +
+ } + } + @if (streamUrl) { +
+
+ +
-
} @else { -
Please select a channel
+
+ {{ 'PORTALS.SELECT_CATEGORY' | translate }} +
}