mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-05-16 09:39:29 +08:00
fix: skills count not displaying when adding
This commit is contained in:
@@ -74,11 +74,15 @@ export function RepoManager({
|
||||
}
|
||||
|
||||
try {
|
||||
await onAdd({
|
||||
const repoToAdd: SkillRepo = {
|
||||
owner: parsed.owner,
|
||||
name: parsed.name,
|
||||
branch: branch || "main",
|
||||
enabled: true,
|
||||
};
|
||||
await onAdd({
|
||||
...repoToAdd,
|
||||
count: getSkillCount(repoToAdd),
|
||||
});
|
||||
|
||||
setRepoUrl("");
|
||||
|
||||
@@ -61,11 +61,15 @@ export function RepoManagerPanel({
|
||||
}
|
||||
|
||||
try {
|
||||
await onAdd({
|
||||
const repoToAdd: SkillRepo = {
|
||||
owner: parsed.owner,
|
||||
name: parsed.name,
|
||||
branch: branch || "main",
|
||||
enabled: true,
|
||||
};
|
||||
await onAdd({
|
||||
...repoToAdd,
|
||||
count: getSkillCount(repoToAdd),
|
||||
});
|
||||
|
||||
setRepoUrl("");
|
||||
|
||||
@@ -168,6 +168,7 @@ export const SkillsPage = forwardRef<SkillsPageHandle, SkillsPageProps>(
|
||||
t("skills.repo.addSuccess", {
|
||||
owner: repo.owner,
|
||||
name: repo.name,
|
||||
count: repo.count || 0,
|
||||
}),
|
||||
{ closeButton: true },
|
||||
);
|
||||
|
||||
@@ -67,6 +67,7 @@ export interface SkillRepo {
|
||||
name: string;
|
||||
branch: string;
|
||||
enabled: boolean;
|
||||
count?: number;
|
||||
}
|
||||
|
||||
// ========== API ==========
|
||||
|
||||
Reference in New Issue
Block a user