mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 08:37:13 +01:00
Refactored layout. Added NavBar component.
This commit is contained in:
parent
fad38dc180
commit
1d9c3133f0
56 changed files with 601 additions and 429 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { useState } from 'react';
|
||||
import { Button, Icon, Modal, useToast } from 'react-basics';
|
||||
import { Button, Icon, Text, Modal, useToast, Icons } from 'react-basics';
|
||||
import useApi from 'hooks/useApi';
|
||||
import EmptyPlaceholder from 'components/common/EmptyPlaceholder';
|
||||
import WebsiteAddForm from 'components/pages/settings/websites/WebsiteAddForm';
|
||||
|
|
@ -8,6 +8,8 @@ import WebsitesTable from 'components/pages/settings/websites/WebsitesTable';
|
|||
import Page from 'components/layout/Page';
|
||||
import useUser from 'hooks/useUser';
|
||||
|
||||
const { Plus } = Icons;
|
||||
|
||||
export default function WebsitesList() {
|
||||
const [edit, setEdit] = useState(false);
|
||||
const { get, useQuery } = useApi();
|
||||
|
|
@ -44,8 +46,11 @@ export default function WebsitesList() {
|
|||
<Page loading={isLoading} error={error}>
|
||||
{toast}
|
||||
<PageHeader title="Websites">
|
||||
<Button onClick={handleAdd}>
|
||||
<Icon icon="plus" /> Add website
|
||||
<Button variant="primary" onClick={handleAdd}>
|
||||
<Icon>
|
||||
<Plus />
|
||||
</Icon>
|
||||
<Text>Add website</Text>
|
||||
</Button>
|
||||
</PageHeader>
|
||||
|
||||
|
|
@ -53,7 +58,10 @@ export default function WebsitesList() {
|
|||
{!hasData && (
|
||||
<EmptyPlaceholder message="You don't have any websites configured.">
|
||||
<Button variant="primary" onClick={handleAdd}>
|
||||
<Icon icon="plus" /> Add website
|
||||
<Icon>
|
||||
<Plus />
|
||||
</Icon>
|
||||
<Text>Add website</Text>
|
||||
</Button>
|
||||
</EmptyPlaceholder>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,12 @@ import {
|
|||
TableColumn,
|
||||
Button,
|
||||
Icon,
|
||||
Icons,
|
||||
} from 'react-basics';
|
||||
import ExternalLink from 'assets/external-link.svg';
|
||||
import styles from './WebsitesTable.module.css';
|
||||
|
||||
const { ArrowRight, External } = Icons;
|
||||
|
||||
export default function WebsitesTable({ columns = [], rows = [] }) {
|
||||
return (
|
||||
<Table className={styles.table} columns={columns} rows={rows}>
|
||||
|
|
@ -33,7 +35,9 @@ export default function WebsitesTable({ columns = [], rows = [] }) {
|
|||
<Link href={`/settings/websites/${id}`}>
|
||||
<a>
|
||||
<Button>
|
||||
<Icon icon="arrow-right" />
|
||||
<Icon>
|
||||
<ArrowRight />
|
||||
</Icon>
|
||||
Settings
|
||||
</Button>
|
||||
</a>
|
||||
|
|
@ -42,7 +46,7 @@ export default function WebsitesTable({ columns = [], rows = [] }) {
|
|||
<a>
|
||||
<Button>
|
||||
<Icon>
|
||||
<ExternalLink />
|
||||
<External />
|
||||
</Icon>
|
||||
View
|
||||
</Button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue