-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(stark-ui): implement
stark-session-card
in stark session pages
ISSUES CLOSED: #718 BREAKING CHANGE: Refactor of Session Pages (login / logout / sessionExpired / preloading). - **stark-ui:** css on these components to change the default Stark logo will no longer work and should be refactored. For example adding this to `src/styles/styles.scss` ```SCSS .stark-app-logo i { background-image: url("/assets/path-to-your-logo.png"); background-size: contain; } ```
- Loading branch information
1 parent
4a1db25
commit debe387
Showing
12 changed files
with
92 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 12 additions & 17 deletions
29
packages/stark-ui/src/modules/session-ui/pages/login/login-page.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
<div class="stark-session-ui-page" role="alertdialog" aria-busy="true" aria-live="assertive"> | ||
<header><i></i></header> | ||
<content> | ||
<h2 class="dialog-title" translate>STARK.LOGIN.TITLE</h2> | ||
<div *ngIf="userProfilesAvailable()"> | ||
<ul> | ||
<li *ngFor="let user of users; trackBy: trackItemFn"> | ||
<a (click)="authenticateUser(user)"> | ||
<h3>{{ user.firstName }} {{ user.lastName }}</h3> | ||
<p>({{ getUserRoles(user) }})</p> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
<div *ngIf="!userProfilesAvailable()" translate>STARK.LOGIN.NO_PROFILE</div> | ||
</content> | ||
</div> | ||
<stark-session-card cardTitle="STARK.LOGIN.TITLE"> | ||
<mat-list *ngIf="userProfilesAvailable()"> | ||
<ng-container *ngFor="let user of users; trackBy: trackItemFn; let i = index"> | ||
<a mat-list-item (click)="authenticateUser(user)"> | ||
<h3 mat-line>{{ user.firstName }} {{ user.lastName }}</h3> | ||
<p mat-line>({{ getUserRoles(user) }})</p> | ||
</a> | ||
<mat-divider *ngIf="i !== users.length - 1"></mat-divider> | ||
</ng-container> | ||
</mat-list> | ||
<div *ngIf="!userProfilesAvailable()" translate>STARK.LOGIN.NO_PROFILE</div> | ||
</stark-session-card> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 13 additions & 23 deletions
36
packages/stark-ui/src/modules/session-ui/pages/preloading/preloading-page.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,13 @@ | ||
<div class="stark-session-ui-page" role="alertdialog" aria-busy="true" aria-live="assertive"> | ||
<header><i></i></header> | ||
<content> | ||
<div *ngIf="!userFetchingFailed"> | ||
<div class="stark-loading-icon"></div> | ||
<h1 translate>STARK.PRELOADING.FETCHING_USER_PROFILE</h1> | ||
</div> | ||
<div *ngIf="userFetchingFailed"> | ||
<h2 translate>STARK.PRELOADING.FETCHING_USER_PROFILE_FAILURE</h2> | ||
<h2 translate>STARK.PRELOADING.CONTACT_IT_SUPPORT</h2> | ||
<h3><span translate>STARK.PRELOADING.CORRELATION_ID</span>: {{ correlationId }}</h3> | ||
<button | ||
mat-button | ||
mat-raised-button | ||
color="primary" | ||
(click)="reload()" | ||
[attr.aria-label]="'STARK.PRELOADING.RELOAD' | translate" | ||
> | ||
<span translate>STARK.PRELOADING.RELOAD</span> | ||
</button> | ||
</div> | ||
</content> | ||
</div> | ||
<stark-session-card [cardTitle]="userFetchingFailed && 'STARK.PRELOADING.FETCHING_USER_PROFILE_FAILURE'" aria-busy="true" aria-live="polite"> | ||
<ng-container *ngIf="!userFetchingFailed"> | ||
<div class="stark-loading-icon"></div> | ||
<h1 translate>STARK.PRELOADING.FETCHING_USER_PROFILE</h1> | ||
</ng-container> | ||
<ng-container *ngIf="userFetchingFailed"> | ||
<h2 translate>STARK.PRELOADING.CONTACT_IT_SUPPORT</h2> | ||
<h3><span translate>STARK.PRELOADING.CORRELATION_ID</span>: {{ correlationId }}</h3> | ||
<button mat-button mat-raised-button color="primary" (click)="reload()" [attr.aria-label]="'STARK.PRELOADING.RELOAD' | translate"> | ||
<span translate>STARK.PRELOADING.RELOAD</span> | ||
</button> | ||
</ng-container> | ||
</stark-session-card> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 6 additions & 17 deletions
23
...stark-ui/src/modules/session-ui/pages/session-expired/session-expired-page.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,7 @@ | ||
<div class="stark-session-ui-page" role="alertdialog" aria-busy="true" aria-live="assertive"> | ||
<header><i></i></header> | ||
<content> | ||
<h2 translate>STARK.SESSION_EXPIRED.TITLE</h2> | ||
<stark-session-card cardTitle="STARK.SESSION_EXPIRED.TITLE"> | ||
<p class="md-body-1" translate>STARK.SESSION_EXPIRED.MESSAGE</p> | ||
|
||
<p class="md-body-1" translate>STARK.SESSION_EXPIRED.MESSAGE</p> | ||
|
||
<button | ||
color="primary" | ||
mat-button | ||
mat-raised-button | ||
(click)="reload()" | ||
[attr.aria-label]="'STARK.SESSION_EXPIRED.RELOAD' | translate" | ||
> | ||
<span translate>STARK.SESSION_EXPIRED.RELOAD</span> | ||
</button> | ||
</content> | ||
</div> | ||
<button color="primary" mat-button mat-raised-button (click)="reload()" [attr.aria-label]="'STARK.SESSION_EXPIRED.RELOAD' | translate"> | ||
<span translate>STARK.SESSION_EXPIRED.RELOAD</span> | ||
</button> | ||
</stark-session-card> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 5 additions & 10 deletions
15
...s/stark-ui/src/modules/session-ui/pages/session-logout/session-logout-page.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
<div class="stark-session-ui-page" role="alertdialog" aria-busy="true" aria-live="assertive"> | ||
<header><i></i></header> | ||
<content> | ||
<h2 translate>STARK.SESSION_LOGOUT.TITLE</h2> | ||
|
||
<button mat-button mat-raised-button color="primary" (click)="logon()" [attr.aria-label]="'STARK.SESSION_LOGOUT.LOGIN' | translate"> | ||
<span translate>STARK.SESSION_LOGOUT.LOGIN</span> | ||
</button> | ||
</content> | ||
</div> | ||
<stark-session-card cardTitle="STARK.SESSION_LOGOUT.TITLE"> | ||
<button mat-button mat-raised-button color="primary" (click)="logon()" [attr.aria-label]="'STARK.SESSION_LOGOUT.LOGIN' | translate"> | ||
<span translate>STARK.SESSION_LOGOUT.LOGIN</span> | ||
</button> | ||
</stark-session-card> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters