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.

38 lines
1.1KB

  1. //
  2. // Copyright (C) Stanislaw Adaszewski, 2020
  3. // Contact: s.adaszewski@gmail.com
  4. // Website: https://adared.ch/wba
  5. // License: GNU Affero General Public License, Version 3
  6. //
  7. import { h, Component } from 'preact';
  8. import { route } from 'preact-router';
  9. import WBNavbarCommon from 'wb-navbar-common';
  10. import WBUserListing from 'wb-user-listing';
  11. class WBUsersPage extends Component {
  12. getUrl(params) {
  13. const url = '/users/' +
  14. Number('page' in params ? params.page : (this.props.page || 0)) + '/' +
  15. encodeURIComponent('textSearch' in params ? params.textSearch : (this.props.textSearch || ''));
  16. return url;
  17. // return ('/users/' + page);
  18. }
  19. render({ app, page, textSearch }) {
  20. return (
  21. <div>
  22. <WBNavbarCommon app={ app } activeItem="all-users"
  23. textSearch={ textSearch }
  24. textSearchNavigate={ textSearch => route(this.getUrl({ textSearch, page: 0 })) } />
  25. <WBUserListing app={ app } page={ Number(page || 0) }
  26. textSearch={ textSearch }
  27. getPageUrl={ page => this.getUrl({ page }) } />
  28. </div>
  29. );
  30. }
  31. };
  32. export default WBUsersPage;