diff --git a/frontend/src/components/file-view/file-toolbar.js b/frontend/src/components/file-view/file-toolbar.js index 7a147759546..27951be1b38 100644 --- a/frontend/src/components/file-view/file-toolbar.js +++ b/frontend/src/components/file-view/file-toolbar.js @@ -1,6 +1,6 @@ import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; -import { ButtonGroup, ButtonDropdown, Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap'; +import { ButtonGroup, Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap'; import IconButton from '../icon-button'; import { gettext, siteRoot } from '../../utils/constants'; import { Utils } from '../../utils/utils'; @@ -114,7 +114,7 @@ class FileToolbar extends React.Component { return ( - +
{fileType == 'PDF' && ( )} - {showLockUnlockBtn && ( +
- +
: (this.props.needSave ? : - +
))} {canDownloadFile && ( )} - + @@ -202,9 +196,12 @@ class FileToolbar extends React.Component { {gettext('History')} )} + + {gettext('Open parent folder')} + - -
+ + diff --git a/frontend/src/components/icon-button.js b/frontend/src/components/icon-button.js index 3e902d4a7a8..515b3f6d04c 100644 --- a/frontend/src/components/icon-button.js +++ b/frontend/src/components/icon-button.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Button, Tooltip } from 'reactstrap'; +import { Tooltip } from 'reactstrap'; import Icon from './icon'; const propTypes = { @@ -28,9 +28,8 @@ class IconButton extends React.Component { }; render() { - const className = 'btn-icon'; const btnContent = ( - + <> {this.props.text} - + ); if (this.props.tag && this.props.tag == 'a') { return ( - + ); } else { return ( - + ); } } diff --git a/frontend/src/css/file-view.css b/frontend/src/css/file-view.css index f11dd7c652e..ddbf4705b4f 100644 --- a/frontend/src/css/file-view.css +++ b/frontend/src/css/file-view.css @@ -13,11 +13,31 @@ body { flex-shrink: 0; } -.file-view-header .btn { - color: #666; +.file-view-header .file-toolbar-btn { + width: 28px; + height: 28px; + margin-right: 10px; + cursor: pointer; + display: flex; + justify-content: center; + align-items: center; } -.file-view-header .btn#save-file { +.file-view-header .file-toolbar-btn:hover { + background-color: #EFEFEF; + border-radius: 3px; +} + +.file-view-header .file-toolbar-btn.disabled { + opacity: 0.65; + cursor: default; +} + +.file-view-header .file-toolbar-btn.disabled:hover { + background-color: #fff; +} + +.file-view-header .file-toolbar-btn#save-file { color: #eb8205; }