mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
Add reset order button to website settings
This commit is contained in:
parent
ef4bf8282a
commit
76bdb6b1d6
@ -182,6 +182,13 @@ export default function WebsiteSettings() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resetWebsiteOrder() {
|
||||||
|
setDashboard({
|
||||||
|
...store,
|
||||||
|
websiteOrdering: {},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -207,9 +214,14 @@ export default function WebsiteSettings() {
|
|||||||
<div>
|
<div>
|
||||||
<FormattedMessage id="label.websites" defaultMessage="Websites" />
|
<FormattedMessage id="label.websites" defaultMessage="Websites" />
|
||||||
</div>
|
</div>
|
||||||
|
<div className={styles.headerButtons}>
|
||||||
|
<Button size="small" onClick={() => resetWebsiteOrder()}>
|
||||||
|
<FormattedMessage id="label.reset-order" defaultMessage="Reset order" />
|
||||||
|
</Button>
|
||||||
<Button icon={<Plus />} size="small" onClick={() => setAddWebsite(true)}>
|
<Button icon={<Plus />} size="small" onClick={() => setAddWebsite(true)}>
|
||||||
<FormattedMessage id="label.add-website" defaultMessage="Add website" />
|
<FormattedMessage id="label.add-website" defaultMessage="Add website" />
|
||||||
</Button>
|
</Button>
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
<Table
|
<Table
|
||||||
columns={user.is_admin ? adminColumns : columns}
|
columns={user.is_admin ? adminColumns : columns}
|
||||||
|
@ -11,3 +11,9 @@
|
|||||||
.detailLink {
|
.detailLink {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.headerButtons {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
"label.refresh": "Refresh",
|
"label.refresh": "Refresh",
|
||||||
"label.required": "Required",
|
"label.required": "Required",
|
||||||
"label.reset": "Reset",
|
"label.reset": "Reset",
|
||||||
|
"label.reset-order": "Reset order",
|
||||||
"label.reset-website": "Reset statistics",
|
"label.reset-website": "Reset statistics",
|
||||||
"label.save": "Save",
|
"label.save": "Save",
|
||||||
"label.settings": "Settings",
|
"label.settings": "Settings",
|
||||||
|
Loading…
Reference in New Issue
Block a user