mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 19:45:35 +01:00
Updated Dash
This commit is contained in:
parent
0a8d80196f
commit
ac7ed553ab
3 changed files with 3 additions and 8 deletions
|
|
@ -55,12 +55,7 @@ export function DashboardEdit({ teamId }: { teamId: string }) {
|
||||||
const orderedWebsites = [...ordered];
|
const orderedWebsites = [...ordered];
|
||||||
const [removed] = orderedWebsites.splice(source.index, 1);
|
const [removed] = orderedWebsites.splice(source.index, 1);
|
||||||
orderedWebsites.splice(destination.index, 0, removed);
|
orderedWebsites.splice(destination.index, 0, removed);
|
||||||
|
setOrder(orderedWebsites.filter(website => website?.id).map(website => website.id));
|
||||||
setOrder(
|
|
||||||
orderedWebsites
|
|
||||||
.map(website => website?.id)
|
|
||||||
.filter((id): id is string => typeof id === 'string'),
|
|
||||||
);
|
|
||||||
setEdited(true);
|
setEdited(true);
|
||||||
}
|
}
|
||||||
function handleActiveWebsites(id: string) {
|
function handleActiveWebsites(id: string) {
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ export function DashboardPage() {
|
||||||
<>
|
<>
|
||||||
{editing && <DashboardEdit teamId={teamId} />}
|
{editing && <DashboardEdit teamId={teamId} />}
|
||||||
{!editing &&
|
{!editing &&
|
||||||
(websiteActive.length != 0 ? (
|
(websiteActive.length !== 0 ? (
|
||||||
<>
|
<>
|
||||||
<WebsiteChartList
|
<WebsiteChartList
|
||||||
websites={result?.data as any}
|
websites={result?.data as any}
|
||||||
|
|
|
||||||
|
|
@ -390,7 +390,7 @@ export const messages = defineMessages({
|
||||||
},
|
},
|
||||||
noWebsitesToggled: {
|
noWebsitesToggled: {
|
||||||
id: 'message.no-websites-toggled',
|
id: 'message.no-websites-toggled',
|
||||||
defaultMessage: 'You have not toggled any websites',
|
defaultMessage: 'You have not toggled any websites.',
|
||||||
},
|
},
|
||||||
|
|
||||||
noTeamWebsites: {
|
noTeamWebsites: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue