-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* [ACS-8312] Display warning about losing response * [ACS-8312] Display warning about losing response - fixes
- Loading branch information
1 parent
20c4bfe
commit 135cf10
Showing
10 changed files
with
231 additions
and
89 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
22 changes: 14 additions & 8 deletions
22
lib/core/src/lib/dialogs/unsaved-changes-dialog/unsaved-changes-dialog.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,29 +1,35 @@ | ||
<h1 mat-dialog-title class="adf-unsaved-changes-dialog-title"> | ||
{{ 'CORE.DIALOG.UNSAVED_CHANGES.TITLE' | translate }} | ||
<h1 mat-dialog-title class="adf-unsaved-changes-dialog-header"> | ||
{{ dialogData.headerText | translate }} | ||
<button | ||
data-automation-id="adf-unsaved-changes-dialog-close-button" | ||
class="adf-unsaved-changes-dialog-header-close-button" | ||
mat-icon-button | ||
[title]="'CLOSE' | translate" | ||
[mat-dialog-close]="false"> | ||
<mat-icon>close</mat-icon> | ||
</button> | ||
</h1> | ||
<mat-dialog-content> | ||
{{ 'CORE.DIALOG.UNSAVED_CHANGES.DESCRIPTION' | translate }} | ||
<mat-dialog-content class="adf-unsaved-changes-dialog-content"> | ||
{{ dialogData.descriptionText | translate }} | ||
<div class="adf-unsaved-changes-dialog-content-checkbox" *ngIf="dialogData.checkboxText.length"> | ||
<mat-checkbox data-automation-id="adf-unsaved-changes-dialog-content-checkbox" | ||
(change)="onToggleCheckboxPreferences($event)" | ||
>{{ dialogData.checkboxText | translate }}</mat-checkbox> | ||
</div> | ||
</mat-dialog-content> | ||
<mat-dialog-actions align="end"> | ||
<mat-dialog-actions align="end" class="adf-unsaved-changes-dialog-actions"> | ||
<button | ||
data-automation-id="adf-unsaved-changes-dialog-cancel-button" | ||
mat-button | ||
[mat-dialog-close]="false" | ||
class="adf-unsaved-changes-dialog-cancel-button"> | ||
class="adf-unsaved-changes-dialog-actions-cancel-button"> | ||
{{ 'CANCEL' | translate | titlecase }} | ||
</button> | ||
<button | ||
data-automation-id="adf-unsaved-changes-dialog-discard-changes-button" | ||
mat-button | ||
[mat-dialog-close]="true" | ||
class="adf-unsaved-changes-dialog-discard-changes-button"> | ||
{{ 'CORE.DIALOG.UNSAVED_CHANGES.DISCARD_CHANGES_BUTTON' | translate }} | ||
class="adf-unsaved-changes-dialog-actions-discard-changes-button"> | ||
{{ dialogData.confirmButtonText | translate }} | ||
</button> | ||
</mat-dialog-actions> |
69 changes: 48 additions & 21 deletions
69
lib/core/src/lib/dialogs/unsaved-changes-dialog/unsaved-changes-dialog.component.scss
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,33 +1,60 @@ | ||
adf-unsaved-changes-dialog { | ||
margin-top: -4px; | ||
display: block; | ||
|
||
.adf-unsaved-changes-dialog { | ||
.adf-unsaved-changes-dialog { | ||
&-title { | ||
&-header { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
font-size: 16px; | ||
font-weight: bold; | ||
} | ||
font-size: 18px; | ||
font-weight: 700; | ||
margin-bottom: 16px; | ||
height: 24px; | ||
|
||
&-close-button { | ||
margin-right: -16px; | ||
margin-bottom: 2px; | ||
} | ||
|
||
&-cancel-button { | ||
background-color: var(--adf-secondary-button-background); | ||
margin-right: 4px; | ||
&::before { | ||
display: none; | ||
} | ||
} | ||
|
||
&-discard-changes-button { | ||
color: var(--theme-warn-color-default-contrast); | ||
background-color: var(--adf-error-color); | ||
min-width: 143px; | ||
&-content { | ||
padding: 0 8px 0 0; | ||
overflow: unset; | ||
color: var(--adf-secondary-modal-text-color); | ||
|
||
&-checkbox { | ||
margin-top: 20px; | ||
|
||
label { | ||
color: var(--adf-secondary-modal-text-color); | ||
} | ||
} | ||
} | ||
|
||
&-cancel-button, | ||
&-discard-changes-button { | ||
padding: 4px 14px; | ||
height: 32px; | ||
display: flex; | ||
align-items: center; | ||
&-actions { | ||
margin-top: 18px; | ||
margin-bottom: 4px; | ||
padding: 0; | ||
|
||
&-cancel-button { | ||
background-color: var(--adf-secondary-button-background); | ||
margin-right: 4px; | ||
} | ||
|
||
&-discard-changes-button { | ||
color: white; | ||
background-color: var(--adf-error-color); | ||
} | ||
|
||
&-cancel-button, | ||
&-discard-changes-button { | ||
padding: 4px 12px; | ||
height: 32px; | ||
display: flex; | ||
align-items: center; | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.