Skip to content

Commit

Permalink
fix development name display
Browse files Browse the repository at this point in the history
  • Loading branch information
TimurRin committed Sep 2, 2024
1 parent 483ca39 commit a96d560
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/developments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ export async function getDevelopmentStatus(development: AncaDevelopment) {
statuses.push(pc.bgRed("issues: " + development.state.issues.length));
}

if (development.state != null && development.state.config != null) {
if (
hasAncaJson &&
development.state != null &&
development.state.config != null
) {
statuses.unshift(
`${development.state.config.stack || "unsupported"} ${development.state.config.type || "project"}`,
);
Expand Down Expand Up @@ -119,7 +123,7 @@ export async function syncDevelopment(development: AncaDevelopment) {
export function getDevelopmentDisplayName(
development: AncaDevelopment,
): string {
return `${development.state?.config.namings?.text || development.data?.name || development.fullPath}${pc.dim(" (" + (development.data?.folder || "-") + ")")}`;
return `${development.state?.config.namings?.text || development.data?.name || development.fullPath.split("/").pop()}${pc.dim(" (" + (development.data?.folder || development.fullPath) + ")")}`;
}

/**
Expand Down

0 comments on commit a96d560

Please sign in to comment.