mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Login dialog shows error for Safari with Private Window mode (#1172)
* #958 new StorageService service abstraction around ‘Storage’ to allow switching to in-memory store whenever ‘localStorage’ is not available (i.e. private/incognito modes, etc.) * fix unit tests * update unit tests - disable incorrect auth tests (core) - simplify widget visibility tests (activiti-form) * fix unit tests
This commit is contained in:
committed by
Eugenio Romano
parent
94dad585b1
commit
da70a72bba
@@ -16,9 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import {
|
||||
AlfrescoSettingsService
|
||||
} from 'ng2-alfresco-core';
|
||||
import { AlfrescoSettingsService, StorageService } from 'ng2-alfresco-core';
|
||||
|
||||
declare let __moduleName: string;
|
||||
|
||||
@@ -33,7 +31,8 @@ export class SettingComponent {
|
||||
ecmHost: string;
|
||||
bpmHost: string;
|
||||
|
||||
constructor(public alfrescoSettingsService: AlfrescoSettingsService) {
|
||||
constructor(public alfrescoSettingsService: AlfrescoSettingsService,
|
||||
private storage: StorageService) {
|
||||
this.ecmHost = this.alfrescoSettingsService.ecmHost;
|
||||
this.bpmHost = this.alfrescoSettingsService.bpmHost;
|
||||
}
|
||||
@@ -42,14 +41,14 @@ export class SettingComponent {
|
||||
console.log((<HTMLInputElement>event.target).value);
|
||||
this.ecmHost = (<HTMLInputElement>event.target).value;
|
||||
this.alfrescoSettingsService.ecmHost = this.ecmHost;
|
||||
localStorage.setItem(`ecmHost`, this.ecmHost);
|
||||
this.storage.setItem(`ecmHost`, this.ecmHost);
|
||||
}
|
||||
|
||||
public onChangeBPMHost(event: KeyboardEvent): void {
|
||||
console.log((<HTMLInputElement>event.target).value);
|
||||
this.bpmHost = (<HTMLInputElement>event.target).value;
|
||||
this.alfrescoSettingsService.bpmHost = this.bpmHost;
|
||||
localStorage.setItem(`bpmHost`, this.bpmHost);
|
||||
this.storage.setItem(`bpmHost`, this.bpmHost);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user