Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bakhirev committed Nov 30, 2024
1 parent daa2181 commit 33d96f7
Show file tree
Hide file tree
Showing 23 changed files with 328 additions and 76 deletions.
2 changes: 0 additions & 2 deletions build/assets/ci-cd.sh

This file was deleted.

16 changes: 0 additions & 16 deletions build/assets/vds.css

This file was deleted.

6 changes: 3 additions & 3 deletions build/static/index.js

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions public/assets/vds.css

This file was deleted.

2 changes: 2 additions & 0 deletions scripts/remove-hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ exec([
'rm -rf ../build/static/css',
'rm ../build/asset-manifest.json',
'rm ../build/test.txt',
'rm -rf ../build/social',
'rm -rf ../build/themes',
].join(' && '));

const html = fs.readFileSync('../build/index.html', 'utf8');
Expand Down
5 changes: 3 additions & 2 deletions src/ts/components/Quiz/components/Question.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ function Question({
</div>
<div className={`${style.quiz_footer} ${hideClassName}`}>
<UiKitButton
disabled={disabled}
mode="second"
disabled={disabled || !selected}
onClick={() => {
setDisabled(true);
setTimeout(() => {
Expand All @@ -96,7 +97,7 @@ function Question({
}, 3000);
}}
>
{question.button || 'Next question'}
{t('page.team.building.quiz.next')}
</UiKitButton>
</div>
</div>
Expand Down
9 changes: 6 additions & 3 deletions src/ts/components/Quiz/components/Result.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { useTranslation } from 'react-i18next';

import UiKitButton from 'ts/components/UiKit/components/Button';

Expand All @@ -16,21 +17,23 @@ function Result({
result,
onClick,
}: IResultProps): React.ReactElement | null {
const { t } = useTranslation();
return (
<section className={stylePage.quiz_result}>
<h4 className={style.quiz_title}>
{result.title}
{t(result.title || '')}
</h4>
<p className={style.quiz_description}>
{result.description}
{t(result.description || '')}
</p>
<div className={style.quiz_footer}>
<UiKitButton
mode="second"
onClick={() => {
onClick();
}}
>
Replay
{t('page.team.building.quiz.replay')}
</UiKitButton>
</div>
</section>
Expand Down
9 changes: 6 additions & 3 deletions src/ts/components/Quiz/components/Start.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { useTranslation } from 'react-i18next';

import UiKitButton from 'ts/components/UiKit/components/Button';

Expand All @@ -16,21 +17,23 @@ function Start({
quiz,
onClick,
}: IStartProps): React.ReactElement | null {
const { t } = useTranslation();
return (
<section className={stylePage.quiz_start}>
<h4 className={style.quiz_title}>
{quiz.title}
{t(quiz.title || '')}
</h4>
<p className={style.quiz_description}>
{quiz.description}
{t(quiz.description || '')}
</p>
<div className={style.quiz_footer}>
<UiKitButton
mode="second"
onClick={() => {
onClick();
}}
>
{quiz.button || 'GO'}
{t('page.team.building.quiz.start')}
</UiKitButton>
</div>
</section>
Expand Down
17 changes: 8 additions & 9 deletions src/ts/components/Quiz/helpers/getQuestions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function getQuestionByNumber(question: string, rightAnswer: number) {
b = rightAnswer + (getRandom(rightAnswer) * (Math.random() > 0.5 ? 1 : -1));
if (a === b) return null;
}
const answers = shuffle([rightAnswer, a, b]);
const answers = shuffle([rightAnswer || 1, a || 1, b || 1]);
return getQuestion(question, answers, answers.indexOf(rightAnswer));
}

Expand Down Expand Up @@ -104,25 +104,24 @@ export default function getQuizQuestions(): IQuiz {
.map((question, i: number) => ({ ...question, index: i + 1 }));

return {
title: '',
description: 'Насколько хорошо ты знаешь команду?',
description: 'page.team.building.quiz.begin',
questions: shuffle(formattedQuestions),
results: [
{
title: 'Недостаточно',
description: 'Правильных ответов меньше 40%. Ознакомьтесь с данными о вашей команде в соседних разделах и попробуйте снова!',
title: 'page.team.building.quiz.result1.title',
description: 'page.team.building.quiz.result1.description',
min: 0,
max: 7,
},
{
title: 'Хорошо',
description: 'Правильных ответов от 40% до 70%. Вы имеете хорошее представление о вашей команде, но можете узнать её лучше. Ознакомьтесь с данными в соседних разделах и попробуйте снова!',
title: 'page.team.building.quiz.result2.title',
description: 'page.team.building.quiz.result2.description',
min: 8,
max: 13,
},
{
title: 'Отлично',
description: 'Правильных ответов больше 70%. Вы отлично знаете статистику по вашей команде. !',
title: 'page.team.building.quiz.result3.title',
description: 'page.team.building.quiz.result3.description',
min: 14,
max: 25,
},
Expand Down
2 changes: 1 addition & 1 deletion src/ts/pages/Team/components/Building.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const TeamBuilding = observer((): React.ReactElement => {
}}
/>
)}
{Math.random() > 1 && (
{Math.random() < 1 && (
<Quiz />
)}
<BillBoard
Expand Down
28 changes: 28 additions & 0 deletions src/ts/translations/de/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,34 @@ export default `
§ page.team.department.tasks: tasks
§ page.team.department.totalDays: Working days
§ page.team.department.totalAuthors: Number of employees
§ page.team.building.races.title: The speed of closing tasks
§ page.team.building.races.go: Let's go!
§ page.team.building.swimmingPool.title: Maximum commit message length
§ page.team.building.quiz.start: Start a quiz
§ page.team.building.quiz.next: Next question
§ page.team.building.quiz.replay: Re-play?
§ page.team.building.quiz.question01: Who made the first commit?
§ page.team.building.quiz.question02: Who closed more tasks?
§ page.team.building.quiz.question03: Who is the fastest at completing tasks?
§ page.team.building.quiz.question04: Who has been working on the project the longest?
§ page.team.building.quiz.question05: Who worked the least on the project?
§ page.team.building.quiz.question06: Who is the committee most often?
§ page.team.building.quiz.question07: Who commits less often?
§ page.team.building.quiz.question08: Who has the longest commit signatures?
§ page.team.building.quiz.question09: Who has the shortest commit signatures?
§ page.team.building.quiz.question10: Who has the most days without comments?
§ page.team.building.quiz.question11: How many people have quit?
§ page.team.building.quiz.question12: How many people helped the project?
§ page.team.building.quiz.question13: How many maximum tasks did $1 per day?
§ page.team.building.quiz.question14: What type of tasks have been added more?
§ page.team.building.quiz.question15: How many days do they work on the project on average?
§ page.team.building.quiz.begin: How well do you know the team?
§ page.team.building.quiz.result1.title: Not enough
§ page.team.building.quiz.result1.description: The correct answers are less than 40%. Check out the information about your team in the adjacent sections and try again!
§ page.team.building.quiz.result2.title: Well
§ page.team.building.quiz.result2.description: The correct answers range from 40% to 70%. You have a good idea of your team, but you can get to know it better. Check out the data in the adjacent sections and try again!
§ page.team.building.quiz.result3.title: Great
§ page.team.building.quiz.result3.description: There are more than 70% correct answers. You know the statistics on your team perfectly well!
§ page.person.print.photo.title: Photo
§ page.person.print.photo.description: space for a photo
§ page.person.total.title: Main characteristics
Expand Down
28 changes: 28 additions & 0 deletions src/ts/translations/en/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,34 @@ export default `
§ page.team.department.tasks: tasks
§ page.team.department.totalDays: Working days
§ page.team.department.totalAuthors: Number of employees
§ page.team.building.races.title: The speed of closing tasks
§ page.team.building.races.go: Let's go!
§ page.team.building.swimmingPool.title: Maximum commit message length
§ page.team.building.quiz.start: Start a quiz
§ page.team.building.quiz.next: Next question
§ page.team.building.quiz.replay: Re-play?
§ page.team.building.quiz.question01: Who made the first commit?
§ page.team.building.quiz.question02: Who closed more tasks?
§ page.team.building.quiz.question03: Who is the fastest at completing tasks?
§ page.team.building.quiz.question04: Who has been working on the project the longest?
§ page.team.building.quiz.question05: Who worked the least on the project?
§ page.team.building.quiz.question06: Who is the committee most often?
§ page.team.building.quiz.question07: Who commits less often?
§ page.team.building.quiz.question08: Who has the longest commit signatures?
§ page.team.building.quiz.question09: Who has the shortest commit signatures?
§ page.team.building.quiz.question10: Who has the most days without comments?
§ page.team.building.quiz.question11: How many people have quit?
§ page.team.building.quiz.question12: How many people helped the project?
§ page.team.building.quiz.question13: How many maximum tasks did $1 per day?
§ page.team.building.quiz.question14: What type of tasks have been added more?
§ page.team.building.quiz.question15: How many days do they work on the project on average?
§ page.team.building.quiz.begin: How well do you know the team?
§ page.team.building.quiz.result1.title: Not enough
§ page.team.building.quiz.result1.description: The correct answers are less than 40%. Check out the information about your team in the adjacent sections and try again!
§ page.team.building.quiz.result2.title: Well
§ page.team.building.quiz.result2.description: The correct answers range from 40% to 70%. You have a good idea of your team, but you can get to know it better. Check out the data in the adjacent sections and try again!
§ page.team.building.quiz.result3.title: Great
§ page.team.building.quiz.result3.description: There are more than 70% correct answers. You know the statistics on your team perfectly well!
§ page.person.print.photo.title: Photo
§ page.person.print.photo.description: space for a photo
§ page.person.total.title: Main characteristics
Expand Down
28 changes: 28 additions & 0 deletions src/ts/translations/es/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,34 @@ export default `
§ page.team.department.tasks: tasks
§ page.team.department.totalDays: Working days
§ page.team.department.totalAuthors: Number of employees
§ page.team.building.races.title: The speed of closing tasks
§ page.team.building.races.go: Let's go!
§ page.team.building.swimmingPool.title: Maximum commit message length
§ page.team.building.quiz.start: Start a quiz
§ page.team.building.quiz.next: Next question
§ page.team.building.quiz.replay: Re-play?
§ page.team.building.quiz.question01: Who made the first commit?
§ page.team.building.quiz.question02: Who closed more tasks?
§ page.team.building.quiz.question03: Who is the fastest at completing tasks?
§ page.team.building.quiz.question04: Who has been working on the project the longest?
§ page.team.building.quiz.question05: Who worked the least on the project?
§ page.team.building.quiz.question06: Who is the committee most often?
§ page.team.building.quiz.question07: Who commits less often?
§ page.team.building.quiz.question08: Who has the longest commit signatures?
§ page.team.building.quiz.question09: Who has the shortest commit signatures?
§ page.team.building.quiz.question10: Who has the most days without comments?
§ page.team.building.quiz.question11: How many people have quit?
§ page.team.building.quiz.question12: How many people helped the project?
§ page.team.building.quiz.question13: How many maximum tasks did $1 per day?
§ page.team.building.quiz.question14: What type of tasks have been added more?
§ page.team.building.quiz.question15: How many days do they work on the project on average?
§ page.team.building.quiz.begin: How well do you know the team?
§ page.team.building.quiz.result1.title: Not enough
§ page.team.building.quiz.result1.description: The correct answers are less than 40%. Check out the information about your team in the adjacent sections and try again!
§ page.team.building.quiz.result2.title: Well
§ page.team.building.quiz.result2.description: The correct answers range from 40% to 70%. You have a good idea of your team, but you can get to know it better. Check out the data in the adjacent sections and try again!
§ page.team.building.quiz.result3.title: Great
§ page.team.building.quiz.result3.description: There are more than 70% correct answers. You know the statistics on your team perfectly well!
§ page.person.print.photo.title: Photo
§ page.person.print.photo.description: a place for a photo
§ page.person.total.title: Main Features
Expand Down
28 changes: 28 additions & 0 deletions src/ts/translations/fr/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,34 @@ export default `
§ page.team.department.tasks: tasks
§ page.team.department.totalDays: Working days
§ page.team.department.totalAuthors: Number of employees
§ page.team.building.races.title: The speed of closing tasks
§ page.team.building.races.go: Let's go!
§ page.team.building.swimmingPool.title: Maximum commit message length
§ page.team.building.quiz.start: Start a quiz
§ page.team.building.quiz.next: Next question
§ page.team.building.quiz.replay: Re-play?
§ page.team.building.quiz.question01: Who made the first commit?
§ page.team.building.quiz.question02: Who closed more tasks?
§ page.team.building.quiz.question03: Who is the fastest at completing tasks?
§ page.team.building.quiz.question04: Who has been working on the project the longest?
§ page.team.building.quiz.question05: Who worked the least on the project?
§ page.team.building.quiz.question06: Who is the committee most often?
§ page.team.building.quiz.question07: Who commits less often?
§ page.team.building.quiz.question08: Who has the longest commit signatures?
§ page.team.building.quiz.question09: Who has the shortest commit signatures?
§ page.team.building.quiz.question10: Who has the most days without comments?
§ page.team.building.quiz.question11: How many people have quit?
§ page.team.building.quiz.question12: How many people helped the project?
§ page.team.building.quiz.question13: How many maximum tasks did $1 per day?
§ page.team.building.quiz.question14: What type of tasks have been added more?
§ page.team.building.quiz.question15: How many days do they work on the project on average?
§ page.team.building.quiz.begin: How well do you know the team?
§ page.team.building.quiz.result1.title: Not enough
§ page.team.building.quiz.result1.description: The correct answers are less than 40%. Check out the information about your team in the adjacent sections and try again!
§ page.team.building.quiz.result2.title: Well
§ page.team.building.quiz.result2.description: The correct answers range from 40% to 70%. You have a good idea of your team, but you can get to know it better. Check out the data in the adjacent sections and try again!
§ page.team.building.quiz.result3.title: Great
§ page.team.building.quiz.result3.description: There are more than 70% correct answers. You know the statistics on your team perfectly well!
§ page.person.print.photo.title: Photo
§ page.person.print.photo.description: place à la photographie
§ page.person.total.title: Caractéristiques de base
Expand Down
28 changes: 28 additions & 0 deletions src/ts/translations/ja/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,34 @@ export default `
§ page.team.department.tasks: tasks
§ page.team.department.totalDays: Working days
§ page.team.department.totalAuthors: Number of employees
§ page.team.building.races.title: The speed of closing tasks
§ page.team.building.races.go: Let's go!
§ page.team.building.swimmingPool.title: Maximum commit message length
§ page.team.building.quiz.start: Start a quiz
§ page.team.building.quiz.next: Next question
§ page.team.building.quiz.replay: Re-play?
§ page.team.building.quiz.question01: Who made the first commit?
§ page.team.building.quiz.question02: Who closed more tasks?
§ page.team.building.quiz.question03: Who is the fastest at completing tasks?
§ page.team.building.quiz.question04: Who has been working on the project the longest?
§ page.team.building.quiz.question05: Who worked the least on the project?
§ page.team.building.quiz.question06: Who is the committee most often?
§ page.team.building.quiz.question07: Who commits less often?
§ page.team.building.quiz.question08: Who has the longest commit signatures?
§ page.team.building.quiz.question09: Who has the shortest commit signatures?
§ page.team.building.quiz.question10: Who has the most days without comments?
§ page.team.building.quiz.question11: How many people have quit?
§ page.team.building.quiz.question12: How many people helped the project?
§ page.team.building.quiz.question13: How many maximum tasks did $1 per day?
§ page.team.building.quiz.question14: What type of tasks have been added more?
§ page.team.building.quiz.question15: How many days do they work on the project on average?
§ page.team.building.quiz.begin: How well do you know the team?
§ page.team.building.quiz.result1.title: Not enough
§ page.team.building.quiz.result1.description: The correct answers are less than 40%. Check out the information about your team in the adjacent sections and try again!
§ page.team.building.quiz.result2.title: Well
§ page.team.building.quiz.result2.description: The correct answers range from 40% to 70%. You have a good idea of your team, but you can get to know it better. Check out the data in the adjacent sections and try again!
§ page.team.building.quiz.result3.title: Great
§ page.team.building.quiz.result3.description: There are more than 70% correct answers. You know the statistics on your team perfectly well!
§ page.person.print.photo.title: Photo
§ page.person.print.photo.description: space for a photo
§ page.person.total.title: Main characteristics
Expand Down
Loading

0 comments on commit 33d96f7

Please sign in to comment.