mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 14:17:13 +01:00
Added SettingsTable.
This commit is contained in:
parent
f84e41e198
commit
e2fcd40c2b
19 changed files with 335 additions and 300 deletions
|
|
@ -49,6 +49,10 @@
|
|||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
|
||||
.links span {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.links a:hover {
|
||||
color: var(--font-color100);
|
||||
border-bottom: 2px solid var(--primary400);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { useBreakpoint } from 'react-basics';
|
||||
import styles from './PageHeader.module.css';
|
||||
|
||||
export default function PageHeader({ title, children }) {
|
||||
const breakPoint = useBreakpoint();
|
||||
|
||||
return (
|
||||
<div className={classNames(styles.header, { [styles[breakPoint]]: true })}>
|
||||
<div className={styles.header}>
|
||||
<div className={styles.title}>{title}</div>
|
||||
<div className={styles.actions}>{children}</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@
|
|||
color: var(--base900);
|
||||
}
|
||||
|
||||
.header > div {
|
||||
line-height: 60px;
|
||||
}
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
@ -25,7 +29,22 @@
|
|||
line-height: 50px;
|
||||
}
|
||||
|
||||
.xs .actions,
|
||||
.sm .actions {
|
||||
flex-basis: 100%;
|
||||
.actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 992px) {
|
||||
.header {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.actions {
|
||||
flex-basis: 100%;
|
||||
order: -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,16 +20,16 @@ export default function SettingsLayout({ children }) {
|
|||
{ key: 'profile', label: formatMessage(labels.profile), url: '/settings/profile' },
|
||||
].filter(n => n);
|
||||
|
||||
const getKey = () => items.find(({ url }) => pathname.startsWith(url))?.key;
|
||||
const getKey = () => items.find(({ url }) => pathname === url)?.key;
|
||||
|
||||
return (
|
||||
<Row className={classNames({ [styles.hideMenu]: cloudMode })}>
|
||||
<Row>
|
||||
{!cloudMode && (
|
||||
<Column className={styles.menu} defaultSize={12} md={3} lg={2} xl={2}>
|
||||
<Column className={styles.menu} defaultSize={12} md={4} lg={3} xl={2}>
|
||||
<SideNav items={items} shallow={true} selectedKey={getKey()} />
|
||||
</Column>
|
||||
)}
|
||||
<Column className={styles.content} defaultSize={12} md={9} lg={10} xl={10}>
|
||||
<Column className={styles.content} defaultSize={12} md={8} lg={9} xl={10}>
|
||||
{children}
|
||||
</Column>
|
||||
</Row>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
min-height: 50vh;
|
||||
}
|
||||
|
||||
.hideMenu .content {
|
||||
margin: 0 auto;
|
||||
@media only screen and (max-width: 768px) {
|
||||
.menu {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,10 +13,3 @@
|
|||
padding: 0;
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
.menu {
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue