mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge branch 'accessibility-settings-7.6' into accessibility-settings-7_x
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Inject, Injectable } from '@angular/core';
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { Observable, of, switchMap, combineLatest } from 'rxjs';
|
||||
import { map, take } from 'rxjs/operators';
|
||||
import { CookieService } from '../core/services/cookie.service';
|
||||
@@ -69,7 +69,7 @@ export class AccessibilitySettingsService {
|
||||
protected cookieService: CookieService,
|
||||
protected authService: AuthService,
|
||||
protected ePersonService: EPersonDataService,
|
||||
protected klaroService: KlaroService,
|
||||
@Optional() protected klaroService: KlaroService,
|
||||
@Inject(APP_CONFIG) protected appConfig: AppConfig,
|
||||
) {
|
||||
}
|
||||
@@ -223,6 +223,10 @@ export class AccessibilitySettingsService {
|
||||
* Emits 'failed' when setting in a cookie failed due to the cookie not being accepted, 'cookie' when it succeeded.
|
||||
*/
|
||||
setSettingsInCookie(settings: AccessibilitySettings): Observable<'cookie' | 'failed'> {
|
||||
if (hasNoValue(this.klaroService)) {
|
||||
return of('failed');
|
||||
}
|
||||
|
||||
return this.klaroService.getSavedPreferences().pipe(
|
||||
map(preferences => preferences.accessibility),
|
||||
map((accessibilityCookieAccepted: boolean) => {
|
||||
|
@@ -68,6 +68,10 @@
|
||||
{{ 'footer.link.cookies' | translate}}
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<a class="text-white"
|
||||
routerLink="info/accessibility">{{ 'footer.link.accessibility' | translate }}</a>
|
||||
</li>
|
||||
<li *ngIf="showPrivacyPolicy">
|
||||
<a class="btn text-white"
|
||||
routerLink="info/privacy">{{ 'footer.link.privacy-policy' | translate}}</a>
|
||||
@@ -80,10 +84,6 @@
|
||||
<a class="btn text-white"
|
||||
routerLink="info/feedback">{{ 'footer.link.feedback' | translate}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="text-white"
|
||||
routerLink="info/accessibility">{{ 'footer.link.accessibility' | translate }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1926,7 +1926,7 @@
|
||||
|
||||
"info.accessibility-settings.liveRegionTimeOut.label": "ARIA Live region time out (in seconds)",
|
||||
|
||||
"info.accessibility-settings.liveRegionTimeOut.hint": "The duration after which a message in the ARIA live region disappears. ARIA live regions are not visible on the page, but proivde announcements of notifications (or other actions) to screen readers.",
|
||||
"info.accessibility-settings.liveRegionTimeOut.hint": "The duration after which a message in the ARIA live region disappears. ARIA live regions are not visible on the page, but provide announcements of notifications (or other actions) to screen readers.",
|
||||
|
||||
"info.accessibility-settings.liveRegionTimeOut.invalid": "Live region time out must be greater than 0",
|
||||
|
||||
|
Reference in New Issue
Block a user