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!
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

wb-navbar-common.js 1.0KB

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;