mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-16 02:05:04 +01:00
Merge branch 'dev' of https://github.com/umami-software/umami into dev
This commit is contained in:
commit
6a9f7ba0e5
@ -1,7 +1,9 @@
|
||||
import styles from './Pager.module.css';
|
||||
import { Button, Flexbox, Icon, Icons } from 'react-basics';
|
||||
import useMessages from 'hooks/useMessages';
|
||||
|
||||
export function Pager({ page, pageSize, count, onPageChange, onPageSizeChange }) {
|
||||
export function Pager({ page, pageSize, count, onPageChange }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const maxPage = Math.ceil(count / pageSize);
|
||||
const lastPage = page === maxPage;
|
||||
const firstPage = page === 1;
|
||||
@ -24,7 +26,9 @@ export function Pager({ page, pageSize, count, onPageChange, onPageSizeChange })
|
||||
<Icons.ChevronDown />
|
||||
</Icon>
|
||||
</Button>
|
||||
<Flexbox alignItems="center" className={styles.text}>{`Page ${page} of ${maxPage}`}</Flexbox>
|
||||
<Flexbox alignItems="center" className={styles.text}>
|
||||
{formatMessage(labels.pageOf, { x: page, y: maxPage })}
|
||||
</Flexbox>
|
||||
<Button onClick={() => handlePageChange(1)} disabled={lastPage}>
|
||||
<Icon size="lg" className={styles.icon} rotate={270}>
|
||||
<Icons.ChevronDown />
|
||||
|
@ -213,8 +213,11 @@ export const EVENT_COLORS = [
|
||||
|
||||
export const DOMAIN_REGEX =
|
||||
/^(localhost(:[1-9]\d{0,4})?|((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9-]+(-[a-z0-9-]+)*\.)+(xn--)?[a-z0-9-]{2,63})$/;
|
||||
|
||||
export const SHARE_ID_REGEX = /^[a-zA-Z0-9]{16}$/;
|
||||
export const UUID_REGEX =
|
||||
/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/;
|
||||
export const HOSTNAME_REGEX =
|
||||
/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$/;
|
||||
|
||||
export const DESKTOP_SCREEN_WIDTH = 1920;
|
||||
export const LAPTOP_SCREEN_WIDTH = 1024;
|
||||
|
Loading…
Reference in New Issue
Block a user