mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-22 22:07:10 +00:00
Merge branch 'master' of gitlab.prodcontest.ru:team-15/project
This commit is contained in:
@@ -210,7 +210,7 @@ def get_competition_results(request, competition_id: UUID):
|
|||||||
task_name=task.title,
|
task_name=task.title,
|
||||||
result=result,
|
result=result,
|
||||||
max_points=task.points,
|
max_points=task.points,
|
||||||
position=task.in_competition_positions
|
position=task.in_competition_position
|
||||||
))
|
))
|
||||||
|
|
||||||
return status.OK, data
|
return status.OK, data
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
@@ -30,13 +30,14 @@ export const Header = () => {
|
|||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<a
|
|
||||||
href="/docs/"
|
<Link
|
||||||
|
to="/docs" target="_blank"
|
||||||
className="hidden md:flex text-sm font-medium text-gray-700 hover:text-gray-900 transition-colors items-center gap-1"
|
className="hidden md:flex text-sm font-medium text-gray-700 hover:text-gray-900 transition-colors items-center gap-1"
|
||||||
>
|
>
|
||||||
<FileText className="h-4 w-4" />
|
<FileText className="h-4 w-4" />
|
||||||
Материалы
|
Материалы
|
||||||
</a>
|
</Link>
|
||||||
|
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
@@ -53,7 +54,7 @@ export const Header = () => {
|
|||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<div className="md:hidden">
|
<div className="md:hidden">
|
||||||
<Link to="/docs">
|
<Link to="/docs" target="_blank">
|
||||||
<DropdownMenuItem>
|
<DropdownMenuItem>
|
||||||
Материалы
|
Материалы
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
|
|||||||
+5
-1
@@ -60,11 +60,15 @@ const FileSolution: React.FC<FileSolutionProps> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const fileName = selectedFile
|
const fullFileName = selectedFile
|
||||||
? selectedFile.name
|
? selectedFile.name
|
||||||
: existingFileUrl
|
: existingFileUrl
|
||||||
? existingFileUrl.split('/').pop() || 'file'
|
? existingFileUrl.split('/').pop() || 'file'
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
|
const fileName = fullFileName.length > 20
|
||||||
|
? fullFileName.substring(0, 20) + '...'
|
||||||
|
: fullFileName;
|
||||||
|
|
||||||
const hasFile = !!selectedFile || !!existingFileUrl;
|
const hasFile = !!selectedFile || !!existingFileUrl;
|
||||||
|
|
||||||
|
|||||||
@@ -3,15 +3,14 @@ import { User } from "@/shared/types/user";
|
|||||||
export const UserInfo = ({ user }: { user: User }) => {
|
export const UserInfo = ({ user }: { user: User }) => {
|
||||||
return (
|
return (
|
||||||
<section className="flex flex-1 flex-col items-center gap-6 text-center md:max-w-[420px] md:items-start md:text-left md:text-ellipsis">
|
<section className="flex flex-1 flex-col items-center gap-6 text-center md:max-w-[420px] md:items-start md:text-left md:text-ellipsis">
|
||||||
{user.avatar && (
|
<div className="bg-card aspect-square h-auto w-full max-w-[300px] overflow-hidden rounded-full border">
|
||||||
<div className="aspect-square h-auto w-full max-w-[300px] overflow-hidden rounded-full border">
|
<img
|
||||||
<img
|
src={user.avatar ?? "/lottie.png"}
|
||||||
src={user.avatar}
|
alt={user.username}
|
||||||
alt={user.username}
|
className="h-full w-full object-cover object-center"
|
||||||
className="h-full w-full object-cover object-center"
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<div className="flex flex-col gap-3">
|
<div className="flex flex-col gap-3">
|
||||||
<h1 className="text-4xl font-semibold">{user.username}</h1>
|
<h1 className="text-4xl font-semibold">{user.username}</h1>
|
||||||
<p className="text-muted-foreground">{user.email}</p>
|
<p className="text-muted-foreground">{user.email}</p>
|
||||||
|
|||||||
@@ -148,7 +148,12 @@ const ReviewDescription = ({ review }: { review: Review }) => {
|
|||||||
|
|
||||||
const ReviewContent = ({ review }: { review: Review }) => {
|
const ReviewContent = ({ review }: { review: Review }) => {
|
||||||
const extension = review.content.split(".").at(-1);
|
const extension = review.content.split(".").at(-1);
|
||||||
const filename = review.content.split("/").at(-1);
|
const fullFilename = review.content.split("/").at(-1);
|
||||||
|
|
||||||
|
const filename = fullFilename ?
|
||||||
|
(fullFilename.length > 20 ? fullFilename.substring(0, 20) + '...' : fullFilename)
|
||||||
|
: '';
|
||||||
|
|
||||||
|
|
||||||
const { data: content, isLoading } = useQuery({
|
const { data: content, isLoading } = useQuery({
|
||||||
queryKey: ["review-file", review.id],
|
queryKey: ["review-file", review.id],
|
||||||
|
|||||||
Reference in New Issue
Block a user