Improve MineGeo interface and functionality

This commit is contained in:
2026-10-06 19:24:41 +05:00
parent 7404f1dc1c
commit 233e4d57f0
67 changed files with 3053 additions and 643 deletions

View File

@@ -1,4 +1,6 @@
"use client";
import { useI18n } from "@/components/I18nProvider";
import { useEffect, useState } from "react";
import {
processingStage,
@@ -6,6 +8,7 @@ import {
} from "@/shared/processing-progress";
export function ProcessingProgress({ job }: { job: ProcessingJob | null }) {
const { t } = useI18n();
const [now, setNow] = useState<number | null>(null);
useEffect(() => {
setNow(Date.now());
@@ -22,20 +25,24 @@ export function ProcessingProgress({ job }: { job: ProcessingJob | null }) {
<div className="processing-progress" role="status" aria-live="polite">
<p>
{job.state === "queued"
? "Waiting for a processing worker"
: `${progress}% · ${job.kind === "map" ? "Refreshing guessing map" : processingStage(progress)}`}
? t("Waiting for a processing worker")
: `${progress}% · ${job.kind === "map" ? t("Refreshing guessing map") : t(processingStage(progress))}`}
</p>
<progress
max={100}
value={progress}
aria-label="Map processing progress"
aria-label={t("Map processing progress")}
/>
<p className="muted">
{stopped
? "The worker has stopped reporting. Check its terminal and restart it if necessary. Your uploaded export is saved."
? t(
"The worker has stopped reporting. Check its terminal and restart it if necessary. Your uploaded export is saved.",
)
: job.state === "running"
? "Worker connected. Large exports can take a while; progress measures completed work."
: "Processing will start when a worker is available."}
? t(
"Worker connected. Large exports can take a while; progress measures completed work.",
)
: t("Processing will start when a worker is available.")}
</p>
</div>
);