feat: batch manager protection + react challenge modal + eslint fix
This commit is contained in:
@@ -24,9 +24,10 @@ export class BrowserBridge implements Bridge {
|
||||
|
||||
/** No-ops */
|
||||
|
||||
syncComponents() {}
|
||||
onMajorDataChange() {}
|
||||
onInitialDataLoad() {}
|
||||
onSearch() {}
|
||||
downloadBackup() {}
|
||||
/* eslint-disable @typescript-eslint/no-empty-function */
|
||||
syncComponents(): void {}
|
||||
onMajorDataChange(): void {}
|
||||
onInitialDataLoad(): void {}
|
||||
onSearch(): void {}
|
||||
downloadBackup(): void {}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ export enum KeyboardKey {
|
||||
Backspace = "Backspace",
|
||||
Up = "ArrowUp",
|
||||
Down = "ArrowDown",
|
||||
};
|
||||
}
|
||||
|
||||
export enum KeyboardModifier {
|
||||
Shift = "Shift",
|
||||
@@ -12,12 +12,12 @@ export enum KeyboardModifier {
|
||||
/** ⌘ key on Mac, ⊞ key on Windows */
|
||||
Meta = "Meta",
|
||||
Alt = "Alt",
|
||||
};
|
||||
}
|
||||
|
||||
enum KeyboardKeyEvent {
|
||||
Down = "KeyEventDown",
|
||||
Up = "KeyEventUp"
|
||||
};
|
||||
}
|
||||
|
||||
type KeyboardObserver = {
|
||||
key?: KeyboardKey | string
|
||||
@@ -39,10 +39,10 @@ export class KeyboardManager {
|
||||
constructor() {
|
||||
this.handleKeyDown = (event: KeyboardEvent) => {
|
||||
this.notifyObserver(event, KeyboardKeyEvent.Down);
|
||||
}
|
||||
};
|
||||
this.handleKeyUp = (event: KeyboardEvent) => {
|
||||
this.notifyObserver(event, KeyboardKeyEvent.Up);
|
||||
}
|
||||
};
|
||||
window.addEventListener('keydown', this.handleKeyDown);
|
||||
window.addEventListener('keyup', this.handleKeyUp);
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ import {
|
||||
ComponentMutator,
|
||||
Copy,
|
||||
dictToArray
|
||||
} from '@standardnotes/snjs';
|
||||
import { PayloadContent } from '@standardnotes/snjs';
|
||||
import { ComponentPermission } from '@standardnotes/snjs';
|
||||
, PayloadContent , ComponentPermission } from '@standardnotes/snjs';
|
||||
|
||||
|
||||
|
||||
/** A class for handling installation of system extensions */
|
||||
export class NativeExtManager extends ApplicationService {
|
||||
@@ -82,7 +82,7 @@ export class NativeExtManager extends ApplicationService {
|
||||
// Handle addition of SN|ExtensionRepo permission
|
||||
const permissions = Copy(extensionsManager!.permissions) as ComponentPermission[];
|
||||
const permission = permissions.find((p) => {
|
||||
return p.name === ComponentAction.StreamItems
|
||||
return p.name === ComponentAction.StreamItems;
|
||||
});
|
||||
if (permission && !permission.content_types!.includes(ContentType.ExtensionRepo)) {
|
||||
permission.content_types!.push(ContentType.ExtensionRepo);
|
||||
@@ -160,7 +160,7 @@ export class NativeExtManager extends ApplicationService {
|
||||
// Handle addition of SN|ExtensionRepo permission
|
||||
const permissions = Copy(batchManager!.permissions) as ComponentPermission[];
|
||||
const permission = permissions.find((p) => {
|
||||
return p.name === ComponentAction.StreamItems
|
||||
return p.name === ComponentAction.StreamItems;
|
||||
});
|
||||
if (permission && !permission.content_types!.includes(ContentType.ExtensionRepo)) {
|
||||
permission.content_types!.push(ContentType.ExtensionRepo);
|
||||
|
||||
@@ -22,8 +22,6 @@ export class ThemeManager extends ApplicationService {
|
||||
this.deactivateAllThemes();
|
||||
} else if (event === ApplicationEvent.StorageReady) {
|
||||
await this.activateCachedThemes();
|
||||
if (!this.webApplication.getDesktopService().isDesktop) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +73,7 @@ export class ThemeManager extends ApplicationService {
|
||||
this.deactivateTheme(theme.uuid);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
private clearAppThemeState() {
|
||||
|
||||
Reference in New Issue
Block a user