mirror of
https://github.com/garethgeorge/backrest.git
synced 2026-05-30 00:10:54 +00:00
fix: backup ordering in tree view
This commit is contained in:
@@ -297,12 +297,14 @@ const buildTreeLeaf = (operations: BackupInfo[]): OpTreeNode[] => {
|
||||
}
|
||||
|
||||
return {
|
||||
key: b.id!,
|
||||
key: b.id,
|
||||
backup: b,
|
||||
icon: icon,
|
||||
};
|
||||
});
|
||||
entries.sort(sortByKey);
|
||||
entries.sort((a, b) => {
|
||||
return b.backup!.startTimeMs - a.backup!.startTimeMs;
|
||||
});
|
||||
return entries;
|
||||
};
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ import { Config } from "../../gen/ts/v1/config.pb";
|
||||
import { useAlertApi } from "../components/Alerts";
|
||||
import { useShowModal } from "../components/ModalManager";
|
||||
import { MainContentArea, useSetContent } from "./MainContentArea";
|
||||
import { AddPlanModal } from "./AddPlanModal";
|
||||
import { uiBuildVersion } from "../state/buildcfg";
|
||||
import { ActivityBar } from "../components/ActivityBar";
|
||||
|
||||
@@ -121,7 +120,8 @@ const getSidenavItems = (config: Config | null): MenuProps["items"] => {
|
||||
size="small"
|
||||
shape="circle"
|
||||
icon={<SettingOutlined />}
|
||||
onClick={() => {
|
||||
onClick={async () => {
|
||||
const { AddPlanModal } = await import("./AddPlanModal");
|
||||
showModal(<AddPlanModal template={plan} />);
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user