refactor: migrate project data models and transition editor state management to the new project-based API architecture.

This commit is contained in:
taDuc
2026-05-12 05:18:54 +07:00
parent 8f911abe35
commit 8f6d848d55
15 changed files with 162 additions and 169 deletions
@@ -3,7 +3,7 @@
import { useEffect, useMemo, useState } from "react";
import type { Entity } from "@/uhm/types/entities";
import type { WikiSnapshot } from "@/uhm/types/wiki";
import type { EntityWikiLinkSnapshot } from "@/uhm/types/sections";
import type { EntityWikiLinkSnapshot } from "@/uhm/types/projects";
type EntityChoice = { id: string; name: string };
type WikiChoice = { id: string; title: string; operation?: string };
+3 -3
View File
@@ -2,14 +2,14 @@ import { Panel } from "./Panel";
type ProjectPanelProps = {
sectionTitle: string;
sectionStatus: string;
projectStatus: string;
commitCount: number;
latestCommitLabel: string | null;
};
export function ProjectPanel({
sectionTitle,
sectionStatus,
projectStatus,
commitCount,
latestCommitLabel,
}: ProjectPanelProps) {
@@ -18,7 +18,7 @@ export function ProjectPanel({
<div style={{ fontSize: 12, color: "#cbd5e1", lineHeight: 1.4 }}>
<div style={{ color: "white", fontWeight: 850, overflowWrap: "anywhere" }}>{sectionTitle}</div>
<div style={{ marginTop: 6 }}>
Status: <span style={{ color: "#e2e8f0" }}>{sectionStatus}</span>
Status: <span style={{ color: "#e2e8f0" }}>{projectStatus}</span>
</div>
<div style={{ marginTop: 6 }}>
Commits: <span style={{ color: "#e2e8f0" }}>{commitCount}</span>