1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-07 18:03:48 +00:00

[draft] removed related code & files (#5993)

* [draft] removed related code & files

* [draft] removed related code & files
This commit is contained in:
llj
2024-03-25 17:22:01 +08:00
committed by GitHub
parent 43f66cbbca
commit 4375115548
43 changed files with 29 additions and 1405 deletions

View File

@@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import { Button, Modal, ModalHeader, ModalBody, ModalFooter, Table } from 'reactstrap';
import { gettext, siteRoot, serviceURL } from '../../utils/constants';
import { gettext, siteRoot } from '../../utils/constants';
import { Utils } from '../../utils/utils';
const propTypes = {
@@ -33,11 +33,8 @@ class ListCreatedFileDialog extends React.Component {
{
activity.createdFilesList.map((item, index) => {
let fileURL = `${siteRoot}lib/${item.repo_id}/file${Utils.encodePath(item.path)}`;
if (item.name.endsWith('(draft).md')) {
fileURL = serviceURL + '/drafts/' + item.draft_id + '/';
}
let fileLink = <a href={fileURL} target='_blank' rel="noreferrer">{item.name}</a>;
if (item.name.endsWith('(draft).md') && !item.draft_id) {
if (item.name.endsWith('(draft).md')) { // be compatible with the existing draft files
fileLink = item.name;
}
return (