From a96d56063cb1d78aac4e3ba14f6aaece564b766f Mon Sep 17 00:00:00 2001 From: Timur Moziev Date: Mon, 2 Sep 2024 20:33:10 +0000 Subject: [PATCH] fix development name display --- src/developments.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/developments.ts b/src/developments.ts index d5e0436..5844730 100644 --- a/src/developments.ts +++ b/src/developments.ts @@ -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"}`, ); @@ -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) + ")")}`; } /**