mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 09:21:54 +00:00
@@ -159,7 +159,7 @@ class Account extends Component {
|
||||
|
||||
Account.defaultProps = {
|
||||
isAdminPanel: false
|
||||
}
|
||||
};
|
||||
|
||||
Account.propTypes = propTypes;
|
||||
|
||||
|
@@ -10,15 +10,15 @@ const propTypes = {
|
||||
onNoticeItemClick: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
const MSG_TYPE_ADD_USER_TO_GROUP = 'add_user_to_group'
|
||||
const MSG_TYPE_REPO_SHARE = 'repo_share'
|
||||
const MSG_TYPE_REPO_SHARE_TO_GROUP = 'repo_share_to_group'
|
||||
const MSG_TYPE_REPO_TRANSFER = 'repo_transfer'
|
||||
const MSG_TYPE_FILE_UPLOADED = 'file_uploaded'
|
||||
const MSG_TYPE_FILE_COMMENT = 'file_comment'
|
||||
const MSG_TYPE_DRAFT_COMMENT = 'draft_comment'
|
||||
const MSG_TYPE_DRAFT_REVIEWER = 'draft_reviewer'
|
||||
const MSG_TYPE_GUEST_INVITATION_ACCEPTED = 'guest_invitation_accepted'
|
||||
const MSG_TYPE_ADD_USER_TO_GROUP = 'add_user_to_group';
|
||||
const MSG_TYPE_REPO_SHARE = 'repo_share';
|
||||
const MSG_TYPE_REPO_SHARE_TO_GROUP = 'repo_share_to_group';
|
||||
const MSG_TYPE_REPO_TRANSFER = 'repo_transfer';
|
||||
const MSG_TYPE_FILE_UPLOADED = 'file_uploaded';
|
||||
const MSG_TYPE_FILE_COMMENT = 'file_comment';
|
||||
const MSG_TYPE_DRAFT_COMMENT = 'draft_comment';
|
||||
const MSG_TYPE_DRAFT_REVIEWER = 'draft_reviewer';
|
||||
const MSG_TYPE_GUEST_INVITATION_ACCEPTED = 'guest_invitation_accepted';
|
||||
|
||||
class NoticeItem extends React.Component {
|
||||
|
||||
@@ -130,7 +130,7 @@ class NoticeItem extends React.Component {
|
||||
} else {
|
||||
notice = gettext('A file named {upload_file_link} is uploaded to {uploaded_link}.');
|
||||
notice = notice.replace('{upload_file_link}', fileName);
|
||||
notice = notice.replace('{uploaded_link}', '<strong>Deleted Library</strong>')
|
||||
notice = notice.replace('{uploaded_link}', '<strong>Deleted Library</strong>');
|
||||
}
|
||||
return {avatar_url, notice};
|
||||
}
|
||||
@@ -216,7 +216,7 @@ class NoticeItem extends React.Component {
|
||||
<p className="time">{moment(noticeItem.time).fromNow()}</p>
|
||||
</div>
|
||||
</li>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -203,7 +203,7 @@ class ContextMenu extends React.Component {
|
||||
<div role="menu" className="seafile-contextmenu dropdown-menu" style={inlineStyle} ref={menu => { this.menu = menu; }}>
|
||||
{this.state.menuList.map((menuItem, index) => {
|
||||
if (menuItem === 'Divider') {
|
||||
return <div key={index} className="seafile-divider dropdown-divider"></div>
|
||||
return <div key={index} className="seafile-divider dropdown-divider"></div>;
|
||||
} else {
|
||||
return (
|
||||
<button
|
||||
|
@@ -10,7 +10,7 @@ class GlobalEventListener {
|
||||
window.addEventListener(MENU_SHOW, this.handleShowEvent);
|
||||
window.addEventListener(MENU_HIDE, this.handleHideEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
handleShowEvent = (event) => {
|
||||
for (const id in this.callbacks) {
|
||||
|
@@ -157,7 +157,7 @@ class CopyDirent extends React.Component {
|
||||
} else {
|
||||
title = gettext('Copy selected item(s) to:');
|
||||
}
|
||||
let mode = this.props.repoEncrypted ? 'only_current_library':'current_repo_and_other_repos'
|
||||
let mode = this.props.repoEncrypted ? 'only_current_library':'current_repo_and_other_repos';
|
||||
return (
|
||||
<Modal isOpen={true} toggle={this.toggle}>
|
||||
<ModalHeader toggle={this.toggle}><div dangerouslySetInnerHTML={{__html: title}}></div></ModalHeader>
|
||||
|
@@ -36,7 +36,7 @@ class ListCreatedFileDialog extends React.Component {
|
||||
if (item.name.endsWith('(draft).md')) {
|
||||
fileURL = serviceURL + '/drafts/' + item.draft_id + '/';
|
||||
}
|
||||
let fileLink = <a href={fileURL} target='_blank'>{item.name}</a>
|
||||
let fileLink = <a href={fileURL} target='_blank'>{item.name}</a>;
|
||||
if (item.name.endsWith('(draft).md') && !item.draft_id) {
|
||||
fileLink = item.name;
|
||||
}
|
||||
|
@@ -127,7 +127,7 @@ class TaggedFile extends React.Component {
|
||||
return ( taggedFile.file_deleted ?
|
||||
<tr onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>
|
||||
<td colSpan='3' className="name">{taggedFile.filename}{' '}
|
||||
<span style={{color:"red"}}>{gettext('deleted')}</span>
|
||||
<span style={{color:'red'}}>{gettext('deleted')}</span>
|
||||
</td>
|
||||
<td><i className={className} onClick={this.props.onDeleteTaggedFile.bind(this, taggedFile)}></i></td>
|
||||
</tr>
|
||||
|
@@ -157,7 +157,7 @@ class MoveDirent extends React.Component {
|
||||
} else {
|
||||
title = gettext('Move selected item(s) to:');
|
||||
}
|
||||
let mode = this.props.repoEncrypted ? 'only_current_library':'current_repo_and_other_repos'
|
||||
let mode = this.props.repoEncrypted ? 'only_current_library':'current_repo_and_other_repos';
|
||||
return (
|
||||
<Modal isOpen={true} toggle={this.toggle}>
|
||||
<ModalHeader toggle={this.toggle}><div dangerouslySetInnerHTML={{__html: title}}></div></ModalHeader>
|
||||
|
@@ -16,7 +16,7 @@ class SearchResultItem extends React.Component {
|
||||
|
||||
render() {
|
||||
let item = this.props.item;
|
||||
let className = item.link_content ? "item-img" : "lib-item-img";
|
||||
let className = item.link_content ? 'item-img' : 'lib-item-img';
|
||||
let folderIconUrl = item.link_content ? Utils.getFolderIconUrl(false, 192) : Utils.getDefaultLibIconUrl(true);
|
||||
let fileIconUrl = item.is_dir ? folderIconUrl : Utils.getFileIconUrl(item.name, 192);
|
||||
return (
|
||||
|
@@ -426,7 +426,7 @@ class Draft extends React.Component {
|
||||
seafileAPI.publishDraft(draftID).then(res => {
|
||||
this.setState({
|
||||
freezePublish: !this.state.freezePublish
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -109,7 +109,7 @@ class MylibRepoListItem extends React.Component {
|
||||
} else {
|
||||
seafileAPI.starItem(this.props.repo.repo_id, '/').then(() => {
|
||||
this.setState({isStarred: !this.state.isStarred});
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,7 +351,7 @@ class MylibRepoListItem extends React.Component {
|
||||
</ModalPortal>
|
||||
)}
|
||||
</Fragment>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user