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.

35 lines
1.3KB

  1. import { h, Component } from 'preact';
  2. import { route } from 'preact-router';
  3. import WBNavbar from 'wb-navbar';
  4. import WBProjectListing from 'wb-project-listing';
  5. import WBInlineSearch from 'wb-inline-search';
  6. import WBProjectCrumbs from 'wb-project-crumbs';
  7. class WBBrowse extends Component {
  8. render({ ownerUuid, activePage, appCallbacks, appState }) {
  9. return (
  10. <div>
  11. <WBNavbar items={ [
  12. { 'name': 'Home', 'id': 'home', 'active': (ownerUuid === appState.currentUser.uuid) },
  13. { 'name': 'All Projects', 'id': 'all-projects', 'active': (!ownerUuid) },
  14. { 'name': 'User', 'dropdown': [ { 'id': 'sign-out', 'name': 'Sign Out' } ]}
  15. ] } rhs={ (
  16. <WBInlineSearch />
  17. ) } onItemClicked={ appCallbacks.navbarItemClicked } />
  18. <WBProjectCrumbs uuid={ ownerUuid } appState={ appState }
  19. onItemClicked={ item => route('/browse/' + item['uuid']) } />
  20. <WBProjectListing arvHost={ appState.arvHost }
  21. arvToken={ appState.arvToken }
  22. ownerUuid={ ownerUuid }
  23. itemsPerPage="5"
  24. activePage={ Number(activePage || 0) }
  25. onPageChanged={ i => route('/browse/' + (ownerUuid || '') + '/' + i)} />
  26. </div>
  27. );
  28. }
  29. }
  30. export default WBBrowse;