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!
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

31 líneas
1.0KB

  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. ].concat(items) }
  15. rhs={ textSearchNavigate ? (
  16. <WBInlineSearch textSearch={ textSearch } navigate={ textSearchNavigate } />
  17. ) : null }
  18. titleUrl = { '/browse/' + app.state.currentUser.uuid }
  19. getItemUrl={ item => app.navbarItemUrl(item) }
  20. activeItem={ activeItem } />
  21. );
  22. }
  23. }
  24. WBNavbarCommon.defaultProps = {
  25. 'items': []
  26. };
  27. export default WBNavbarCommon;