From 3dfb27d447f7bdba96ef4473eb1ebcd82392b99f Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Mon, 16 Sep 2024 00:12:36 +0530 Subject: [PATCH] feat: display shell code exporter at the top --- .../CollectionItem/GenerateCodeItem/StyledWrapper.js | 2 +- packages/bruno-app/src/utils/codegenerator/targets.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/StyledWrapper.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/StyledWrapper.js index c866498ec..ca582a842 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/StyledWrapper.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/StyledWrapper.js @@ -8,7 +8,7 @@ const StyledWrapper = styled.div` .generate-code-sidebar { background-color: ${(props) => props.theme.collection.environment.settings.sidebar.bg}; border-right: solid 1px ${(props) => props.theme.collection.environment.settings.sidebar.borderRight}; - max-height: 90vh; + max-height: 80vh; height: 100%; overflow-y: auto; } diff --git a/packages/bruno-app/src/utils/codegenerator/targets.js b/packages/bruno-app/src/utils/codegenerator/targets.js index 6197d9b55..95b222dbc 100644 --- a/packages/bruno-app/src/utils/codegenerator/targets.js +++ b/packages/bruno-app/src/utils/codegenerator/targets.js @@ -18,6 +18,14 @@ export const getLanguages = () => { client })); allLanguages.push(...languages); + + // Move "Shell-curl" to the top of the array + const shellCurlIndex = allLanguages.findIndex(lang => lang.name === "Shell-curl"); + if (shellCurlIndex !== -1) { + const [shellCurl] = allLanguages.splice(shellCurlIndex, 1); + allLanguages.unshift(shellCurl); + } } + return allLanguages; }; \ No newline at end of file