From 1cdc719405226e939c4bd683629cf8c65de7efb6 Mon Sep 17 00:00:00 2001 From: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> Date: Thu, 17 Feb 2022 15:34:56 -0800 Subject: [PATCH] Add Create Bucket action to kbar (#1600) Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> --- portal-ui/src/screens/Console/ConsoleKBar.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/portal-ui/src/screens/Console/ConsoleKBar.tsx b/portal-ui/src/screens/Console/ConsoleKBar.tsx index bb8c07000..6e3745d96 100644 --- a/portal-ui/src/screens/Console/ConsoleKBar.tsx +++ b/portal-ui/src/screens/Console/ConsoleKBar.tsx @@ -33,6 +33,7 @@ import { connect } from "react-redux"; import { Action } from "kbar/lib/types"; import { Theme } from "@mui/material/styles"; import makeStyles from "@mui/styles/makeStyles"; +import { BucketsIcon } from "../../icons"; const useStyles = makeStyles((theme: Theme) => ({ resultItem: { @@ -109,6 +110,17 @@ const ConsoleKBar = ({ initialActions.push(a); } } + if (!operatorMode) { + // Add additional actions + const a: Action = { + id: `create-bucket`, + name: "Create Bucket", + section: "Buckets", + perform: () => history.push(`/add-bucket`), + icon: , + }; + initialActions.push(a); + } return ( - +