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:
@@ -42,11 +42,11 @@ class Content extends Component {
|
||||
|
||||
const isDesktop = Utils.isDesktop();
|
||||
const table = (
|
||||
<table className={`table-hover ${isDesktop ? '': 'table-thead-hidden'}`}>
|
||||
<table className={`table-hover ${isDesktop ? '' : 'table-thead-hidden'}`}>
|
||||
<thead>
|
||||
{isDesktop ? (
|
||||
<tr>
|
||||
<th width="4%">{/*icon*/}</th>
|
||||
<th width="4%">{/* icon*/}</th>
|
||||
<th width="34%"><a className="d-block table-sort-op" href="#" onClick={this.sortByName}>{gettext('Name')} {sortByName && sortIcon}</a></th>
|
||||
<th width="30%">{gettext('Share To')}</th>
|
||||
<th width="24%">{gettext('Permission')}</th>
|
||||
@@ -115,11 +115,11 @@ class Item extends Component {
|
||||
};
|
||||
|
||||
onMouseEnter = () => {
|
||||
this.setState({isOpIconShown: true});
|
||||
this.setState({ isOpIconShown: true });
|
||||
};
|
||||
|
||||
onMouseLeave = () => {
|
||||
this.setState({isOpIconShown: false});
|
||||
this.setState({ isOpIconShown: false });
|
||||
};
|
||||
|
||||
unshare = (e) => {
|
||||
@@ -174,7 +174,7 @@ class Item extends Component {
|
||||
}
|
||||
|
||||
seafileAPI.updateFolderSharePerm(item.repo_id, postData, options).then((res) => {
|
||||
this.setState({share_permission: permission});
|
||||
this.setState({ share_permission: permission });
|
||||
toaster.success(gettext('Successfully modified permission.'));
|
||||
}).catch((error) => {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
@@ -184,7 +184,7 @@ class Item extends Component {
|
||||
|
||||
onEditPermission = (event) => {
|
||||
event.nativeEvent.stopImmediatePropagation();
|
||||
this.setState({isShowPermEditor: true});
|
||||
this.setState({ isShowPermEditor: true });
|
||||
};
|
||||
|
||||
render() {
|
||||
@@ -245,7 +245,7 @@ class Item extends Component {
|
||||
/>
|
||||
)}
|
||||
</td>
|
||||
<td><a href="#" role="button" aria-label={gettext('Unshare')} className={`action-icon sf2-icon-x3 ${isOpIconShown ? '': 'invisible'}`} title={gettext('Unshare')} onClick={this.unshare}></a></td>
|
||||
<td><a href="#" role="button" aria-label={gettext('Unshare')} className={`action-icon sf2-icon-x3 ${isOpIconShown ? '' : 'invisible'}`} title={gettext('Unshare')} onClick={this.unshare}></a></td>
|
||||
</tr>
|
||||
);
|
||||
|
||||
@@ -279,7 +279,7 @@ class Item extends Component {
|
||||
</Dropdown>
|
||||
</td>
|
||||
</tr>
|
||||
{isPermSelectDialogOpen &&(
|
||||
{isPermSelectDialogOpen && (
|
||||
<PermSelect
|
||||
repoID={item.repo_id}
|
||||
currentPerm={share_permission}
|
||||
@@ -318,13 +318,13 @@ class ShareAdminFolders extends Component {
|
||||
|
||||
switch (`${sortBy}-${sortOrder}`) {
|
||||
case 'name-asc':
|
||||
comparator = function(a, b) {
|
||||
comparator = function (a, b) {
|
||||
var result = Utils.compareTwoWord(a.folder_name, b.folder_name);
|
||||
return result;
|
||||
};
|
||||
break;
|
||||
case 'name-desc':
|
||||
comparator = function(a, b) {
|
||||
comparator = function (a, b) {
|
||||
var result = Utils.compareTwoWord(a.folder_name, b.folder_name);
|
||||
return -result;
|
||||
};
|
||||
|
Reference in New Issue
Block a user