mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 16:31:13 +00:00
record sord type&order (#3133)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React,{ Fragment } from 'react';
|
||||
import { Popover } from 'reactstrap';
|
||||
import PropTypes from 'prop-types';
|
||||
import cookie from 'react-cookies';
|
||||
import { gettext, siteRoot, username, loginUrl, canAddRepo } from '../../utils/constants';
|
||||
import { Link } from '@reach/router';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
@@ -42,8 +43,8 @@ class GroupView extends React.Component {
|
||||
currentRepo: null,
|
||||
isStaff: false,
|
||||
isOwner: false,
|
||||
sortBy: 'name', // 'name' or 'time'
|
||||
sortOrder: 'asc', // 'asc' or 'desc'
|
||||
sortBy: cookie.load('seafile-repo-sort-by') || 'name', // 'name' or 'time'
|
||||
sortOrder: cookie.load('seafile-repo-sort-order') || 'asc', // 'asc' or 'desc'
|
||||
repoList: [],
|
||||
libraryType: 'group',
|
||||
isCreateRepoDialogShow: false,
|
||||
@@ -330,6 +331,8 @@ class GroupView extends React.Component {
|
||||
}
|
||||
|
||||
sortItems = (sortBy, sortOrder) => {
|
||||
cookie.save('seafile-repo-sort-by', sortBy);
|
||||
cookie.save('seafile-repo-sort-order', sortOrder);
|
||||
this.setState({
|
||||
sortBy: sortBy,
|
||||
sortOrder: sortOrder,
|
||||
|
Reference in New Issue
Block a user