Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New alert tweaks #2425

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,24 +98,12 @@
Deactivate ORCID account
</button>
</div>
<div
*ngIf="deactivatedEmail"
class="info margin-bottom-16"
[ngClass]="{
'orc-font-body-small': !isMobile,
'orc-font-small-print': isMobile
}"
>
<div>
<mat-icon class="large-material-icon">info</mat-icon>
<app-alert-message *ngIf="deactivatedEmail">
<div content>
<ng-container i18n="@@account.andEmailDeactivateWasSend">
An account deactivation email has been sent to
</ng-container>
<strong> {{ deactivatedEmail }} </strong>
</div>
<div class="col l11 m6 s3">
<div>
<ng-container i18n="@@account.andEmailDeactivateWasSend">
An account deactivation email has been sent to
</ng-container>
<strong> {{ deactivatedEmail }} </strong>
</div>
</div>
</div>
</app-alert-message>
</app-settings-panels-data>
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@ ul {
margin-top: 16px;
}

.info {
padding: 16px;
app-alert-message {
margin-top: 16px;
margin-bottom: 16px;
border: solid 2px;
border-radius: 4px;
display: flex;

p {
margin: 0;
}
margin-bottom: 8px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,6 @@
$warn: map-get($theme, accent);
$foreground: map-get($theme, foreground);
$background: map-get($theme, background);

.info {
border-color: mat.get-color-from-palette(
$foreground,
'state-notice-dark'
) !important;

mat-icon {
color: mat.get-color-from-palette(
$foreground,
'state-notice-dark'
) !important;
}
}
}

@include settings-defaults-email-frequency($orcid-app-theme);
Original file line number Diff line number Diff line change
@@ -1,73 +1,64 @@
<div class="info" aria-live="polite">
<div>
<mat-icon class="large-material-icon material-symbols-outlined"
>error</mat-icon
>
</div>
<div class="content">
<app-alert-message>
<div content class="content">
<div>
<p>
<ng-container *ngIf="showUnclaimedError || showDeactivatedError">
<ng-container i18n="@@register.theEmailAddress" *ngIf="isEmail">
The email address
</ng-container>
<ng-container i18n="@@ngOrcid.signin.theOrcidId" *ngIf="!isEmail">
The Orcid iD
</ng-container>
<strong>{{ email }}</strong>
<ng-container i18n="@@register.isAssociatedWith"
>is already associated with
<ng-container *ngIf="showUnclaimedError || showDeactivatedError">
<ng-container i18n="@@register.theEmailAddress" *ngIf="isEmail">
The email address
</ng-container>
<ng-container i18n="@@ngOrcid.signin.theOrcidId" *ngIf="!isEmail">
The Orcid iD
</ng-container>
<strong>{{ email }}</strong>
<ng-container i18n="@@register.isAssociatedWith"
>is already associated with
</ng-container>
<ng-container i18n="@@register.anUnclaimed" *ngIf="showUnclaimedError"
>an unclaimed
</ng-container>
<ng-container
i18n="@@register.aDeactivated"
*ngIf="showDeactivatedError"
>a deactivated
</ng-container>
<ng-container i18n="@@register.orcidRecord">ORCID record.</ng-container>
<i *ngIf="showUnclaimedError">
<ng-container
i18n="@@ngOrcid.signin.cannotSignInToOrcid"
*ngIf="isEmail"
>
You cannot sign in to ORCID with this email address until you have
claimed the record.
</ng-container>
<ng-container i18n="@@register.anUnclaimed" *ngIf="showUnclaimedError"
>an unclaimed
<ng-container
i18n="@@ngOrcid.signin.cannotSignInToOrcidWithId"
*ngIf="!isEmail"
>
You cannot sign in to ORCID with this iD until you have claimed the
record.
</ng-container>
</i>
<i *ngIf="showDeactivatedError">
<ng-container
i18n="@@register.aDeactivated"
*ngIf="showDeactivatedError"
>a deactivated
i18n="@@ngOrcid.signin.needToReactivateAccount"
*ngIf="isEmail"
>
You will need to reactivate the account before you can sign in with
this email address.
</ng-container>
<ng-container i18n="@@register.orcidRecord"
>ORCID record.</ng-container
<ng-container
i18n="@@ngOrcid.signin.needToReactivateToSigInWithId"
*ngIf="!isEmail"
>
<i *ngIf="showUnclaimedError">
<ng-container
i18n="@@ngOrcid.signin.cannotSignInToOrcid"
*ngIf="isEmail"
>
You cannot sign in to ORCID with this email address until you have
claimed the record.
</ng-container>
<ng-container
i18n="@@ngOrcid.signin.cannotSignInToOrcidWithId"
*ngIf="!isEmail"
>
You cannot sign in to ORCID with this iD until you have claimed
the record.
</ng-container>
</i>
<i *ngIf="showDeactivatedError">
<ng-container
i18n="@@ngOrcid.signin.needToReactivateAccount"
*ngIf="isEmail"
>
You will need to reactivate the account before you can sign in
with this email address.
</ng-container>
<ng-container
i18n="@@ngOrcid.signin.needToReactivateToSigInWithId"
*ngIf="!isEmail"
>
You will need to reactivate the account before you can sign in
with this iD.
</ng-container>
</i>
</ng-container>
<ng-container *ngIf="showDeprecatedError">
<ng-container i18n="@@ngOrcid.signin.orcidAccountHasBeenDeprecated">
This ORCID account has been deprecated. The active account is </ng-container
>&nbsp;<b>{{ orcidPrimaryDeprecated }}</b>
</ng-container>
</p>
You will need to reactivate the account before you can sign in with
this iD.
</ng-container>
</i>
</ng-container>
<ng-container *ngIf="showDeprecatedError">
<ng-container i18n="@@ngOrcid.signin.orcidAccountHasBeenDeprecated">
This ORCID account has been deprecated. The active account is </ng-container
>&nbsp;<b>{{ orcidPrimaryDeprecated }}</b>
</ng-container>
</div>

<div>
Expand Down Expand Up @@ -130,4 +121,4 @@
>
</div>
</div>
</div>
</app-alert-message>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
margin: auto;
}

.orcid-error {
margin-top: 20px !important;
app-alert-message {
margin-top: 20px;
}
Loading