mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 15:53:28 +00:00
System page list wiki (#7195)
* add All wikis optimize * update * optimize * select wiki info by sql * optimize publish wiki * update * optimize ui * update * Update repos.js * optimize varname * Update wiki-card-item.js --------- Co-authored-by: 孙永强 <11704063+s-yongqiang@user.noreply.gitee.com> Co-authored-by: r350178982 <32759763+r350178982@users.noreply.github.com>
This commit is contained in:
@@ -31,7 +31,7 @@ class DeleteRepoDialog extends Component {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
seafileAPI.getRepoFolderShareInfo(this.props.repo.repo_id).then((res) => {
|
||||
seafileAPI.getRepoFolderShareInfo(this.props.repo.id).then((res) => {
|
||||
this.setState({
|
||||
sharedToUserCount: res.data['shared_user_emails'].length,
|
||||
sharedToGroupCount: res.data['shared_group_ids'].length,
|
||||
|
@@ -13,6 +13,7 @@ const propTypes = {
|
||||
wiki: PropTypes.object,
|
||||
onPublish: PropTypes.func.isRequired,
|
||||
toggleCancel: PropTypes.func.isRequired,
|
||||
handleCustomUrl: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
const DEFAULT_URL = serviceURL + '/wiki/publish/';
|
||||
@@ -22,7 +23,7 @@ class PublishWikiDialog extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
url: this.props.customUrl,
|
||||
url: this.props.customUrlString,
|
||||
errMessage: '',
|
||||
isSubmitBtnActive: false,
|
||||
};
|
||||
@@ -62,6 +63,7 @@ class PublishWikiDialog extends React.Component {
|
||||
let wiki_id = this.props.wiki.id;
|
||||
wikiAPI.deletePublishWikiLink(wiki_id).then((res) => {
|
||||
this.setState({ url: '' });
|
||||
this.props.handleCustomUrl('');
|
||||
toaster.success(gettext('Wiki custom URL deleted'));
|
||||
}).catch((error) => {
|
||||
if (error.response) {
|
||||
@@ -128,7 +130,7 @@ class PublishWikiDialog extends React.Component {
|
||||
{this.state.errMessage && <Alert color="danger" className="mt-2">{this.state.errMessage}</Alert>}
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
{this.props.customUrl !== '' &&
|
||||
{this.props.customUrlString !== '' &&
|
||||
<Button color="secondary" onClick={this.deleteCustomUrl}>{gettext('Unpublish')}</Button>
|
||||
}
|
||||
<Button color="primary" onClick={this.handleSubmit} disabled={!this.state.isSubmitBtnActive}>{gettext('Submit')}</Button>
|
||||
|
Reference in New Issue
Block a user