1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-26 15:26:19 +00:00

fix code format (#6365)

This commit is contained in:
Michael An
2024-07-18 11:58:42 +08:00
committed by GitHub
parent c5d02b33b2
commit 67210c7363
450 changed files with 2425 additions and 2385 deletions

View File

@@ -26,11 +26,11 @@ class Content extends Component {
}
onFreezedItem = () => {
this.setState({isItemFreezed: true});
this.setState({ isItemFreezed: true });
};
onUnfreezedItem = () => {
this.setState({isItemFreezed: false});
this.setState({ isItemFreezed: false });
};
getPreviousPageList = () => {
@@ -71,7 +71,7 @@ class Content extends Component {
<table>
<thead>
<tr>
<th width="5%">{/*icon*/}</th>
<th width="5%">{/* icon*/}</th>
<th width="25%">{gettext('Name')}</th>
<th width="15%">
{sortBy != undefined ?
@@ -84,7 +84,7 @@ class Content extends Component {
</th>
<th width="32%">ID</th>
<th width="18%">{gettext('Owner')}</th>
<th width="5%">{/*Operations*/}</th>
<th width="5%">{/* Operations*/}</th>
</tr>
</thead>
<tbody>
@@ -182,7 +182,7 @@ class RepoItem extends React.Component {
toggleOperationMenu = (e) => {
e.stopPropagation();
this.setState(
{isItemMenuShow: !this.state.isItemMenuShow }, () => {
{ isItemMenuShow: !this.state.isItemMenuShow }, () => {
if (this.state.isItemMenuShow) {
this.props.onFreezedItem();
} else {
@@ -224,7 +224,7 @@ class RepoItem extends React.Component {
};
toggleTransfer = () => {
this.setState({isTransferDialogShow: !this.state.isTransferDialogShow});
this.setState({ isTransferDialogShow: !this.state.isTransferDialogShow });
};
onTransferRepo = (user) => {
@@ -302,7 +302,7 @@ class OrgAllRepos extends Component {
};
}
componentDidMount () {
componentDidMount() {
let urlParams = (new URL(window.location)).searchParams;
const { currentPage = 1, perPage, sortBy } = this.state;
this.setState({
@@ -385,7 +385,7 @@ class OrgAllRepos extends Component {
transferRepoItem = (repoID, user) => {
this.setState({
repos: this.state.repos.map(item =>{
repos: this.state.repos.map(item => {
if (item.repoID == repoID) {
item.ownerEmail = user.email;
item.ownerName = user.value;

View File

@@ -12,8 +12,8 @@ class Nav extends React.Component {
constructor(props) {
super(props);
this.navItems = [
{name: 'all', urlPart: 'repoadmin', text: gettext('All')},
{name: 'trash', urlPart: 'repoadmin-trash', text: gettext('Trash')}
{ name: 'all', urlPart: 'repoadmin', text: gettext('All') },
{ name: 'trash', urlPart: 'repoadmin-trash', text: gettext('Trash') }
];
}

View File

@@ -27,11 +27,11 @@ class Content extends Component {
}
onFreezedItem = () => {
this.setState({isItemFreezed: true});
this.setState({ isItemFreezed: true });
};
onUnfreezedItem = () => {
this.setState({isItemFreezed: false});
this.setState({ isItemFreezed: false });
};
getPreviousPageList = () => {
@@ -60,11 +60,11 @@ class Content extends Component {
<table className="table-hover">
<thead>
<tr>
<th width="5%">{/*icon*/}</th>
<th width="5%">{/* icon*/}</th>
<th width="43%">{gettext('Name')}</th>
<th width="27%">{gettext('Owner')}</th>
<th width="20%">{gettext('Deleted Time')}</th>
<th width="5%">{/*Operations*/}</th>
<th width="5%">{/* Operations*/}</th>
</tr>
</thead>
<tbody>
@@ -178,19 +178,19 @@ class Item extends Component {
if (e) {
e.preventDefault();
}
this.setState({isDeleteRepoDialogOpen: !this.state.isDeleteRepoDialogOpen});
this.setState({ isDeleteRepoDialogOpen: !this.state.isDeleteRepoDialogOpen });
};
toggleRestoreRepoDialog = (e) => {
if (e) {
e.preventDefault();
}
this.setState({isRestoreRepoDialogOpen: !this.state.isRestoreRepoDialogOpen});
this.setState({ isRestoreRepoDialogOpen: !this.state.isRestoreRepoDialogOpen });
};
translateOperations = (item) => {
let translateResult = '';
switch(item) {
switch (item) {
case 'Restore':
translateResult = gettext('Restore');
break;
@@ -205,7 +205,7 @@ class Item extends Component {
};
onMenuItemClick = (operation) => {
switch(operation) {
switch (operation) {
case 'Restore':
this.toggleRestoreRepoDialog();
break;
@@ -217,7 +217,7 @@ class Item extends Component {
}
};
render () {
render() {
const { repo } = this.props;
const { isOpIconShown, isDeleteRepoDialogOpen, isRestoreRepoDialogOpen } = this.state;
const iconUrl = Utils.getLibIconUrl(repo);
@@ -297,7 +297,7 @@ class TrashRepos extends Component {
};
}
componentDidMount () {
componentDidMount() {
let urlParams = (new URL(window.location)).searchParams;
const { currentPage = 1, perPage } = this.state;
this.setState({
@@ -309,7 +309,7 @@ class TrashRepos extends Component {
}
toggleCleanTrashDialog = () => {
this.setState({isCleanTrashDialogOpen: !this.state.isCleanTrashDialogOpen});
this.setState({ isCleanTrashDialogOpen: !this.state.isCleanTrashDialogOpen });
};
getReposByPage = (page) => {
@@ -356,7 +356,7 @@ class TrashRepos extends Component {
cleanTrash = () => {
seafileAPI.orgAdminCleanTrashRepo(orgID).then(res => {
this.setState({repos: []});
this.setState({ repos: [] });
toaster.success(gettext('Successfully cleared trash.'));
}).catch(error => {
let errMessage = Utils.getErrorMsg(error);