mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 16:31:13 +00:00
repair history bug (#2929)
* repair history bug * update seafile-js version * update padding
This commit is contained in:
6
frontend/package-lock.json
generated
6
frontend/package-lock.json
generated
@@ -10846,9 +10846,9 @@
|
||||
}
|
||||
},
|
||||
"seafile-js": {
|
||||
"version": "0.2.60",
|
||||
"resolved": "https://registry.npmjs.org/seafile-js/-/seafile-js-0.2.60.tgz",
|
||||
"integrity": "sha512-vIFBymsVV67eI0t09EVboYZR1h9drSjYXwNEKlpKlKuj2r7CG5TgE5uUtsnF69s6FeZhGe8INekjhl7UOg8SeQ==",
|
||||
"version": "0.2.61",
|
||||
"resolved": "https://registry.npmjs.org/seafile-js/-/seafile-js-0.2.61.tgz",
|
||||
"integrity": "sha512-fVQ8GlU95TgwnjOtRqvyiBtOah/lV/CnnT0yZzJnFYgCKKLpoGm+2aazUZaSjHQgP+r9u8ei14CMXnzQUiPTWg==",
|
||||
"requires": {
|
||||
"axios": "^0.18.0",
|
||||
"form-data": "^2.3.2",
|
||||
|
@@ -33,7 +33,7 @@
|
||||
"react-moment": "^0.7.9",
|
||||
"react-select": "^2.1.1",
|
||||
"reactstrap": "^6.4.0",
|
||||
"seafile-js": "^0.2.60",
|
||||
"seafile-js": "^0.2.61",
|
||||
"socket.io-client": "^2.2.0",
|
||||
"sw-precache-webpack-plugin": "0.11.4",
|
||||
"unified": "^7.0.0",
|
||||
|
@@ -243,8 +243,7 @@ class DirentListItem extends React.Component {
|
||||
onHistory = () => {
|
||||
let repoID = this.props.repoID;
|
||||
let filePath = this.getDirentPath(this.props.dirent);
|
||||
let referer = location.href;
|
||||
let url = URLDecorator.getUrl({type: 'file_revisions', repoID: repoID, filePath: filePath, referer: referer});
|
||||
let url = URLDecorator.getUrl({type: 'file_revisions', repoID: repoID, filePath: filePath});
|
||||
location.href = url;
|
||||
}
|
||||
|
||||
|
@@ -35,6 +35,10 @@
|
||||
border: 1px solid #e6e6dd;
|
||||
}
|
||||
|
||||
.markdown-viewer-render-content .diff-view {
|
||||
padding: 40px 60px;
|
||||
}
|
||||
|
||||
.panel-header {
|
||||
position: relative;
|
||||
padding: .5rem 0;
|
||||
|
@@ -40,10 +40,10 @@ class FileHistory extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
setDiffContent = (newmarkdownContent, oldMarkdownContent)=> {
|
||||
setDiffContent = (newMarkdownContent, oldMarkdownContent)=> {
|
||||
this.setState({
|
||||
renderingContent: false,
|
||||
newmarkdownContent: newmarkdownContent,
|
||||
newMarkdownContent: newMarkdownContent,
|
||||
oldMarkdownContent: oldMarkdownContent,
|
||||
});
|
||||
}
|
||||
|
@@ -28,16 +28,18 @@ class MainPanel extends React.Component {
|
||||
return (
|
||||
<div className="main-panel">
|
||||
<div className="main-panel-center content-viewer">
|
||||
{
|
||||
this.props.renderingContent ?
|
||||
(<div className={contentClass + ' article'}><Loading /></div>) :
|
||||
(<div className={contentClass + ' article'}>
|
||||
<DiffViewer
|
||||
newMarkdownContent={this.props.newMarkdownContent}
|
||||
oldMarkdownContent={this.props.oldMarkdownContent}
|
||||
/>
|
||||
</div>)
|
||||
}
|
||||
<div className={contentClass}>
|
||||
{
|
||||
this.props.renderingContent ?
|
||||
(<Loading />) :
|
||||
(<div className="diff-view article">
|
||||
<DiffViewer
|
||||
newMarkdownContent={this.props.newMarkdownContent}
|
||||
oldMarkdownContent={this.props.oldMarkdownContent}
|
||||
/>
|
||||
</div>)
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
@@ -17,7 +17,7 @@ class URLDecorator {
|
||||
url = siteRoot + 'lib/' + options.repoID + '/file' + Utils.encodePath(options.filePath) + '?dl=1';
|
||||
break;
|
||||
case 'file_revisions':
|
||||
params = 'p=' + Utils.encodePath(options.filePath) + '&referer=' + Utils.encodePath(options.referer);
|
||||
params = 'p=' + Utils.encodePath(options.filePath);
|
||||
url = siteRoot + 'repo/file_revisions/' + options.repoID + '/?' + params;
|
||||
break;
|
||||
case 'open_via_client':
|
||||
|
Reference in New Issue
Block a user