feat: language picker with flags, paging and follow mode, translation run in the floating window
CI / frontend (push) Failing after 27s
CI / backend (push) Failing after 49s

Language picker with search and SVG flags, real pagination with locate, one global machine translation run shown next to uploads.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mrleo1nidandClaude Sonnet 5.5 committed 2026-10-25 19:24:20 +03:00
1 parent 5f6bd4508e
commit 7fa88e4025
82 files changed
+978 -187

No files matched your search

+9 -4
View File
@@ -1,6 +1,7 @@
import { createContext, useContext, useEffect, useRef, useState, type ReactNode } from "react";
import { Link, useLocation } from "react-router-dom";
import { api, ApiError, formatSize, uploadRaw, type Game, type Version } from "./api";
import { TranslationProgress, useTranslationRun } from "./translator/runner";
import { ErrorNote } from "./ui/Bits";
import { Icon } from "./ui/Icon";
@@ -151,9 +152,13 @@ export function UploadProgress() {
function FloatingUploads() {
const { pathname } = useLocation();
const { tasks } = useUploads();
if (pathname.replace(/\/$/, "") === "/games/new" || !tasks.length) return null;
return <aside className="upload-floating" aria-label="Фоновые загрузки">
<UploadProgress />
<Link to="/games/new" className="btn btn-primary">К загрузкам</Link>
const { task: translation } = useTranslationRun();
// on the upload page the uploads are listed in the page itself
const uploads = tasks.length > 0 && pathname.replace(/\/$/, "") !== "/games/new";
if (!uploads && !translation) return null;
return <aside className="upload-floating" aria-label="Фоновые задачи">
{uploads && <UploadProgress />}
<TranslationProgress />
{uploads && <Link to="/games/new" className="btn btn-primary">К загрузкам</Link>}
</aside>;
}