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!
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930
  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;