mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-23 22:47:19 +00:00
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:
@@ -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>`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user