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