Skip to content

Commit 560d024

Browse files
committed
Fix
1 parent 54b4427 commit 560d024

18 files changed

Lines changed: 237 additions & 88 deletions

File tree

apps/codebattle/assets/css/custom.scss

Lines changed: 56 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
top: 13px;
6363
}
6464

65-
.cb-custom-event-nav-item.active+.cb-custom-event-nav-item::after {
65+
.cb-custom-event-nav-item.active + .cb-custom-event-nav-item::after {
6666
width: 0px;
6767
}
6868

@@ -166,7 +166,7 @@
166166
color: #94a3b8;
167167
}
168168

169-
.cb-task-advanced-table tbody tr+tr td {
169+
.cb-task-advanced-table tbody tr + tr td {
170170
border-top: 1px solid rgba(148, 163, 184, 0.08);
171171
}
172172

@@ -227,9 +227,11 @@
227227
content: '';
228228
position: absolute;
229229
inset: 0;
230-
background: linear-gradient(180deg,
231-
rgba(4, 6, 10, 0.35) 0%,
232-
rgba(4, 6, 10, 0.75) 100%);
230+
background: linear-gradient(
231+
180deg,
232+
rgba(4, 6, 10, 0.35) 0%,
233+
rgba(4, 6, 10, 0.75) 100%
234+
);
233235
z-index: 0;
234236
}
235237

@@ -243,9 +245,11 @@
243245
}
244246

245247
.cb-season-leaderboard-filters {
246-
background: linear-gradient(180deg,
247-
rgba(16, 22, 34, 0.82) 0%,
248-
rgba(14, 19, 29, 0.94) 100%);
248+
background: linear-gradient(
249+
180deg,
250+
rgba(16, 22, 34, 0.82) 0%,
251+
rgba(14, 19, 29, 0.94) 100%
252+
);
249253
}
250254

251255
.cb-season-leaderboard-filters .cb-season-filter-label {
@@ -259,9 +263,11 @@
259263
.cb-seasons-hero {
260264
background:
261265
radial-gradient(circle at top, rgba(201, 165, 108, 0.12), transparent 42%),
262-
linear-gradient(135deg,
266+
linear-gradient(
267+
135deg,
263268
rgba(42, 42, 53, 0.96) 0%,
264-
rgba(23, 23, 32, 0.98) 100%);
269+
rgba(23, 23, 32, 0.98) 100%
270+
);
265271
border: 1px solid rgba(201, 165, 108, 0.12);
266272
}
267273

@@ -287,9 +293,11 @@
287293
.cb-seasons-card {
288294
background:
289295
radial-gradient(circle at top, rgba(201, 165, 108, 0.08), transparent 35%),
290-
linear-gradient(135deg,
296+
linear-gradient(
297+
135deg,
291298
rgba(26, 26, 26, 0.98) 0%,
292-
rgba(10, 10, 10, 0.98) 100%);
299+
rgba(10, 10, 10, 0.98) 100%
300+
);
293301
}
294302

295303
.cb-seasons-card-header {
@@ -330,9 +338,11 @@
330338
}
331339

332340
.cb-seasons-empty {
333-
background: linear-gradient(135deg,
334-
rgba(42, 42, 53, 0.92) 0%,
335-
rgba(23, 23, 32, 0.98) 100%);
341+
background: linear-gradient(
342+
135deg,
343+
rgba(42, 42, 53, 0.92) 0%,
344+
rgba(23, 23, 32, 0.98) 100%
345+
);
336346
}
337347

338348
.cb-profile-heatmap-heading {
@@ -431,12 +441,16 @@
431441
font-size: 6px;
432442
}
433443

434-
.cb-profile-heatmap .react-calendar-heatmap .react-calendar-heatmap-month-label {
444+
.cb-profile-heatmap
445+
.react-calendar-heatmap
446+
.react-calendar-heatmap-month-label {
435447
font-size: 7px;
436448
font-weight: 600;
437449
}
438450

439-
.cb-profile-heatmap .react-calendar-heatmap .react-calendar-heatmap-weekday-label {
451+
.cb-profile-heatmap
452+
.react-calendar-heatmap
453+
.react-calendar-heatmap-weekday-label {
440454
font-size: 7px;
441455
font-weight: 500;
442456
}
@@ -476,7 +490,7 @@
476490
margin-right: -0.25rem;
477491
}
478492

479-
.cb-seasons-podium-row>[class*='col-'] {
493+
.cb-seasons-podium-row > [class*='col-'] {
480494
padding-left: 0.25rem;
481495
padding-right: 0.25rem;
482496
}
@@ -569,7 +583,9 @@
569583
background-color: rgba(28, 36, 52, 0.98) !important;
570584
}
571585

572-
.cb-season-leaderboard-filters .cb-season-filter-input-group .cb-season-filter-control {
586+
.cb-season-leaderboard-filters
587+
.cb-season-filter-input-group
588+
.cb-season-filter-control {
573589
padding: 0.45rem 0.85rem;
574590
border: 0 !important;
575591
border-radius: 0 !important;
@@ -612,30 +628,37 @@
612628
}
613629
}
614630

615-
.cb-custom-event-pagination-page-item:first-child .cb-custom-event-pagination-page-link,
616-
.cb-custom-event-pagination-page-item:nth-child(2) .cb-custom-event-pagination-page-link,
617-
.cb-custom-event-pagination-page-item:nth-last-child(2) .cb-custom-event-pagination-page-link,
618-
.cb-custom-event-pagination-page-item:last-child .cb-custom-event-pagination-page-link {
631+
.cb-custom-event-pagination-page-item:first-child
632+
.cb-custom-event-pagination-page-link,
633+
.cb-custom-event-pagination-page-item:nth-child(2)
634+
.cb-custom-event-pagination-page-link,
635+
.cb-custom-event-pagination-page-item:nth-last-child(2)
636+
.cb-custom-event-pagination-page-link,
637+
.cb-custom-event-pagination-page-item:last-child
638+
.cb-custom-event-pagination-page-link {
619639
color: white;
620640
background-color: #8c64ff;
621641
border: 1px solid #8c64ff;
622642
}
623643

624-
.cb-custom-event-pagination-page-item.disabled .cb-custom-event-pagination-page-link {
644+
.cb-custom-event-pagination-page-item.disabled
645+
.cb-custom-event-pagination-page-link {
625646
pointer-events: none;
626647
cursor: auto;
627648
background-color: #9f8ed4;
628649
border-color: #9f8ed4;
629650
}
630651

631-
.cb-custom-event-pagination-page-item.active .cb-custom-event-pagination-page-link {
652+
.cb-custom-event-pagination-page-item.active
653+
.cb-custom-event-pagination-page-link {
632654
z-index: 3;
633655
color: white;
634656
background-color: #8c64ff;
635657
border: 1px solid #8c64ff;
636658
}
637659

638-
.cb-custom-event-pagination-page-item:not(.active):not(.disabled):hover .cb-custom-event-pagination-page-link {
660+
.cb-custom-event-pagination-page-item:not(.active):not(.disabled):hover
661+
.cb-custom-event-pagination-page-link {
639662
z-index: 3;
640663
color: white;
641664
background-color: #8c64ff;
@@ -659,7 +682,7 @@
659682
margin: 0;
660683
}
661684

662-
.cb-ranking-pagination .cb-ranking-page-btn+.cb-ranking-page-btn {
685+
.cb-ranking-pagination .cb-ranking-page-btn + .cb-ranking-page-btn {
663686
margin-left: 0.4rem;
664687
}
665688

@@ -684,7 +707,6 @@
684707
}
685708

686709
@keyframes cb-run-pending-pulse {
687-
688710
0%,
689711
100% {
690712
box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
@@ -1075,22 +1097,21 @@
10751097
bottom: -1rem;
10761098
/* Overlap with next item */
10771099
width: 2px;
1078-
background-color: #4A5568;
1100+
background-color: #4a5568;
10791101
z-index: 2;
10801102
pointer-events: none;
10811103
}
10821104

1083-
.cb-timeline>div:first-child .cb-run-item::after {
1105+
.cb-timeline > div:first-child .cb-run-item::after {
10841106
top: 50%;
10851107
/* Start at the center of the first dot */
10861108
}
10871109

1088-
.cb-timeline>div:last-child .cb-run-item::after {
1110+
.cb-timeline > div:last-child .cb-run-item::after {
10891111
bottom: 50%;
10901112
/* End at the center of the last dot */
10911113
}
10921114

1093-
10941115
.cb-run-item--group {
10951116
background-color: rgba(245, 158, 11, 0.1);
10961117
}
@@ -1116,7 +1137,7 @@
11161137
}
11171138

11181139
.cb-run-item--timeout::before {
1119-
background-color: #A0AEC0; // Gray dot
1140+
background-color: #a0aec0; // Gray dot
11201141
}
11211142

11221143
.cb-run-item--pending::before {
@@ -1125,21 +1146,20 @@
11251146
}
11261147

11271148
@keyframes cb-pulse {
1128-
11291149
0%,
11301150
100% {
11311151
opacity: 1;
11321152
transform: translateY(-50%) scale(1);
11331153
}
11341154

11351155
50% {
1136-
opacity: .5;
1156+
opacity: 0.5;
11371157
transform: translateY(-50%) scale(1.1);
11381158
}
11391159
}
11401160

11411161
.cb-run-item:hover {
1142-
background-color: #4A5568;
1162+
background-color: #4a5568;
11431163
}
11441164

11451165
.cb-run-item--error:hover {

apps/codebattle/assets/js/__tests__/PictureInPicture.test.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe("PictureInPicture component", () => {
3434
const { container } = render(
3535
<PictureInPicture isActive={false} onClose={jest.fn()}>
3636
<div>Timer Content</div>
37-
</PictureInPicture>
37+
</PictureInPicture>,
3838
);
3939

4040
expect(container).toBeEmptyDOMElement();
@@ -47,7 +47,7 @@ describe("PictureInPicture component", () => {
4747
render(
4848
<PictureInPicture isActive={true} onClose={onCloseMock}>
4949
<div data-testid="pip-child">Timer Content</div>
50-
</PictureInPicture>
50+
</PictureInPicture>,
5151
);
5252

5353
await waitFor(() => {
@@ -61,7 +61,7 @@ describe("PictureInPicture component", () => {
6161
const { unmount } = render(
6262
<PictureInPicture isActive={true} onClose={jest.fn()}>
6363
<div>Timer Content</div>
64-
</PictureInPicture>
64+
</PictureInPicture>,
6565
);
6666

6767
await waitFor(() => {
@@ -79,7 +79,7 @@ describe("PictureInPicture component", () => {
7979
render(
8080
<PictureInPicture isActive={true} onClose={onCloseMock}>
8181
<div>Timer Content</div>
82-
</PictureInPicture>
82+
</PictureInPicture>,
8383
);
8484

8585
await waitFor(() => {

apps/codebattle/assets/js/widgets/components/PictureInPicture.jsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,7 @@ export function copyStyles(sourceDoc, targetDoc) {
3030
});
3131
}
3232

33-
const PictureInPicture = ({
34-
isActive,
35-
onClose,
36-
children,
37-
width = 300,
38-
height = 150,
39-
}) => {
33+
const PictureInPicture = ({ isActive, onClose, children, width = 300, height = 150 }) => {
4034
const [container, setContainer] = useState(null);
4135
const pipWindowRef = useRef(null);
4236

@@ -75,7 +69,8 @@ const PictureInPicture = ({
7569

7670
const pipContainer = pw.document.createElement("div");
7771
pipContainer.id = "pip-root";
78-
pipContainer.className = "w-100 h-100 d-flex flex-column align-items-center justify-content-center";
72+
pipContainer.className =
73+
"w-100 h-100 d-flex flex-column align-items-center justify-content-center";
7974
pw.document.body.appendChild(pipContainer);
8075

8176
pw.addEventListener("pagehide", () => {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const speedModes = {
22
normal: "1x",
33
fast: "2x",
4+
faster: "4x",
45
};
56

67
export default speedModes;

apps/codebattle/assets/js/widgets/lib/player.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,10 +478,14 @@ export const reduceRealtimeOriginalRecords = (acc, record, index) => {
478478
return { ...acc, players: newPlayers, records: [...records, newRecord] };
479479
}
480480

481-
const newRecord = createFinalRecord(index, { ...record, time: record.time }, {
482-
players,
483-
chat: chatState,
484-
});
481+
const newRecord = createFinalRecord(
482+
index,
483+
{ ...record, time: record.time },
484+
{
485+
players,
486+
chat: chatState,
487+
},
488+
);
485489

486490
return { ...acc, records: [...records, newRecord] };
487491
};

apps/codebattle/assets/js/widgets/machines/game.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,8 @@ export const config = {
373373
case speedModes.normal:
374374
return speedModes.fast;
375375
case speedModes.fast:
376+
return speedModes.faster;
377+
case speedModes.faster:
376378
return speedModes.normal;
377379
default:
378380
throw new Error("Unexpected speedMode [replayer machine]");

apps/codebattle/assets/js/widgets/middlewares/Room.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ const fetchPlaybook = (service, init) => (dispatch) => {
655655
const data = camelizeKeys(response);
656656
const type = isRecord ? PlaybookStatusCodes.stored : PlaybookStatusCodes.active;
657657
const urlParams = new URLSearchParams(window.location.search);
658-
const isRealtime = urlParams.get("realtime") === "true";
658+
const isRealtime = urlParams.get("realtime") !== "false";
659659
const resolvedData = isRealtime ? resolveRealtimeDiffs(data, type) : resolveDiffs(data, type);
660660

661661
init(dispatch)(resolvedData);

0 commit comments

Comments
 (0)