fix ui home folder

This commit is contained in:
DioCrafts
2025-04-04 04:30:49 +02:00
parent 868119e405
commit e3256bb3b5
3 changed files with 101 additions and 23 deletions
+7 -2
View File
@@ -362,12 +362,17 @@ const ui = {
return window.i18n.t(key);
};
// First determine if the current view is the user's home folder
const isUserHomeFolder = username && window.app.userHomeFolderName &&
window.app.userHomeFolderName.includes(username) &&
folderName === window.app.userHomeFolderName;
// Set appropriate text for home item
if (username && folderName && folderName.includes(username)) {
if (isUserHomeFolder) {
// If the current folder is the user's home folder, label it as "Home"
homeItem.textContent = getTranslatedText('breadcrumb.home', 'Home');
} else if (folderName && folderName.startsWith('Mi Carpeta')) {
// If the current folder is another user's home folder or a special folder, use its name
// If viewing a root folder but not the user's home folder, use its full name
homeItem.textContent = folderName;
} else {
// Default - use "Home" label