mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-15 21:56:18 -08:00
refactor: style and code improvements
This commit is contained in:
1 parent
53bcbf7147
commit
55e160da76
12 files changed
+147
-101
No files matched your search
@@ -225,18 +225,26 @@ export class XtreamMainContainerComponent implements OnInit {
|
||||
}
|
||||
|
||||
handleResponse(response: XtreamResponse) {
|
||||
if ((response.payload as any)?.user_info?.status === 'Expired') {
|
||||
if (!response.payload) {
|
||||
this.errorViewInfo = {
|
||||
title: 'PORTALS.ERROR_VIEW.ACCOUNT_EXPIRED.TITLE',
|
||||
message: 'PORTALS.ERROR_VIEW.ACCOUNT_EXPIRED.DESCRIPTION',
|
||||
};
|
||||
this.currentLayout = 'error-view';
|
||||
} else if ((response.payload as any)?.user_info?.auth === 0) {
|
||||
this.errorViewInfo = {
|
||||
title: 'PORTALS.ERROR_VIEW.UNAUTHORIZED.TITLE',
|
||||
message: 'PORTALS.ERROR_VIEW.UNAUTHORIZED.DESCRIPTION',
|
||||
title: 'PORTALS.ERROR_VIEW.UNKNOWN_ERROR.TITLE',
|
||||
message: 'PORTALS.ERROR_VIEW.UNKNOWN_ERROR.DESCRIPTION',
|
||||
};
|
||||
this.currentLayout = 'error-view';
|
||||
} else {
|
||||
if ((response.payload as any)?.user_info?.status === 'Expired') {
|
||||
this.errorViewInfo = {
|
||||
title: 'PORTALS.ERROR_VIEW.ACCOUNT_EXPIRED.TITLE',
|
||||
message: 'PORTALS.ERROR_VIEW.ACCOUNT_EXPIRED.DESCRIPTION',
|
||||
};
|
||||
this.currentLayout = 'error-view';
|
||||
} else if ((response.payload as any)?.user_info?.auth === 0) {
|
||||
this.errorViewInfo = {
|
||||
title: 'PORTALS.ERROR_VIEW.UNAUTHORIZED.TITLE',
|
||||
message: 'PORTALS.ERROR_VIEW.UNAUTHORIZED.DESCRIPTION',
|
||||
};
|
||||
this.currentLayout = 'error-view';
|
||||
}
|
||||
}
|
||||
|
||||
switch (response.action) {
|
||||
|
||||
Reference in new issue
Block a user