@c8y/login 1023.82.4 → 1023.82.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@c8y/login",
3
- "version": "1023.82.4",
3
+ "version": "1023.82.8",
4
4
  "description": "This package is used to scaffold a login application for Cumulocity IoT.",
5
5
  "dependencies": {
6
6
  "@angular/cdk": "^20.2.14",
7
- "@c8y/bootstrap": "1023.82.4",
8
- "@c8y/client": "1023.82.4",
9
- "@c8y/ngx-components": "1023.82.4",
10
- "@c8y/style": "1023.82.4",
7
+ "@c8y/bootstrap": "1023.82.8",
8
+ "@c8y/client": "1023.82.8",
9
+ "@c8y/ngx-components": "1023.82.8",
10
+ "@c8y/style": "1023.82.8",
11
11
  "monaco-editor": "~0.53.0",
12
12
  "ngx-bootstrap": "20.0.2",
13
13
  "rxjs": "7.8.2"
14
14
  },
15
15
  "devDependencies": {
16
- "@c8y/devkit": "1023.82.4",
17
- "@c8y/options": "1023.82.4"
16
+ "@c8y/devkit": "1023.82.8",
17
+ "@c8y/options": "1023.82.8"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@angular/common": ">=20 <21"
@@ -91,6 +91,23 @@
91
91
  <c8y-tenant-id-setup (onChangeView)="handleLoginTemplate($event)"></c8y-tenant-id-setup>
92
92
  }
93
93
  @case (LOGIN_VIEWS.MissingApplicationAccess) {
94
+ <span class="{{ platformAnimationSrc ? '' : 'text-center' }}">
95
+ <h3
96
+ class="m-b-8 d-flex a-i-center"
97
+ translate
98
+ >
99
+ <i class="dlt-c8y-icon-warning text-warning m-r-8"></i>
100
+ <strong>Access not available</strong>
101
+ </h3>
102
+ <p
103
+ class="text-16 m-b-40"
104
+ translate
105
+ >
106
+ Your account doesn't have permission to open this application. Switch to an
107
+ available application below, log out, or contact your administrator to request
108
+ access.
109
+ </p>
110
+ </span>
94
111
  <c8y-missing-application-access></c8y-missing-application-access>
95
112
  }
96
113
  }
@@ -1,2 +1,10 @@
1
- <c8y-app-switcher-inline
2
- ></c8y-app-switcher-inline>
1
+ <c8y-app-switcher-inline></c8y-app-switcher-inline>
2
+
3
+ <button
4
+ class="btn btn-primary btn-lg btn-block m-t-16"
5
+ title="{{ 'Logout' | translate }}"
6
+ (click)="logout()"
7
+ >
8
+ <i [c8yIcon]="'logout'"></i>
9
+ {{ 'Logout' | translate }}
10
+ </button>
@@ -1,21 +1,17 @@
1
1
  import { Component, inject } from '@angular/core';
2
- import { AppSwitcherInlineComponent, AlertService } from '@c8y/ngx-components';
3
- import { gettext } from '@c8y/ngx-components/gettext';
2
+ import { AppSwitcherInlineComponent, C8yTranslatePipe, IconDirective } from '@c8y/ngx-components';
3
+ import { LoginService } from '../login.service';
4
4
 
5
5
  @Component({
6
6
  selector: 'c8y-missing-application-access',
7
7
  templateUrl: './missing-application-access.component.html',
8
8
  standalone: true,
9
- imports: [AppSwitcherInlineComponent]
9
+ imports: [AppSwitcherInlineComponent, C8yTranslatePipe, IconDirective]
10
10
  })
11
11
  export class MissingApplicationAccessComponent {
12
- private alertService = inject(AlertService);
12
+ private loginService = inject(LoginService);
13
13
 
14
- constructor() {
15
- this.alertService.warning(
16
- gettext(
17
- `The application you've been trying to access is not available. Verify if you have the required permissions to access this application.`
18
- )
19
- );
14
+ logout() {
15
+ this.loginService.logout();
20
16
  }
21
17
  }