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

[favorites] rewrote it with React (#2417)

This commit is contained in:
llj
2018-10-08 15:33:40 +08:00
committed by Daniel Pan
parent fb0fc6f7ec
commit 237455f1a8
10 changed files with 439 additions and 9 deletions

View File

@@ -3,7 +3,7 @@ import { Link } from '@reach/router';
import { gettext, siteRoot } from './constants';
import { seafileAPI } from '../utils/seafile-api';
class MainSideNav extends React.Component {
class MainSideNav extends React.Component {
constructor(props) {
super(props);
let currentTab = this.props.currentTab || '';
@@ -146,8 +146,8 @@ class MainSideNav extends React.Component {
<h3 className="sf-heading">Tools</h3>
<ul className="side-tabnav-tabs">
<li className={`tab ${this.state.currentTab === 'favorites' ? 'tab-cur' : ''}`}>
<a href={siteRoot + '#starred/'} title={gettext('Favorites')} onClick={() => this.tabItemClick('favorites')}>
<li className={`tab ${this.state.currentTab === 'starred' ? 'tab-cur' : ''}`}>
<a href={siteRoot + 'starred/'} title={gettext('Favorites')} onClick={() => this.tabItemClick('favorites')}>
<span className="sf2-icon-star" aria-hidden="true"></span>
{gettext('Favorites')}
</a>