Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
+16
-13
@@ -21,6 +21,7 @@ export type CommandActionScope = {
|
||||
adminOnly?: boolean;
|
||||
featureFlag?: string;
|
||||
permission?: string;
|
||||
anyPermissions?: string[];
|
||||
};
|
||||
|
||||
export type CommandAction = {
|
||||
@@ -105,7 +106,7 @@ function getAppCommandActions({ t, navigate, submitLogout, appData, rootData }:
|
||||
keywords: "",
|
||||
subtitle: t("app.sidebar.settings"),
|
||||
scope: tenantScope({ permission: "app.settings.members.view" }),
|
||||
perform: () => navigate(tenantPath("settings/members")),
|
||||
perform: () => navigate(tenantPath("settings/team")),
|
||||
});
|
||||
pushPermissionAction(actions, appData, "app.settings.subscription.view", {
|
||||
id: "subscription",
|
||||
@@ -114,7 +115,7 @@ function getAppCommandActions({ t, navigate, submitLogout, appData, rootData }:
|
||||
keywords: "",
|
||||
subtitle: t("app.sidebar.settings"),
|
||||
scope: tenantScope({ permission: "app.settings.subscription.view" }),
|
||||
perform: () => navigate(tenantPath("settings/subscription")),
|
||||
perform: () => navigate(tenantPath("settings/billing")),
|
||||
});
|
||||
pushPermissionAction(actions, appData, "app.settings.account.view", {
|
||||
id: "account",
|
||||
@@ -123,7 +124,7 @@ function getAppCommandActions({ t, navigate, submitLogout, appData, rootData }:
|
||||
keywords: "",
|
||||
subtitle: t("app.sidebar.settings"),
|
||||
scope: tenantScope({ permission: "app.settings.account.view" }),
|
||||
perform: () => navigate(tenantPath("settings/account")),
|
||||
perform: () => navigate(tenantPath("settings/workspace")),
|
||||
});
|
||||
|
||||
if (rootData.appConfiguration.app.features.tenantApiKeys) {
|
||||
@@ -132,9 +133,9 @@ function getAppCommandActions({ t, navigate, submitLogout, appData, rootData }:
|
||||
name: t("models.apiKey.plural"),
|
||||
shortcut: [],
|
||||
keywords: "",
|
||||
subtitle: t("app.sidebar.settings"),
|
||||
subtitle: t("models.apiKey.plural"),
|
||||
scope: tenantScope({ featureFlag: "tenantApiKeys", permission: "app.settings.apiKeys.view" }),
|
||||
perform: () => navigate(tenantPath("settings/api")),
|
||||
perform: () => navigate(tenantPath("api")),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -146,7 +147,7 @@ function getAppCommandActions({ t, navigate, submitLogout, appData, rootData }:
|
||||
keywords: "",
|
||||
subtitle: t("app.sidebar.settings"),
|
||||
scope: tenantScope({ permission: "app.settings.auditTrails.view" }),
|
||||
perform: () => navigate(tenantPath("settings/logs")),
|
||||
perform: () => navigate(tenantPath("settings/compliance")),
|
||||
});
|
||||
actions.push({
|
||||
id: "events",
|
||||
@@ -155,7 +156,7 @@ function getAppCommandActions({ t, navigate, submitLogout, appData, rootData }:
|
||||
keywords: "",
|
||||
subtitle: t("app.sidebar.settings"),
|
||||
scope: tenantScope({ permission: "app.settings.auditTrails.view" }),
|
||||
perform: () => navigate(tenantPath("settings/logs/events")),
|
||||
perform: () => navigate(tenantPath("settings/compliance/events")),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -208,14 +209,15 @@ function getAdminCommandActions({ t, navigate, submitLogout, rootData }: Command
|
||||
return [];
|
||||
}
|
||||
|
||||
const actions = getSidebarCommandActions(AdminSidebar({ t, appConfiguration: rootData.appConfiguration, routing: rootData.routing }), "admin").map(
|
||||
(action) => ({
|
||||
const actions = getSidebarCommandActions(
|
||||
AdminSidebar({ t, appConfiguration: rootData.appConfiguration, routing: rootData.routing }),
|
||||
"admin"
|
||||
).map((action) => ({
|
||||
...action,
|
||||
perform(currentAction: CommandAction) {
|
||||
navigateOrAssign(currentAction.id, navigate);
|
||||
},
|
||||
})
|
||||
);
|
||||
}));
|
||||
actions.push({
|
||||
id: "create account",
|
||||
shortcut: [],
|
||||
@@ -272,7 +274,8 @@ function getCommandsFromSidebarItem(item: SideBarItem, layout: CommandRegistryLa
|
||||
return commands;
|
||||
}
|
||||
const isExpandableOnlyParent = item.isCollapsible && item.items && item.items.length > 0;
|
||||
if (item.path && item.title && !isExpandableOnlyParent) {
|
||||
const childOwnsDestination = item.items?.some((subItem) => subItem.path === item.path);
|
||||
if (item.path && item.title && !isExpandableOnlyParent && !childOwnsDestination) {
|
||||
let description = item.description ?? "";
|
||||
const parentTitles = parent.filter((value) => value);
|
||||
if (parentTitles.length > 0) {
|
||||
@@ -283,7 +286,7 @@ function getCommandsFromSidebarItem(item: SideBarItem, layout: CommandRegistryLa
|
||||
name: item.title,
|
||||
shortcut: [],
|
||||
subtitle: description,
|
||||
scope: { layout, platform: true, adminOnly: layout === "admin", permission: item.permission },
|
||||
scope: { layout, platform: true, adminOnly: layout === "admin", permission: item.permission, anyPermissions: item.anyPermissions },
|
||||
});
|
||||
}
|
||||
item.items?.forEach((subItem) => getCommandsFromSidebarItem(subItem, layout, commands, [...parent, item.title]));
|
||||
|
||||
Reference in new issue
Block a user