Track cleanup progress and polish profile/system flows
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
Typography,
|
||||
} from "@mui/material";
|
||||
|
||||
import { api } from "../api";
|
||||
import { api, getApiErrorMessage } from "../api";
|
||||
import { useI18n } from "../i18n/I18nProvider";
|
||||
|
||||
type SummarizerMetrics = {
|
||||
@@ -130,7 +130,7 @@ export default function AdminSystemPage() {
|
||||
const res = await api.get<SystemStatus>("/admin/system");
|
||||
setStatus(res.data);
|
||||
} catch (e: any) {
|
||||
setError(e?.response?.data || e?.message || "Failed to load system status.");
|
||||
setError(getApiErrorMessage(e, "Failed to load system status."));
|
||||
setStatus(null);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
@@ -164,7 +164,7 @@ export default function AdminSystemPage() {
|
||||
message: testEmailMessage.trim() || null,
|
||||
});
|
||||
} catch (e: any) {
|
||||
setError(e?.response?.data || e?.message || "Failed to send test email.");
|
||||
setError(getApiErrorMessage(e, "Failed to send test email."));
|
||||
} finally {
|
||||
setSendingTestEmail(false);
|
||||
}
|
||||
@@ -187,7 +187,7 @@ export default function AdminSystemPage() {
|
||||
await api.post("/admin/system/summarizer/probe");
|
||||
await load();
|
||||
} catch (e: any) {
|
||||
setError(e?.response?.data || e?.message || "Failed to run summarizer probe.");
|
||||
setError(getApiErrorMessage(e, "Failed to run summarizer probe."));
|
||||
} finally {
|
||||
setRunningProbe(false);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ type MeResponse = {
|
||||
} | null;
|
||||
};
|
||||
|
||||
const CV_UPLOAD_ACCEPT = ".pdf,.doc,.docx,.txt,.md,image/*,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown";
|
||||
const CV_UPLOAD_ACCEPT = ".pdf,.docx,.txt,.md,application/pdf,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown";
|
||||
const AVATAR_UPLOAD_ACCEPT = "image/png,image/jpeg,image/webp";
|
||||
|
||||
function initialsFrom(values: Array<string | undefined>) {
|
||||
|
||||
Reference in New Issue
Block a user