Skip to content

Commit 090f82c

Browse files
committed
fix: tweak folder chooser labels
1 parent 567fa05 commit 090f82c

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/engine/TemplateEngine.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -259,26 +259,26 @@ export abstract class TemplateEngine extends QuickAddEngine {
259259
const display = displayByNormalized.get(normalized);
260260
const displayPath = item || "/";
261261
const isExisting = existingSet.has(normalized);
262-
const mainText = display ?? displayPath;
263-
const subText = display && display !== displayPath
264-
? displayPath
265-
: !isExisting
266-
? "Create folder"
267-
: "";
262+
let mainText = display ?? displayPath;
263+
let subText = "";
264+
265+
if (display === "<current folder>") {
266+
mainText = displayPath;
267+
subText = "Current folder";
268+
} else if (display && display !== displayPath) {
269+
mainText = displayPath;
270+
subText = display;
271+
} else if (!isExisting) {
272+
mainText = displayPath;
273+
subText = "Create folder";
274+
}
268275

269276
const content = el.createDiv("qa-suggestion-content");
270277
content.createSpan({
271278
cls: "suggestion-main-text",
272279
text: mainText,
273280
});
274281

275-
if (!isExisting) {
276-
content.createSpan({
277-
cls: "qa-suggestion-pill qa-create-pill",
278-
text: "create",
279-
});
280-
}
281-
282282
if (subText) {
283283
el.createSpan({
284284
cls: "suggestion-sub-text",

0 commit comments

Comments
 (0)