1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 22:54:11 +00:00

[fix] fix activities UI and text edit button (#2971)

This commit is contained in:
Michael An
2019-02-20 17:46:18 +08:00
committed by Daniel Pan
parent afcd66ceef
commit 8783680442
3 changed files with 14 additions and 8 deletions

View File

@@ -26,7 +26,7 @@ import 'codemirror/mode/go/go';
import 'codemirror/mode/python/python';
import 'codemirror/mode/htmlmixed/htmlmixed';
const { isPro, repoID, repoName, filePath, fileName, siteName, enableWatermark, encoding, fileEncodingList, fileExt, isLocked, fileContent, latestContributor, lastModified, isStarred } = window.app.pageOptions;
const { isPro, repoID, repoName, filePath, fileName, siteName, enableWatermark, encoding, fileEncodingList, fileExt, isLocked, fileContent, latestContributor, lastModified, isStarred, err } = window.app.pageOptions;
const options = {
lineNumbers: false,
mode: Utils.chooseLanguage(fileExt.slice(3, fileExt.length -3)),
@@ -118,12 +118,14 @@ class ViewFileText extends React.Component {
onMouseDown={() => this.handleMouseDown('history')}
icon={'fa fa-history'}
/>
<IconButton
id={'shareBtn'}
text={gettext('Edit')}
icon={'fa fa-edit'}
onMouseDown={() => this.handleMouseDown('edit')}
/>
{ !err &&
<IconButton
id={'editButton'}
text={gettext('Edit')}
icon={'fa fa-edit'}
onMouseDown={() => this.handleMouseDown('edit')}
/>
}
<IconButton
id={'downloadButton'}
text={gettext('Download File')}