mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-11 02:46:16 -08:00
feat(stalker): protocol-correct auth lifecycle (#1354)
This commit is contained in:
1 parent
e197409b10
commit
d2a83164ec
56 files changed
+4807
-709
No files matched your search
+1
-3
@@ -157,9 +157,7 @@
|
||||
} @else if (isStalkerCategoryFailed()) {
|
||||
<app-workspace-context-error-view
|
||||
[title]="'WORKSPACE.CONTEXT.LOAD_CATEGORIES_ERROR' | translate"
|
||||
[description]="
|
||||
'WORKSPACE.CONTEXT.LOAD_CATEGORIES_ERROR_HINT' | translate
|
||||
"
|
||||
[description]="stalkerCategoryErrorDescription()"
|
||||
[showActionButtons]="false"
|
||||
/>
|
||||
} @else {
|
||||
|
||||
+26
-1
@@ -17,7 +17,10 @@ import { MatMenuModule } from '@angular/material/menu';
|
||||
import { MatTooltip } from '@angular/material/tooltip';
|
||||
import { Router } from '@angular/router';
|
||||
import { TranslatePipe, TranslateService } from '@ngx-translate/core';
|
||||
import { StalkerStore } from '@iptvnator/portal/stalker/data-access';
|
||||
import {
|
||||
StalkerStore,
|
||||
asStalkerPortalError,
|
||||
} from '@iptvnator/portal/stalker/data-access';
|
||||
import {
|
||||
PortalCategorySortMode,
|
||||
persistPortalCategorySortMode,
|
||||
@@ -152,6 +155,28 @@ export class WorkspaceContextPanelComponent {
|
||||
this.stalkerStore.isCategoryResourceLoading;
|
||||
readonly isStalkerCategoryFailed =
|
||||
this.stalkerStore.isCategoryResourceFailed;
|
||||
/**
|
||||
* When category loading failed because the portal refused the session,
|
||||
* the portal's own explanation (msg/block_msg or the documented
|
||||
* plain-text failure body) replaces the generic hint; a login-required
|
||||
* refusal gets its own actionable text.
|
||||
*/
|
||||
readonly stalkerCategoryErrorDescription = computed(() => {
|
||||
const portalError = asStalkerPortalError(
|
||||
this.isStalkerCategoryFailed()
|
||||
);
|
||||
if (portalError?.portalText) {
|
||||
return portalError.portalText;
|
||||
}
|
||||
if (portalError?.kind === 'login-required') {
|
||||
return this.translate.instant(
|
||||
'PORTALS.ERROR_VIEW.STALKER_LOGIN_REQUIRED'
|
||||
);
|
||||
}
|
||||
return this.translate.instant(
|
||||
'WORKSPACE.CONTEXT.LOAD_CATEGORIES_ERROR_HINT'
|
||||
);
|
||||
});
|
||||
// Category count badges are only available for Stalker Live TV, where the
|
||||
// full channel list is cached — VOD/series/radio still page lazily, so
|
||||
// their per-category totals are unknown.
|
||||
|
||||
Reference in new issue
Block a user