Merge branch 'dev' of https://github.com/mikecao/umami into dev

This commit is contained in:
Mike Cao 2022-06-01 18:28:13 -07:00
commit 8eb597ff72
3 changed files with 8 additions and 6 deletions

View File

@ -32,7 +32,9 @@ export default function Dashboard() {
return ( return (
<Page> <Page>
<PageHeader> <PageHeader>
<div>Dashboard</div> <div>
<FormattedMessage id="label.dashboard" defaultMessage="Dashboard" />
</div>
<DashboardSettingsButton /> <DashboardSettingsButton />
</PageHeader> </PageHeader>
<WebsiteList websites={data} showCharts={showCharts} limit={max} /> <WebsiteList websites={data} showCharts={showCharts} limit={max} />

View File

@ -5,14 +5,14 @@ import useApi from './useApi';
export default function useFetch(url, options = {}, update = []) { export default function useFetch(url, options = {}, update = []) {
const [response, setResponse] = useState(); const [response, setResponse] = useState();
const [error, setError] = useState(); const [error, setError] = useState();
const [loading, setLoadiing] = useState(false); const [loading, setLoading] = useState(false);
const [count, setCount] = useState(0); const [count, setCount] = useState(0);
const { get } = useApi(); const { get } = useApi();
const { params = {}, headers = {}, disabled, delay = 0, interval, onDataLoad } = options; const { params = {}, headers = {}, disabled, delay = 0, interval, onDataLoad } = options;
async function loadData(params) { async function loadData(params) {
try { try {
setLoadiing(true); setLoading(true);
setError(null); setError(null);
const time = performance.now(); const time = performance.now();
@ -32,7 +32,7 @@ export default function useFetch(url, options = {}, update = []) {
console.error(e); console.error(e);
setError(e); setError(e);
} finally { } finally {
setLoadiing(false); setLoading(false);
} }
} }

View File

@ -51,7 +51,7 @@
"label.settings": "Einstellungen", "label.settings": "Einstellungen",
"label.share-url": "Freigabe-URL", "label.share-url": "Freigabe-URL",
"label.single-day": "Ein Tag", "label.single-day": "Ein Tag",
"label.theme": "Theme", "label.theme": "Thema",
"label.this-month": "Diesen Monat", "label.this-month": "Diesen Monat",
"label.this-week": "Diese Woche", "label.this-week": "Diese Woche",
"label.this-year": "Dieses Jahr", "label.this-year": "Dieses Jahr",
@ -92,7 +92,7 @@
"metrics.countries": "Länder", "metrics.countries": "Länder",
"metrics.device.desktop": "Desktop", "metrics.device.desktop": "Desktop",
"metrics.device.laptop": "Laptop", "metrics.device.laptop": "Laptop",
"metrics.device.mobile": "Mobiltelefon", "metrics.device.mobile": "Handy",
"metrics.device.tablet": "Tablet", "metrics.device.tablet": "Tablet",
"metrics.devices": "Geräte", "metrics.devices": "Geräte",
"metrics.events": "Ereignisse", "metrics.events": "Ereignisse",