ui: show file names instead of full paths in shares
This commit is contained in:
@@ -2702,6 +2702,20 @@ handleDragLeave(e) {
|
||||
return normalized.startsWith('/') ? normalized : `/${normalized}`;
|
||||
},
|
||||
|
||||
getPathBaseName(pathValue, preferredName = '') {
|
||||
if (typeof preferredName === 'string' && preferredName.trim()) {
|
||||
return preferredName.trim();
|
||||
}
|
||||
|
||||
const normalized = this.normalizeSharePath(pathValue || '/');
|
||||
if (normalized === '/') {
|
||||
return '/';
|
||||
}
|
||||
|
||||
const segments = normalized.split('/').filter(Boolean);
|
||||
return segments.length > 0 ? segments[segments.length - 1] : '/';
|
||||
},
|
||||
|
||||
isShareAllFiles(share) {
|
||||
if (!share) return false;
|
||||
const shareType = share.share_type || 'file';
|
||||
|
||||
Reference in New Issue
Block a user