mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-13 22:01:06 +00:00
[long name] fixup for repo/folder share/upload link pages with long library/folder/file names (#5990)
This commit is contained in:
@@ -89,7 +89,7 @@ class SharedFileView extends React.Component {
|
|||||||
if (index != zipped.length - 1) {
|
if (index != zipped.length - 1) {
|
||||||
return (
|
return (
|
||||||
<React.Fragment key={index}>
|
<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>
|
<span> / </span>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
@@ -97,7 +97,7 @@ class SharedFileView extends React.Component {
|
|||||||
return null;
|
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>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -119,7 +119,7 @@ class SharedFileView extends React.Component {
|
|||||||
<div className="text-truncate">
|
<div className="text-truncate">
|
||||||
<h2 className="ellipsis" title={fileName}>{fileName}</h2>
|
<h2 className="ellipsis" title={fileName}>{fileName}</h2>
|
||||||
{zipped ?
|
{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>
|
<p className="share-by ellipsis">{gettext('Shared by:')}{' '}{sharedBy}</p>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
@@ -37,8 +37,8 @@ class SharedUploadLink extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
<div className="o-auto">
|
<div className="o-auto">
|
||||||
<div className="py-4 px-6 mx-auto rounded" id="upload-link-panel">
|
<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}')
|
<h3 className="h5 d-flex text-nowrap" dangerouslySetInnerHTML={{__html: gettext('Upload files to {folder_name_placeholder}')
|
||||||
.replace('{folder_name_placeholder}', `<span class="op-target">${Utils.HTMLescape(dirName)}</span>`)}}></h3>
|
.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>
|
<p className="small shared-by" dangerouslySetInnerHTML={{__html: `${gettext('shared by:')} ${sharedBy.avatar} ${sharedBy.name}`}}></p>
|
||||||
{noQuota ? (
|
{noQuota ? (
|
||||||
<div className="py-6 text-center">
|
<div className="py-6 text-center">
|
||||||
|
@@ -443,10 +443,10 @@ class SharedDirView extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
<div className="o-auto">
|
<div className="o-auto">
|
||||||
<div className="shared-dir-view-main">
|
<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>
|
<p>{gettext('Shared by: ')}{sharedBy}</p>
|
||||||
<div className="d-flex justify-content-between align-items-center op-bar">
|
<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">
|
<div className="flex-none">
|
||||||
{isDesktop &&
|
{isDesktop &&
|
||||||
<div className="view-mode btn-group">
|
<div className="view-mode btn-group">
|
||||||
|
Reference in New Issue
Block a user