@capytale/meta-player 0.8.0 → 0.8.2
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.
package/package.json
CHANGED
|
@@ -40,14 +40,17 @@ const Countdown: FC = () => {
|
|
|
40
40
|
oneMinuteWarningShown.current = true;
|
|
41
41
|
toast.current?.show({
|
|
42
42
|
severity: "warn",
|
|
43
|
-
summary: "Activité non sauvegardée",
|
|
43
|
+
summary: showWarningsBecauseNoSave ? "Temps presque écoulé" : "Activité non sauvegardée",
|
|
44
44
|
detail: (
|
|
45
45
|
<>
|
|
46
46
|
<div>
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
{showWarningsBecauseNoSave ? (
|
|
48
|
+
<>Il vous reste moins d'une minute pour vérifier vos réponses.</>
|
|
49
|
+
) : (
|
|
49
50
|
<>
|
|
50
|
-
|
|
51
|
+
Il vous reste moins d'une minute pour enregistrer votre
|
|
52
|
+
activité. Elle sera sauvegardée automatiquement 30 secondes
|
|
53
|
+
avant la fin.
|
|
51
54
|
</>
|
|
52
55
|
)}
|
|
53
56
|
</div>
|
|
@@ -86,11 +89,20 @@ const Countdown: FC = () => {
|
|
|
86
89
|
fifteenSecondsWarningShown.current = true;
|
|
87
90
|
toast.current?.show({
|
|
88
91
|
severity: "error",
|
|
89
|
-
summary: "Activité non sauvegardée",
|
|
92
|
+
summary: showWarningsBecauseNoSave ? "Temps presque écoulé" : "Activité non sauvegardée",
|
|
90
93
|
detail: (
|
|
91
94
|
<>
|
|
92
95
|
<div>
|
|
93
|
-
|
|
96
|
+
{showWarningsBecauseNoSave ? (
|
|
97
|
+
<>
|
|
98
|
+
Il vous reste moins de 15 secondes pour vérifier vos réponses.
|
|
99
|
+
</>
|
|
100
|
+
) : (
|
|
101
|
+
<>
|
|
102
|
+
Il vous reste moins de 15 secondes pour enregistrer votre
|
|
103
|
+
activité.
|
|
104
|
+
</>
|
|
105
|
+
)}
|
|
94
106
|
</div>
|
|
95
107
|
{!showWarningsBecauseNoSave && (
|
|
96
108
|
<div
|
|
@@ -174,12 +186,14 @@ const Countdown: FC = () => {
|
|
|
174
186
|
if (newDiffMs <= 0 && !zeroSecondsWarningShown.current) {
|
|
175
187
|
zeroSecondsWarningShown.current = true;
|
|
176
188
|
toast.current?.clear();
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
189
|
+
setTimeout(() => {
|
|
190
|
+
toast.current?.show({
|
|
191
|
+
severity: "info",
|
|
192
|
+
summary: "Temps écoulé",
|
|
193
|
+
detail: "Le temps est écoulé, il n'est plus possible de sauvegarder.",
|
|
194
|
+
sticky: true,
|
|
195
|
+
});
|
|
196
|
+
}, 500);
|
|
183
197
|
}
|
|
184
198
|
}, [deadline, mode, isDirty, showWarningsBecauseNoSave]);
|
|
185
199
|
|
|
@@ -238,6 +252,10 @@ const Countdown: FC = () => {
|
|
|
238
252
|
alignItems: "center",
|
|
239
253
|
gap: "8px",
|
|
240
254
|
marginRight: "8px",
|
|
255
|
+
background: "#ef4444",
|
|
256
|
+
borderRadius: "100px",
|
|
257
|
+
padding: "5px 10px",
|
|
258
|
+
fontWeight: "bold",
|
|
241
259
|
}}
|
|
242
260
|
>
|
|
243
261
|
<i className="pi pi-calendar-times" />
|
|
@@ -257,6 +275,14 @@ const Countdown: FC = () => {
|
|
|
257
275
|
alignItems: "center",
|
|
258
276
|
gap: "8px",
|
|
259
277
|
marginRight: "8px",
|
|
278
|
+
...(hours === 0 && minutes < 5
|
|
279
|
+
? {
|
|
280
|
+
background: "#ef4444",
|
|
281
|
+
borderRadius: "100px",
|
|
282
|
+
padding: "5px 10px",
|
|
283
|
+
fontWeight: "bold",
|
|
284
|
+
}
|
|
285
|
+
: {}),
|
|
260
286
|
}}
|
|
261
287
|
>
|
|
262
288
|
<i className="pi pi-hourglass" />
|