mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Pre-Angular upgrade fixes (#5709)
* code fixes * code fixes * more code fixes * even more fixes * add missing typescript for cli * rollback info drawer test changes * use npx for cli commands * restore attach providers
This commit is contained in:
@@ -26,13 +26,13 @@ export interface DocsSiteTheme {
|
||||
isDefault?: boolean;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ThemeStorage {
|
||||
static storageKey = 'docs-theme-storage-current';
|
||||
|
||||
public onThemeUpdate: EventEmitter<DocsSiteTheme> = new EventEmitter<DocsSiteTheme>();
|
||||
onThemeUpdate = new EventEmitter<DocsSiteTheme>();
|
||||
|
||||
public storeTheme(theme: DocsSiteTheme) {
|
||||
storeTheme(theme: DocsSiteTheme) {
|
||||
try {
|
||||
window.localStorage[ThemeStorage.storageKey] = JSON.stringify(theme);
|
||||
} catch (e) { }
|
||||
@@ -40,7 +40,7 @@ export class ThemeStorage {
|
||||
this.onThemeUpdate.emit(theme);
|
||||
}
|
||||
|
||||
public getStoredTheme(): DocsSiteTheme {
|
||||
getStoredTheme(): DocsSiteTheme {
|
||||
try {
|
||||
return JSON.parse(window.localStorage[ThemeStorage.storageKey] || null);
|
||||
} catch (e) {
|
||||
@@ -48,7 +48,7 @@ export class ThemeStorage {
|
||||
}
|
||||
}
|
||||
|
||||
public clearStorage() {
|
||||
clearStorage() {
|
||||
try {
|
||||
window.localStorage.removeItem(ThemeStorage.storageKey);
|
||||
} catch (e) { }
|
||||
|
Reference in New Issue
Block a user