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!
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

wb-users-page.js 1.1KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // Copyright (C) Stanislaw Adaszewski, 2020
  3. // Contact: s.adaszewski@gmail.com
  4. // Website: https://adared.ch/wba
  5. // License: GPLv3
  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;