mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 07:08:55 +00:00
change markdown preview dialog internal link (#6829)
This commit is contained in:
@@ -16,18 +16,18 @@
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.seafile-markdown-viewer-modal-header .seafile-markdown-viewer-modal-header-left-name > span {
|
||||
.seafile-markdown-viewer-modal-header .seafile-markdown-viewer-modal-header-left-name img {
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.seafile-markdown-viewer-modal-header .seafile-markdown-viewer-modal-header-right-tool > span {
|
||||
.seafile-markdown-viewer-modal-header .seafile-markdown-viewer-modal-header-right-tool>span {
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
color: #000;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.seafile-markdown-viewer-modal-header .seafile-markdown-viewer-modal-header-right-tool > span:hover {
|
||||
.seafile-markdown-viewer-modal-header .seafile-markdown-viewer-modal-header-right-tool>span:hover {
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
|
@@ -3,6 +3,8 @@ import PropTypes from 'prop-types';
|
||||
import { Modal, ModalBody } from 'reactstrap';
|
||||
import { mediaUrl } from '../../utils/constants';
|
||||
import SeafileMarkdownViewer from '../seafile-markdown-viewer';
|
||||
import InternalLinkOperation from '../operations/internal-link-operation';
|
||||
import { Utils } from '../../utils/utils';
|
||||
|
||||
import './markdown-viewer-dialog.css';
|
||||
|
||||
@@ -22,6 +24,7 @@ const propTypes = {
|
||||
class MarkdownViewerDialog extends React.Component {
|
||||
|
||||
render() {
|
||||
const { repoID, filePath, fileName } = this.props;
|
||||
return (
|
||||
<Modal
|
||||
isOpen={true}
|
||||
@@ -33,7 +36,8 @@ class MarkdownViewerDialog extends React.Component {
|
||||
<div className='seafile-markdown-viewer-modal-header'>
|
||||
<div className='seafile-markdown-viewer-modal-header-left-name'>
|
||||
<span><img src={`${mediaUrl}img/file/256/md.png`} width='24' alt='' /></span>
|
||||
<span>{this.props.fileName}</span>
|
||||
<span>{fileName}</span>
|
||||
<InternalLinkOperation path={Utils.joinPath(filePath, fileName)} repoID={repoID} />
|
||||
</div>
|
||||
<div className='seafile-markdown-viewer-modal-header-right-tool'>
|
||||
<span className='sf3-font sf3-font-open' onClick={this.props.openMarkdownFile}></span>
|
||||
@@ -48,8 +52,8 @@ class MarkdownViewerDialog extends React.Component {
|
||||
lastModified = {this.props.lastModified}
|
||||
latestContributor={this.props.latestContributor}
|
||||
onLinkClick={this.props.onLinkClick}
|
||||
repoID={this.props.repoID}
|
||||
path={this.props.filePath}
|
||||
repoID={repoID}
|
||||
path={filePath}
|
||||
>
|
||||
</SeafileMarkdownViewer>
|
||||
</ModalBody>
|
||||
|
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import moment from 'moment';
|
||||
import { isPro, gettext, mediaUrl, siteRoot } from '../../utils/constants';
|
||||
import { InternalLinkOperation } from '../operations';
|
||||
import InternalLinkOperation from '../operations/internal-link-operation';
|
||||
|
||||
const propTypes = {
|
||||
toggleStar: PropTypes.func.isRequired,
|
||||
|
@@ -1,6 +0,0 @@
|
||||
import InternalLinkOperation from './internal-link-operation';
|
||||
import './style.css';
|
||||
|
||||
export {
|
||||
InternalLinkOperation,
|
||||
};
|
@@ -1,5 +1,5 @@
|
||||
.dialog-operation {
|
||||
display: flex;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
@@ -1,7 +1,8 @@
|
||||
import React, { Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { gettext } from '../../../utils/constants';
|
||||
import InternalLinkDialog from '../../dialog/internal-link-dialog';
|
||||
import { gettext } from '../../utils/constants';
|
||||
import InternalLinkDialog from '../dialog/internal-link-dialog';
|
||||
import './internal-link-operation.css';
|
||||
|
||||
const propTypes = {
|
||||
repoID: PropTypes.string.isRequired,
|
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import moment from 'moment';
|
||||
import { gettext } from '../../../utils/constants';
|
||||
import { InternalLinkOperation } from '../../../components/operations';
|
||||
import InternalLinkOperation from '../../../components/operations/internal-link-operation';
|
||||
|
||||
const { repoID, filePath } = window.app.pageOptions;
|
||||
|
||||
|
Reference in New Issue
Block a user