mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 02:06:19 +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) {
|
||||
return null;
|
||||
}
|
||||
@ -207,9 +214,14 @@ export default function WebsiteSettings() {
|
||||
<div>
|
||||
<FormattedMessage id="label.websites" defaultMessage="Websites" />
|
||||
</div>
|
||||
<Button icon={<Plus />} size="small" onClick={() => setAddWebsite(true)}>
|
||||
<FormattedMessage id="label.add-website" defaultMessage="Add website" />
|
||||
</Button>
|
||||
<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)}>
|
||||
<FormattedMessage id="label.add-website" defaultMessage="Add website" />
|
||||
</Button>
|
||||
</div>
|
||||
</PageHeader>
|
||||
<Table
|
||||
columns={user.is_admin ? adminColumns : columns}
|
||||
|
@ -11,3 +11,9 @@
|
||||
.detailLink {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.headerButtons {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 10px;
|
||||
}
|
||||
|
@ -47,6 +47,7 @@
|
||||
"label.refresh": "Refresh",
|
||||
"label.required": "Required",
|
||||
"label.reset": "Reset",
|
||||
"label.reset-order": "Reset order",
|
||||
"label.reset-website": "Reset statistics",
|
||||
"label.save": "Save",
|
||||
"label.settings": "Settings",
|
||||
|
Loading…
Reference in New Issue
Block a user