mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-10 03:11:07 +00:00
rewrote 'text file view' & tidied 'file view' code (#2996)
This commit is contained in:
@@ -16,7 +16,7 @@ const {
|
||||
canLockUnlockFile,
|
||||
repoID, repoName, parentDir, filePerm, filePath,
|
||||
canEditFile, err,
|
||||
encoding, // for 'edit', not undefined only for some kinds of files
|
||||
fileEnc, // for 'edit', not undefined only for some kinds of files (e.g. text file)
|
||||
canDownloadFile, enableComment
|
||||
} = window.app.pageOptions;
|
||||
|
||||
@@ -70,7 +70,7 @@ class FileToolbar extends React.Component {
|
||||
icon="fa fa-edit"
|
||||
text={gettext('Edit')}
|
||||
tag="a"
|
||||
href={`${siteRoot}repo/${repoID}/file/edit/?p=${encodeURIComponent(filePath)}&file_enc=${encodeURIComponent(encoding)}`}
|
||||
href={`${siteRoot}repo/${repoID}/file/edit/?p=${encodeURIComponent(filePath)}&file_enc=${encodeURIComponent(fileEnc)}`}
|
||||
/>
|
||||
)}
|
||||
{canDownloadFile && (
|
||||
|
Reference in New Issue
Block a user