mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Add website ordering to state and settings page
This commit is contained in:
parent
70c6211e2c
commit
3926d3fe93
3 changed files with 46 additions and 2 deletions
|
|
@ -78,3 +78,14 @@ export function stringToColor(str) {
|
|||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
export function orderByWebsiteMap(websites, orderMap) {
|
||||
if (!websites) return [];
|
||||
|
||||
let ordered = [...websites];
|
||||
for (let website of websites) {
|
||||
ordered[orderMap[website.website_uuid]] = website;
|
||||
}
|
||||
|
||||
return ordered;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue