|
1 | 1 | import * as TestLogic from "../../test/test-logic"; |
2 | 2 | import * as TestUI from "../../test/test-ui"; |
3 | | -import * as PractiseWords from "../../test/practise-words"; |
| 3 | +import * as PractiseWordsModal from "../../modals/practise-words"; |
4 | 4 | import * as Notifications from "../../elements/notifications"; |
5 | 5 | import * as TestInput from "../../test/test-input"; |
6 | 6 | import * as TestWords from "../../test/test-words"; |
7 | 7 | import Config from "../../config"; |
8 | 8 |
|
9 | | -const practiceSubgroup: MonkeyTypes.CommandsSubgroup = { |
10 | | - title: "Practice words...", |
11 | | - list: [ |
12 | | - { |
13 | | - id: "practiseWordsMissed", |
14 | | - display: "missed", |
15 | | - exec: (): void => { |
16 | | - PractiseWords.init(true, false); |
17 | | - TestLogic.restart({ |
18 | | - practiseMissed: true, |
19 | | - }); |
20 | | - }, |
21 | | - }, |
22 | | - { |
23 | | - id: "practiseWordsSlow", |
24 | | - display: "slow", |
25 | | - exec: (): void => { |
26 | | - PractiseWords.init(false, true); |
27 | | - TestLogic.restart({ |
28 | | - practiseMissed: true, |
29 | | - }); |
30 | | - }, |
31 | | - }, |
32 | | - { |
33 | | - id: "practiseWordsBoth", |
34 | | - display: "both", |
35 | | - exec: (): void => { |
36 | | - PractiseWords.init(true, true); |
37 | | - TestLogic.restart({ |
38 | | - practiseMissed: true, |
39 | | - }); |
40 | | - }, |
41 | | - }, |
42 | | - ], |
43 | | -}; |
44 | | - |
45 | 9 | const commands: MonkeyTypes.Command[] = [ |
46 | 10 | { |
47 | 11 | id: "nextTest", |
@@ -70,9 +34,15 @@ const commands: MonkeyTypes.Command[] = [ |
70 | 34 | }, |
71 | 35 | { |
72 | 36 | id: "practiseWords", |
73 | | - display: "Practice words...", |
| 37 | + display: "Practice words", |
74 | 38 | icon: "fa-exclamation-triangle", |
75 | | - subgroup: practiceSubgroup, |
| 39 | + opensModal: true, |
| 40 | + exec: (options): void => { |
| 41 | + PractiseWordsModal.show({ |
| 42 | + animationMode: "modalOnly", |
| 43 | + modalChain: options.commandlineModal, |
| 44 | + }); |
| 45 | + }, |
76 | 46 | available: (): boolean => { |
77 | 47 | return TestUI.resultVisible; |
78 | 48 | }, |
|
0 commit comments