Dashboard files: drop the root crumb from the breadcrumb

Every path rendered as "> Puter > user > ...", but the root crumb is
noise on anything beneath it. Render it only at the root itself, where
it's all there is to show (the Up button can still reach /, and an
empty breadcrumb bar there would strand the user). Each crumb keeps
its leading caret, including the first.
This commit is contained in:
jelveh
2026-07-29 20:12:22 -07:00
parent 007649296b
commit 97e4e78df4
+6 -1
View File
@@ -4264,7 +4264,12 @@ const TabFiles = {
}
}
}
let str = `${path_seperator_html}<span class="dirname" data-path="${html_encode('/')}">${html_encode(window.root_dirname)}</span>`;
// The root crumb ("Puter") is noise on every path beneath it, so it
// only renders at the root itself, where it's all there is to show.
// Every crumb keeps its leading caret, including the first.
let str = abs_path === '/'
? `${path_seperator_html}<span class="dirname" data-path="${html_encode('/')}">${html_encode(window.root_dirname)}</span>`
: '';
for ( let k = 1; k < dirs.length; k++ ) {
str += `${path_seperator_html}<span class="dirname" data-path="${html_encode(dirpaths[k])}">${dirs[k] === 'Trash' ? i18n('trash') : html_encode(dirs[k])}</span>`;
}