IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.1KB

  1. import { h, Component } from 'preact';
  2. import WBNavbar from 'wb-navbar';
  3. import WBInlineSearch from 'wb-inline-search';
  4. class WBNavbarCommon extends Component {
  5. render({ app, items, activeItem, textSearch, textSearchNavigate }) {
  6. return (
  7. <WBNavbar
  8. items={ [
  9. { 'name': 'Home', 'id': 'home' },
  10. { 'name': 'All Projects', 'id': 'all-projects' },
  11. { 'name': 'All Users', 'id': 'all-users' },
  12. { 'name': 'Shared with Me', 'id': 'shared-with-me' },
  13. { 'name': 'Current User', 'dropdown': [ { 'id': 'sign-out', 'name': 'Sign Out' } ]},
  14. { name: (<span>What's New <sup><span class="badge badge-info">Info</span></sup></span>), id: 'whatsnew' }
  15. ].concat(items) }
  16. rhs={ textSearchNavigate ? (
  17. <WBInlineSearch textSearch={ textSearch } navigate={ textSearchNavigate } />
  18. ) : null }
  19. titleUrl = { '/browse/' + app.state.currentUser.uuid }
  20. getItemUrl={ item => app.navbarItemUrl(item) }
  21. activeItem={ activeItem } />
  22. );
  23. }
  24. }
  25. WBNavbarCommon.defaultProps = {
  26. 'items': []
  27. };
  28. export default WBNavbarCommon;