Skip to content

Commit

Permalink
Merge pull request #392 from dcsaorg/APVCV-591
Browse files Browse the repository at this point in the history
APVCV-591
  • Loading branch information
Abdiiir committed Jun 19, 2023
2 parents 0a35ca7 + 7c4e42d commit ab473c6
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/app/view/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<div class="col-1">
<img class="header__logo" src="assets/DCSA_logo_color_on_dark_background.png">
</div>
<div class="col-3 header__menuEntryDiv">
<div class="col-2 header__menuEntryDiv">
<button type="button" pButton pRipple icon="pi pi-bars" label="Menu" (click)="menu.toggle($event)"></button>
<p-menu #menu [popup]="true" [model]="helpMenu"></p-menu>

</div>
<div class="col-1 center-button-in-div" *ngIf="this.authLocalState">
<amplify-sign-out></amplify-sign-out>
<div class="col-1 center-button-in-div">
<button class="button-sign-out" type="button" appDebounceClick (debounceClick)="signOut()" [debounceTime]="300">Sign Out</button>
</div>

<div class="col-1 header__menuLabel">
Expand Down
40 changes: 40 additions & 0 deletions src/app/view/header/header.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,43 @@ p-dropdown::ng-deep {
.center-button-in-div{
margin:auto;
}

button.button-sign-out {
--background-color: #ff9900;
--border-width: 0;
--border-color: initial;
--border-style: initial;
--border-radius: initial;
width: auto;
min-width: auto;
display: inline-block;
margin-bottom: 0;
font-size: var(--amplify-text-sm);
font-family: var(--amplify-font-family);
font-weight: 600;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
padding: 0.5rem ;
letter-spacing: 0.75px;
text-transform: uppercase;
border-width: var(--border-width);
border-color: var(--border-color);
border-style: var(--border-style);
border-radius: var(--border-radius);
color: #F8F7F7;
text-align: center;
background-color: var(--background-color);
border: 1px solid background-color;
padding: 0.5rem 0.75rem;
font-size: 10pt;
height: 39px;
border-radius: 4px;
}
4 changes: 4 additions & 0 deletions src/app/view/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { TranslateService } from "@ngx-translate/core";
import { Globals } from "../../model/portCall/globals";
import { ExportService } from "../../controller/services/base/export.service";
import {take} from "rxjs";
import Auth from '@aws-amplify/auth';

@Component({
selector: 'app-header',
Expand Down Expand Up @@ -78,6 +79,9 @@ export class HeaderComponent implements OnInit {
this.displayDownloadRequest = true;
}

signOut() {
Auth.signOut();
}

downloadTimestamps() {
this.downloadProgressing = true;
Expand Down
6 changes: 3 additions & 3 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@
}
},
"Rejecteditor": {
"label": "Reject Timestamp",
"label": "Create Timestamp",
"failure": {
"summary": "Error!",
"detail": "Error while rejecting timestamp: "
"detail": "Error while creating timestamp: "
},
"success": {
"detail": "Successfully rejected timestamp",
"detail": "Successfully created timestamp",
"summary": "Success!"
}
},
Expand Down

0 comments on commit ab473c6

Please sign in to comment.