@vived/app 2.32.0 → 2.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -35,6 +35,7 @@ export declare abstract class AppDispatcher {
|
|
|
35
35
|
abstract logError: (sender: string, message: string) => void;
|
|
36
36
|
abstract logFatalError: (sender: string, message: string) => void;
|
|
37
37
|
abstract submitHitResult: (success: boolean, description: string) => void;
|
|
38
|
+
abstract submitProgressResult: (progress: number, description: string) => void;
|
|
38
39
|
abstract submitMultiHitResult: (hits: number, misses: number, unanswered: number, description: string) => void;
|
|
39
40
|
abstract submitQualityResult: (stars: number, maxStars: number, description: string) => void;
|
|
40
41
|
abstract submitScoreResult: (score: number, maxScore: number, description: string) => void;
|
|
@@ -111,6 +111,16 @@ class AppDistpatcherImp extends AppDispatcher {
|
|
|
111
111
|
};
|
|
112
112
|
this.formRequestAndDispatch("SUBMIT_RESULTS", 3, payload);
|
|
113
113
|
};
|
|
114
|
+
this.submitProgressResult = (progress, description) => {
|
|
115
|
+
const payload = {
|
|
116
|
+
resultType: "PROGRESS_V1",
|
|
117
|
+
description,
|
|
118
|
+
result: {
|
|
119
|
+
progress,
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
this.formRequestAndDispatch("SUBMIT_RESULTS", 3, payload);
|
|
123
|
+
};
|
|
114
124
|
this.submitMultiHitResult = (hits, misses, unanswered, description) => {
|
|
115
125
|
const payload = {
|
|
116
126
|
resultType: "MULTIHIT_V1",
|