Skip to content

Commit 43ea4b6

Browse files
committed
Mega update
1 parent 54c8829 commit 43ea4b6

101 files changed

Lines changed: 4981 additions & 2163 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codex/config.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[mcp_servers.postgres]
2+
command = "npx"
3+
args = [
4+
"-y",
5+
"@modelcontextprotocol/server-postgres",
6+
"postgresql://postgres:postgres@localhost:5432/codebattle_dev"
7+
]

services/app/.codex/config.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[mcp_servers.postgres]
2+
command = "npx"
3+
args = [
4+
"-y",
5+
"@modelcontextprotocol/server-postgres",
6+
"postgresql://postgres:postgres@localhost:5432/codebattle_dev"
7+
]

services/app/apps/codebattle/assets/css/style.scss

Lines changed: 105 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -213,43 +213,97 @@ input[type="range"] {
213213

214214
input[type="range"].cb-range {
215215
--range-progress: 50%;
216+
--cb-range-track-bg: linear-gradient(
217+
90deg,
218+
#ff6a3d 0%,
219+
$orange 50%,
220+
#d63a3a 100%
221+
);
222+
--cb-range-track-rest: linear-gradient(
223+
180deg,
224+
rgba(58, 58, 74, 0.95) 0%,
225+
rgba(33, 33, 43, 0.98) 100%
226+
);
227+
height: 22px;
216228

217229
&::-webkit-slider-runnable-track {
218-
background: linear-gradient(90deg, $orange var(--range-progress), $cb-bg-panel var(--range-progress));
219-
border: 1px solid $cb-border-color;
230+
height: 10px;
231+
border-radius: 999px;
232+
background:
233+
linear-gradient(90deg, #dc3545 0%, #ff5a5a 100%) 0 / var(--range-progress) 100% no-repeat,
234+
var(--cb-range-track-rest);
235+
border: 1px solid rgba(255, 255, 255, 0.08);
236+
box-shadow:
237+
inset 0 1px 0 rgba(255, 255, 255, 0.12),
238+
inset 0 -1px 0 rgba(0, 0, 0, 0.35),
239+
0 0 0 1px rgba(238, 55, 55, 0.08);
240+
transition: box-shadow 0.2s ease;
220241
}
221242

222243
&::-moz-range-track {
223-
background: linear-gradient(90deg, $orange var(--range-progress), $cb-bg-panel var(--range-progress));
224-
border: 1px solid $cb-border-color;
244+
height: 10px;
245+
border-radius: 999px;
246+
background:
247+
linear-gradient(90deg, #dc3545 0%, #ff5a5a 100%) 0 / var(--range-progress) 100% no-repeat,
248+
var(--cb-range-track-rest);
249+
border: 1px solid rgba(255, 255, 255, 0.08);
250+
box-shadow:
251+
inset 0 1px 0 rgba(255, 255, 255, 0.12),
252+
inset 0 -1px 0 rgba(0, 0, 0, 0.35),
253+
0 0 0 1px rgba(238, 55, 55, 0.08);
254+
transition: box-shadow 0.2s ease;
225255
}
226256

227257
&::-webkit-slider-thumb {
228258
-webkit-appearance: none;
229-
width: 18px;
230-
height: 18px;
231-
margin-top: -6px;
259+
width: 22px;
260+
height: 22px;
261+
margin-top: -7px;
232262
border-radius: 50%;
233-
background: $orange;
234-
border: 2px solid rgba(255, 255, 255, 0.6);
235-
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
263+
background: radial-gradient(circle at 30% 30%, #fff2e8 0%, #ff955e 35%, $orange 65%, #cf2626 100%);
264+
border: 2px solid rgba(255, 255, 255, 0.75);
265+
box-shadow:
266+
0 2px 8px rgba(0, 0, 0, 0.55),
267+
0 0 0 3px rgba(238, 55, 55, 0.2);
268+
transition: transform 0.15s ease, box-shadow 0.2s ease;
236269
}
237270

238271
&::-moz-range-thumb {
239-
width: 18px;
240-
height: 18px;
272+
width: 22px;
273+
height: 22px;
241274
border-radius: 50%;
242-
background: $orange;
243-
border: 2px solid rgba(255, 255, 255, 0.6);
244-
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
275+
background: radial-gradient(circle at 30% 30%, #fff2e8 0%, #ff955e 35%, $orange 65%, #cf2626 100%);
276+
border: 2px solid rgba(255, 255, 255, 0.75);
277+
box-shadow:
278+
0 2px 8px rgba(0, 0, 0, 0.55),
279+
0 0 0 3px rgba(238, 55, 55, 0.2);
280+
transition: transform 0.15s ease, box-shadow 0.2s ease;
281+
}
282+
283+
&:hover::-webkit-slider-runnable-track,
284+
&:hover::-moz-range-track {
285+
box-shadow:
286+
inset 0 1px 0 rgba(255, 255, 255, 0.15),
287+
inset 0 -1px 0 rgba(0, 0, 0, 0.4),
288+
0 0 0 1px rgba(238, 55, 55, 0.18),
289+
0 0 12px rgba(238, 55, 55, 0.2);
290+
}
291+
292+
&:hover::-webkit-slider-thumb,
293+
&:hover::-moz-range-thumb {
294+
transform: scale(1.06);
245295
}
246296

247297
&:focus-visible::-webkit-slider-thumb {
248-
box-shadow: 0 0 0 4px rgba(238, 55, 55, 0.25);
298+
box-shadow:
299+
0 2px 8px rgba(0, 0, 0, 0.55),
300+
0 0 0 5px rgba(238, 55, 55, 0.35);
249301
}
250302

251303
&:focus-visible::-moz-range-thumb {
252-
box-shadow: 0 0 0 4px rgba(238, 55, 55, 0.25);
304+
box-shadow:
305+
0 2px 8px rgba(0, 0, 0, 0.55),
306+
0 0 0 5px rgba(238, 55, 55, 0.35);
253307
}
254308
}
255309

@@ -476,57 +530,62 @@ a {
476530

477531
.react-calendar-heatmap {
478532
& .react-calendar-heatmap-month-label {
479-
color: #999;
480-
fill: #999;
533+
color: #b8c0d0;
534+
fill: #b8c0d0;
481535
}
482536

483537
& .react-calendar-heatmap-weekday-label {
484-
color: #999;
485-
fill: #999;
538+
color: #b8c0d0;
539+
fill: #b8c0d0;
486540
}
487541

488542
.color-huge {
489-
background-color: #1e6823;
490-
fill: #1e6823;
543+
background-color: #e0bf7a;
544+
fill: #e0bf7a;
491545
}
492546

493547
.color-huge:hover {
494-
background-color: #0e5813;
495-
fill: #0e5813;
548+
background-color: #e7ca8f;
549+
fill: #e7ca8f;
496550
}
497551

498552
.color-large {
499-
background-color: #44a340;
500-
fill: #44a340;
553+
background-color: #a4aab3;
554+
fill: #a4aab3;
501555
}
502556

503557
.color-large:hover {
504-
background-color: #349330;
505-
fill: #349330;
558+
background-color: #b3b9c2;
559+
fill: #b3b9c2;
506560
}
507561

508562
.color-small {
509-
background-color: #d6e685;
510-
fill: #d6e685;
563+
background-color: #8a919c;
564+
fill: #8a919c;
511565
}
512566

513567
.color-small:hover {
514-
background-color: #c6d675;
515-
fill: #c6d675;
568+
background-color: #9ba2ad;
569+
fill: #9ba2ad;
516570
}
517571

518572
.color-empty {
519-
background-color: $cb-bg-highlight-panel;
520-
fill: $cb-bg-highlight-panel;
573+
background-color: #3a4150;
574+
fill: #3a4150;
521575
}
522576

523577
.color-empty:hover {
524-
fill: $cb-bg-highlight-panel;
578+
fill: #4a5262;
525579
}
526580
}
527581

582+
.react-calendar-heatmap rect {
583+
stroke: rgba(12, 16, 24, 0.65);
584+
stroke-width: 1px;
585+
}
586+
528587
.react-calendar-heatmap rect:hover {
529-
stroke: #555;
588+
stroke: #dbe3f2;
530589
stroke-width: 1px;
531590
}
532591

@@ -1378,6 +1437,15 @@ $cb-bronze-bottom: #4a3223;
13781437
@include cb-place-bg($cb-bronze-top, $cb-bronze-bottom);
13791438
}
13801439

1440+
.cb-game-ranking-table .cb-gold-place-bg {
1441+
color: #fff;
1442+
1443+
.cb-custom-event-td,
1444+
.cb-custom-event-name {
1445+
color: #fff;
1446+
}
1447+
}
1448+
13811449
/* .cb-gold-place-bg {
13821450
background: linear-gradient(180deg, #8f734c 0%, #7f6442 100%) !important;
13831451
border-radius: 0.5rem;

services/app/apps/codebattle/assets/css/tournaments.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,15 @@
9595
background-color: #dedede !important;
9696
}
9797

98+
.cb-match-confirmation-modal .cb-match-confirmation-progress {
99+
background-color: #2f2f38;
100+
101+
.progress-bar {
102+
background: linear-gradient(
103+
90deg,
104+
darken($gold, 14%) 0%,
105+
$gold 52%,
106+
lighten($gold, 8%) 100%
107+
);
108+
}
109+
}

services/app/apps/codebattle/assets/js/__tests__/ContributorsList.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// import { configureStore, combineReducers } from '@reduxjs/toolkit';
44
// import { render } from '@testing-library/react';
5-
import '@testing-library/jest-dom/extend-expect';
5+
import '@testing-library/jest-dom';
66
import axios from 'axios';
77
// import { Provider } from 'react-redux';
88
//

services/app/apps/codebattle/assets/js/__tests__/CreateGameDialog.test.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react';
33
import { configureStore, combineReducers } from '@reduxjs/toolkit';
44
import { render, waitFor } from '@testing-library/react';
55
import userEvent from '@testing-library/user-event';
6-
import '@testing-library/jest-dom/extend-expect';
6+
import '@testing-library/jest-dom';
77
import axios from 'axios';
88
import noop from 'lodash/noop';
99
import omit from 'lodash/omit';
@@ -223,9 +223,12 @@ describe('test create game', () => {
223223
});
224224

225225
test('filter tasks by level', async () => {
226-
const { findByTitle, queryByRole, user } = setup(vdom);
226+
const {
227+
findByTitle, findByRole, queryByRole, user,
228+
} = setup(vdom);
227229

228230
const easyLevelButton = await findByTitle('easy');
231+
await findByRole('button', { name: elementaryTasksFromBackend[0].name });
229232

230233
elementaryTasksFromBackend.forEach((task) => expect(queryByRole('button', { name: task.name })).toBeInTheDocument());
231234
easyTasksFromBackend.forEach((task) => expect(queryByRole('button', { name: task.name })).not.toBeInTheDocument());

services/app/apps/codebattle/assets/js/__tests__/Registration.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import React from 'react';
66

77
import { render, waitFor } from '@testing-library/react';
88
import userEvent from '@testing-library/user-event';
9-
import '@testing-library/jest-dom/extend-expect';
9+
import '@testing-library/jest-dom';
1010
import axios from 'axios';
1111

1212
import Registration from '../widgets/pages/registration';

services/app/apps/codebattle/assets/js/__tests__/RootContainer.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import NiceModal from '@ebay/nice-modal-react';
44
import { configureStore, combineReducers } from '@reduxjs/toolkit';
55
import { render } from '@testing-library/react';
66
import userEvent from '@testing-library/user-event';
7-
import '@testing-library/jest-dom/extend-expect';
7+
import '@testing-library/jest-dom';
88
import axios from 'axios';
99
import { Provider } from 'react-redux';
1010
import { createMachine } from 'xstate';

services/app/apps/codebattle/assets/js/__tests__/UserSettings.test.jsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import '@testing-library/jest-dom/extend-expect';
3+
import '@testing-library/jest-dom';
44
import { configureStore, combineReducers } from '@reduxjs/toolkit';
55
import { render, waitFor } from '@testing-library/react';
66
import userEvent from '@testing-library/user-event';
@@ -15,6 +15,16 @@ jest.mock('@fortawesome/react-fontawesome', () => ({
1515
}));
1616

1717
jest.mock('calcite-react/Slider', () => 'input');
18+
jest.mock('../widgets/components/LanguageIcon', () => () => null);
19+
jest.mock(
20+
'react-bootstrap/Alert',
21+
() => ({
22+
__esModule: true,
23+
default: ({ children, variant, show }) => (
24+
show ? <div role="alert" className={`alert-${variant}`}>{children}</div> : null
25+
),
26+
}),
27+
);
1828

1929
jest.mock('axios');
2030

services/app/apps/codebattle/assets/js/__tests__/WaitingOpponentInfo.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22

33
import { render, screen } from '@testing-library/react';
44
import userEvent from '@testing-library/user-event';
5-
import '@testing-library/jest-dom/extend-expect';
5+
import '@testing-library/jest-dom';
66
import copy from 'copy-to-clipboard';
77

88
import WaitingOpponentInfo from '../widgets/pages/game/WaitingOpponentInfo';

0 commit comments

Comments
 (0)