aboutsummaryrefslogtreecommitdiff
path: root/src/content/usecases
diff options
context:
space:
mode:
authorShin'ya UEOKA <ueokande@i-beam.org>2019-10-06 03:21:38 +0000
committerShin'ya UEOKA <ueokande@i-beam.org>2019-10-07 12:31:13 +0000
commitda3ce77aa0a50568ee4ddb423d07bc50422bd79c (patch)
tree67a74ee266972c49eb8918da9a581de813766d7d /src/content/usecases
parent8428671a0acf47a4a90b6b1f39cf94401f1e5520 (diff)
Move Key to settings
Diffstat (limited to 'src/content/usecases')
-rw-r--r--src/content/usecases/FollowSlaveUseCase.ts2
-rw-r--r--src/content/usecases/KeymapUseCase.ts11
2 files changed, 6 insertions, 7 deletions
diff --git a/src/content/usecases/FollowSlaveUseCase.ts b/src/content/usecases/FollowSlaveUseCase.ts
index 2bd16ee..d471adb 100644
--- a/src/content/usecases/FollowSlaveUseCase.ts
+++ b/src/content/usecases/FollowSlaveUseCase.ts
@@ -4,7 +4,7 @@ import FollowPresenter from '../presenters/FollowPresenter';
import TabsClient from '../client/TabsClient';
import FollowMasterClient from '../client/FollowMasterClient';
import { LinkHint, InputHint } from '../presenters/Hint';
-import Key from '../domains/Key';
+import Key from '../../shared/settings/Key';
interface Size {
width: number;
diff --git a/src/content/usecases/KeymapUseCase.ts b/src/content/usecases/KeymapUseCase.ts
index 62cd04c..495f6d0 100644
--- a/src/content/usecases/KeymapUseCase.ts
+++ b/src/content/usecases/KeymapUseCase.ts
@@ -3,9 +3,9 @@ import KeymapRepository from '../repositories/KeymapRepository';
import SettingRepository from '../repositories/SettingRepository';
import AddonEnabledRepository from '../repositories/AddonEnabledRepository';
import * as operations from '../../shared/operations';
-import Key from '../domains/Key';
-import KeySequence from '../domains/KeySequence';
import Keymaps from '../../shared/settings/Keymaps';
+import Key from '../../shared/settings/Key';
+import KeySequence from '../../shared/settings/KeySequence';
type KeymapEntityMap = Map<KeySequence, operations.Operation>;
@@ -66,10 +66,9 @@ export default class KeymapUseCase {
private keymapEntityMap(): KeymapEntityMap {
let keymaps = this.settingRepository.get().keymaps.combine(reservedKeymaps);
- let entries = keymaps.entries().map(entry => [
- KeySequence.fromMapKeys(entry[0]),
- entry[1],
- ]) as [KeySequence, operations.Operation][];
+ let entries = keymaps.entries().map(
+ ([keys, op]) => [KeySequence.fromMapKeys(keys), op]
+ ) as [KeySequence, operations.Operation][];
return new Map<KeySequence, operations.Operation>(entries);
}
}