1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-13 13:50:07 +00:00

[long name] fixup for repo/folder share/upload link pages with long library/folder/file names (#5990)

This commit is contained in:
llj
2024-03-22 12:01:12 +08:00
committed by GitHub
parent b66db74a7e
commit 8c14e4abac
3 changed files with 7 additions and 7 deletions

View File

@@ -89,7 +89,7 @@ class SharedFileView extends React.Component {
if (index != zipped.length - 1) {
return (
<React.Fragment key={index}>
<a href={`${siteRoot}d/${sharedToken}/?p=${encodeURIComponent(item.path)}`}>{item.name}</a>
<a className="text-truncate mx-1" href={`${siteRoot}d/${sharedToken}/?p=${encodeURIComponent(item.path)}`} title={item.name}>{item.name}</a>
<span> / </span>
</React.Fragment>
);
@@ -97,7 +97,7 @@ class SharedFileView extends React.Component {
return null;
})
}
{zipped[zipped.length - 1].name}
<span className="text-truncate ml-1" title={zipped[zipped.length - 1].name}>{zipped[zipped.length - 1].name}</span>
</React.Fragment>
);
};
@@ -119,7 +119,7 @@ class SharedFileView extends React.Component {
<div className="text-truncate">
<h2 className="ellipsis" title={fileName}>{fileName}</h2>
{zipped ?
<p className="m-0">{gettext('Current path: ')}{this.renderPath()}</p> :
<p className="m-0 d-flex">{gettext('Current path: ')}{this.renderPath()}</p> :
<p className="share-by ellipsis">{gettext('Shared by:')}{' '}{sharedBy}</p>
}
</div>

View File

@@ -37,8 +37,8 @@ class SharedUploadLink extends React.Component {
</div>
<div className="o-auto">
<div className="py-4 px-6 mx-auto rounded" id="upload-link-panel">
<h3 className="h5" dangerouslySetInnerHTML={{__html: gettext('Upload files to {folder_name_placeholder}')
.replace('{folder_name_placeholder}', `<span class="op-target">${Utils.HTMLescape(dirName)}</span>`)}}></h3>
<h3 className="h5 d-flex text-nowrap" dangerouslySetInnerHTML={{__html: gettext('Upload files to {folder_name_placeholder}')
.replace('{folder_name_placeholder}', `<span class="op-target text-truncate mx-1">${Utils.HTMLescape(dirName)}</span>`)}}></h3>
<p className="small shared-by" dangerouslySetInnerHTML={{__html: `${gettext('shared by:')} ${sharedBy.avatar} ${sharedBy.name}`}}></p>
{noQuota ? (
<div className="py-6 text-center">

View File

@@ -443,10 +443,10 @@ class SharedDirView extends React.Component {
</div>
<div className="o-auto">
<div className="shared-dir-view-main">
<h2 className="h3">{dirName}</h2>
<h2 className="h3 text-truncate" title={dirName}>{dirName}</h2>
<p>{gettext('Shared by: ')}{sharedBy}</p>
<div className="d-flex justify-content-between align-items-center op-bar">
<p className="m-0 mr-4 ellipsis d-flex align-items-center"><span className="flex-none">{gettext('Current path: ')}</span>{this.renderPath()}</p>
<p className="m-0 mr-4 ellipsis d-flex align-items-center">{gettext('Current path: ')}{this.renderPath()}</p>
<div className="flex-none">
{isDesktop &&
<div className="view-mode btn-group">