diff --git a/contributing.md b/contributing.md index 8916dd10..1da38268 100644 --- a/contributing.md +++ b/contributing.md @@ -1,12 +1,12 @@ -**English** | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) | [Deutsch](/contributing_de.md) | [Español](/contributing_es.md) +**English** | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) | [Deutsch](/contributing_de.md) | [Français](/contributing_fr.md) | [Español](/contributing_es.md) -## Lets make bruno better, together !! +## Let's make bruno better, together !! I am happy that you are looking to improve bruno. Below are the guidelines to get started bringing up bruno on your computer. ### Technology Stack -Bruno is built using NextJs and React. We also use electron to ship a desktop version (that supports local collections) +Bruno is built using Next.js and React. We also use electron to ship a desktop version (that supports local collections) Libraries we use @@ -23,7 +23,7 @@ Libraries we use You would need [Node v18.x or the latest LTS version](https://nodejs.org/en/) and npm 8.x. We use npm workspaces in the project -### Lets start coding +### Let's start coding Please reference [development.md](docs/development.md) for instructions on running the local development environment. diff --git a/contributing_de.md b/contributing_de.md index 06909348..b6c687a0 100644 --- a/contributing_de.md +++ b/contributing_de.md @@ -1,4 +1,4 @@ -[English](/contributing.md) | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) | **Deutsch** | [Español](/contributing_es.md) +[English](/contributing.md) | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) | **Deutsch** | [Français](/contributing_fr.md) | [Español](/contributing_es.md) ## Lass uns Bruno noch besser machen, gemeinsam !! @@ -6,7 +6,7 @@ Ich freue mich, dass Du Bruno verbessern möchtest. Hier findest Du eine Anleitu ### Technologie Stack -Bruno ist mit NextJs und React erstellt. Außerdem benötigen wir electron für die Desktop Version (die lokale Sammlungen unterstützt). +Bruno ist mit Next.js und React erstellt. Außerdem benötigen wir electron für die Desktop Version (die lokale Sammlungen unterstützt). Bibliotheken die wir benutzen diff --git a/contributing_es.md b/contributing_es.md index 6874f214..02fd298f 100644 --- a/contributing_es.md +++ b/contributing_es.md @@ -1,4 +1,4 @@ -[English](/contributing.md) | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) | [Deutsch](/contributing_de.md) | **Español** +[English](/contributing.md) | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) | [Deutsch](/contributing_de.md) | [Français](/contributing_fr.md) | **Español** ## ¡Juntos, hagamos a Bruno mejor! diff --git a/contributing_fr.md b/contributing_fr.md new file mode 100644 index 00000000..76bca587 --- /dev/null +++ b/contributing_fr.md @@ -0,0 +1,37 @@ +[English](/contributing.md) | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) | [Deutsch](/contributing_de.md) | **Français** | [Español](/contributing_es.md) + +## Ensemble, améliorons Bruno ! + +Je suis content de voir que vous envisagez améliorer Bruno. Ci-dessous, vous trouverez les règles et guides pour récupérer Bruno sur votre ordinateur. + +### Technologies utilisées + +Bruno est construit en utilisant NextJs et React. Nous utilisons aussi Electron pour embarquer la version ordinateur (qui permet les collections locales). + +Les bibliothèques que nous utilisons : + +- CSS - Tailwind +- Code Editors - Codemirror +- State Management - Redux +- Icons - Tabler Icons +- Forms - formik +- Schema Validation - Yup +- Request Client - axios +- Filesystem Watcher - chokidar + +### Dépendances + +Vous aurez besoin de [Node v18.x ou la dernière version LTS](https://nodejs.org/en/) et npm 8.x. Nous utilisons aussi les espaces de travail npm (_npm workspaces_) dans ce projet. + +### Commençons à coder + +Veuillez vous référez à la [documentation de développement](docs/development_fr.md) pour les instructions de démarrage de l'environnement de développement local. + +### Ouvrir une Pull Request + +- Merci de conserver les PR petites et focalisées sur un seul objectif +- Merci de suivre le format de nom des branches + - feature/[feature name]: Cette branche devrait contenir une fonctionnalité spécifique + - Exemple: feature/dark-mode + - bugfix/[bug name]: Cette branche devrait contenir seulement une solution pour pour une bogue spécifique + - Exemple: bugfix/bug-1 diff --git a/contributing_ru.md b/contributing_ru.md index 8d281f79..e0d89a84 100644 --- a/contributing_ru.md +++ b/contributing_ru.md @@ -1,4 +1,4 @@ -[English](/contributing.md) | [Українська](/contributing_ua.md) | **Русский** | [Türkçe](/contributing_tr.md) | [Deutsch](/contributing_de.md) | [Español](/contributing_es.md) +[English](/contributing.md) | [Українська](/contributing_ua.md) | **Русский** | [Türkçe](/contributing_tr.md) | [Deutsch](/contributing_de.md) | [Français](/contributing_fr.md) | [Español](/contributing_es.md) ## Давайте вместе сделаем Бруно лучше!!! @@ -6,7 +6,7 @@ ### Стек -Bruno построен с использованием NextJs и React. Мы также используем electron для поставки десктопной версии ( которая поддерживает локальные коллекции ) +Bruno построен с использованием Next.js и React. Мы также используем electron для поставки десктопной версии ( которая поддерживает локальные коллекции ) Библиотеки, которые мы используем diff --git a/contributing_tr.md b/contributing_tr.md index 2ca3f323..8746af10 100644 --- a/contributing_tr.md +++ b/contributing_tr.md @@ -1,4 +1,4 @@ -[English](/readme.md) | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | **Türkçe** | [Deutsch](/contributing_de.md) | [Español](/contributing_es.md) +[English](/readme.md) | [Українська](/contributing_ua.md) | [Русский](/contributing_ru.md) | **Türkçe** | [Deutsch](/contributing_de.md) | [Français](/contributing_fr.md) | [Español](/contributing_es.md) ## Bruno'yu birlikte daha iyi hale getirelim !! @@ -6,7 +6,7 @@ Bruno'yu geliştirmek istemenizden mutluluk duyuyorum. Aşağıda, bruno'yu bilg ### Kullanılan Teknolojiler -Bruno, NextJs ve React kullanılarak oluşturulmuştur. Ayrıca bir masaüstü sürümü (yerel koleksiyonları destekleyen) göndermek için electron kullanıyoruz +Bruno, Next.js ve React kullanılarak oluşturulmuştur. Ayrıca bir masaüstü sürümü (yerel koleksiyonları destekleyen) göndermek için electron kullanıyoruz Kullandığımız kütüphaneler diff --git a/contributing_ua.md b/contributing_ua.md index 27740981..96ead255 100644 --- a/contributing_ua.md +++ b/contributing_ua.md @@ -1,4 +1,4 @@ -[English](/contributing.md) | **Українська** | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) | [Deutsch](/contributing_de.md) | [Español](/contributing_es.md) +[English](/contributing.md) | **Українська** | [Русский](/contributing_ru.md) | [Türkçe](/contributing_tr.md) | [Deutsch](/contributing_de.md) | [Français](/contributing_fr.md) | [Español](/contributing_es.md) ## Давайте зробимо Bruno краще, разом !! @@ -6,7 +6,7 @@ ### Стек технологій -Bruno побудований на NextJs та React. Також для десктопної версії (яка підтримує локальні колекції) використовується Electron +Bruno побудований на Next.js та React. Також для десктопної версії (яка підтримує локальні колекції) використовується Electron Бібліотеки, які ми використовуємо diff --git a/docs/development.md b/docs/development.md index 43cd56d6..ed41e69c 100644 --- a/docs/development.md +++ b/docs/development.md @@ -1,8 +1,8 @@ -**English** | [Українська](/docs/development_ua.md) | [Русский](/docs/development_ru.md) | [Deutsch](/docs/development_de.md) | [Español](/docs/development_es.md) +**English** | [Українська](/docs/development_ua.md) | [Русский](/docs/development_ru.md) | [Deutsch](/docs/development_de.md) | [Français](/docs/development_fr.md) | [Español](/docs/development_es.md) ## Development -Bruno is being developed as a desktop app. You need to load the app by running the nextjs app in one terminal and then run the electron app in another terminal. +Bruno is being developed as a desktop app. You need to load the app by running the Next.js app in one terminal and then run the electron app in another terminal. ### Dependencies diff --git a/docs/development_de.md b/docs/development_de.md index 272e649d..9960d892 100644 --- a/docs/development_de.md +++ b/docs/development_de.md @@ -1,8 +1,8 @@ -[English](/docs/development.md) | [Українська](/docs/development_ua.md) | [Русский](/docs/development_ru.md) | **Deutsch** | [Español](/docs/development_es.md) +[English](/docs/development.md) | [Українська](/docs/development_ua.md) | [Русский](/docs/development_ru.md) | **Deutsch** | [Français](/docs/development_fr.md) | [Español](/docs/development_es.md) ## Entwicklung -Bruno wird als Desktop-Anwendung entwickelt. Um die App zu starten, musst Du zuerst die NextJs-App in einem Terminal ausführen und anschließend in einem anderen Terminal die Electron-App. +Bruno wird als Desktop-Anwendung entwickelt. Um die App zu starten, musst Du zuerst die Next.js App in einem Terminal ausführen und anschließend in einem anderen Terminal die Electron-App. ### Abhängigkeiten diff --git a/docs/development_es.md b/docs/development_es.md index 0718dc93..3318aec9 100644 --- a/docs/development_es.md +++ b/docs/development_es.md @@ -1,4 +1,4 @@ -[English](/docs/development.md) | [Українська](/docs/development_ua.md) | [Русский](/docs/development_ru.md) | [Deutsch](/docs/development_de.md) | **Español** +[English](/docs/development.md) | [Українська](/docs/development_ua.md) | [Русский](/docs/development_ru.md) | [Deutsch](/docs/development_de.md) | [Français](/docs/development_fr.md) | **Español** ## Desarrollo diff --git a/docs/development_fr.md b/docs/development_fr.md new file mode 100644 index 00000000..dae1aeac --- /dev/null +++ b/docs/development_fr.md @@ -0,0 +1,55 @@ +[English](/docs/development.md) | [Українська](/docs/development_ua.md) | [Русский](/docs/development_ru.md) | [Deutsch](/docs/development_de.md) | **Français** | [Español](/docs/development_es.md) + +## Développement + +Bruno est développé comme une application de _lourde_. Vous devez charger l'application en démarrant nextjs dans un terminal, puis démarre l'application Electron dans un autre terminal. + +### Dépendances + +- NodeJS v18 + +### Développement local + +```bash +# use nodejs 18 version +nvm use + +# install deps +npm i --legacy-peer-deps + +# build graphql docs +npm run build:graphql-docs + +# build bruno query +npm run build:bruno-query + +# run next app (terminal 1) +npm run dev:web + +# run electron app (terminal 2) +npm run dev:electron +``` + +### Dépannage + +Vous pourriez rencontrer une error `Unsupported platform` pendant le lancement de `npm install`. Pour résoudre cela, veuillez supprimer le répertoire `node_modules`, le fichier `package-lock.json` et lancer à nouveau `npm install`. Cela devrait isntaller tous les paquets nécessaires pour lancer l'application. + +```shell +# Delete node_modules in sub-directories +find ./ -type d -name "node_modules" -print0 | while read -d $'\0' dir; do + rm -rf "$dir" +done + +# Delete package-lock in sub-directories +find . -type f -name "package-lock.json" -delete +``` + +### Tests + +```bash +# bruno-schema +npm test --workspace=packages/bruno-schema + +# bruno-lang +npm test --workspace=packages/bruno-lang +``` diff --git a/docs/development_ru.md b/docs/development_ru.md index 002f238a..18b2549f 100644 --- a/docs/development_ru.md +++ b/docs/development_ru.md @@ -1,8 +1,8 @@ -[English](/docs/development.md) | [Українська](/docs/development_ua.md) | **Русский** | [Deutsch](/docs/development_de.md) | [Español](/docs/development_es.md) +[English](/docs/development.md) | [Українська](/docs/development_ua.md) | **Русский** | [Deutsch](/docs/development_de.md) | [Français](/docs/development_fr.md) | [Español](/docs/development_es.md) ## Разработка -Bruno разрабатывается как десктопное приложение. Необходимо загрузить приложение, запустив приложение nextjs в одном терминале, а затем запустить приложение electron в другом терминале. +Bruno разрабатывается как десктопное приложение. Необходимо загрузить приложение, запустив приложение Next.js в одном терминале, а затем запустить приложение electron в другом терминале. ### Зависимости diff --git a/docs/development_ua.md b/docs/development_ua.md index 42fb4ee5..daa6379b 100644 --- a/docs/development_ua.md +++ b/docs/development_ua.md @@ -1,8 +1,8 @@ -[English](/docs/development.md) | **Українська** | [Русский](/docs/development_ru.md) | [Deutsch](/docs/development_de.md) | [Español](/docs/development_es.md) +[English](/docs/development.md) | **Українська** | [Русский](/docs/development_ru.md) | [Deutsch](/docs/development_de.md) | [Français](/docs/development_fr.md) | [Español](/docs/development_es.md) ## Розробка -Bruno розробляється як декстопний застосунок. Вам потрібно запустити nextjs в одній сесії терміналу, та запустити застосунок Electron в іншій сесії терміналу. +Bruno розробляється як декстопний застосунок. Вам потрібно запустити Next.js в одній сесії терміналу, та запустити застосунок Electron в іншій сесії терміналу. ### Залежності diff --git a/package-lock.json b/package-lock.json index 5dddfd54..79f3de50 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16630,7 +16630,7 @@ }, "packages/bruno-electron": { "name": "bruno", - "version": "v0.27.1", + "version": "v0.27.2", "dependencies": { "@aws-sdk/credential-providers": "^3.425.0", "@usebruno/js": "0.9.1", @@ -16641,6 +16641,7 @@ "axios": "^1.5.1", "chai": "^4.3.7", "chokidar": "^3.5.3", + "content-disposition": "^0.5.4", "decomment": "^0.9.5", "dotenv": "^16.0.3", "electron-is-dev": "^2.0.0", @@ -16656,6 +16657,7 @@ "is-valid-path": "^0.1.1", "js-yaml": "^4.1.0", "lodash": "^4.17.21", + "mime-types": "^2.1.35", "mustache": "^4.2.0", "nanoid": "3.3.4", "node-machine-id": "^1.1.12", @@ -21519,6 +21521,7 @@ "axios": "^1.5.1", "chai": "^4.3.7", "chokidar": "^3.5.3", + "content-disposition": "^0.5.4", "decomment": "^0.9.5", "dmg-license": "^1.0.11", "dotenv": "^16.0.3", @@ -21538,6 +21541,7 @@ "is-valid-path": "^0.1.1", "js-yaml": "^4.1.0", "lodash": "^4.17.21", + "mime-types": "^2.1.35", "mustache": "^4.2.0", "nanoid": "3.3.4", "node-machine-id": "^1.1.12", diff --git a/packages/bruno-app/package.json b/packages/bruno-app/package.json index b23d7459..c3f82569 100644 --- a/packages/bruno-app/package.json +++ b/packages/bruno-app/package.json @@ -3,7 +3,7 @@ "version": "0.3.0", "private": true, "scripts": { - "dev": "cross-env ENV=dev next dev", + "dev": "cross-env ENV=dev next dev -p 3000", "build": "next build && next export", "start": "next start", "lint": "next lint", diff --git a/packages/bruno-app/src/components/CodeEditor/index.js b/packages/bruno-app/src/components/CodeEditor/index.js index 6ad999e6..b1a115c9 100644 --- a/packages/bruno-app/src/components/CodeEditor/index.js +++ b/packages/bruno-app/src/components/CodeEditor/index.js @@ -70,6 +70,35 @@ export default class CodeEditor extends React.Component { 'Ctrl-F': 'findPersistent', Tab: function (cm) { cm.replaceSelection(' ', 'end'); + }, + 'Ctrl-Y': 'foldAll', + 'Cmd-Y': 'foldAll', + 'Ctrl-I': 'unfoldAll', + 'Cmd-I': 'unfoldAll' + }, + foldOptions: { + widget: (from, to) => { + var count = undefined; + var internal = this.editor.getRange(from, to); + if (this.props.mode == 'application/ld+json') { + if (this.editor.getLine(from.line).endsWith('[')) { + var toParse = '[' + internal + ']'; + } else var toParse = '{' + internal + '}'; + try { + count = Object.keys(JSON.parse(toParse)).length; + } catch (e) {} + } else if (this.props.mode == 'application/xml') { + var doc = new DOMParser(); + try { + //add header element and remove prefix namespaces for DOMParser + var dcm = doc.parseFromString( + ' ' + internal.replace(/(?<=\<|<\/)\w+:/g, '') + '', + 'application/xml' + ); + count = dcm.documentElement.children.length; + } catch (e) {} + } + return count ? `\u21A4${count}\u21A6` : '\u2194'; } } })); diff --git a/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/StyledWrapper.js b/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/StyledWrapper.js index d6639b7d..330ae082 100644 --- a/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/StyledWrapper.js +++ b/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/StyledWrapper.js @@ -10,6 +10,7 @@ const StyledWrapper = styled.div` background-color: ${(props) => props.theme.collection.environment.settings.sidebar.bg}; border-right: solid 1px ${(props) => props.theme.collection.environment.settings.sidebar.borderRight}; min-height: 400px; + height: 100%; max-height: 85vh; overflow-y: auto; } @@ -44,10 +45,8 @@ const StyledWrapper = styled.div` border-bottom: none; color: ${(props) => props.theme.textLink}; - &:hover { - span { - text-decoration: underline; - } + span:hover { + text-decoration: underline; } } diff --git a/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/index.js b/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/index.js index dd7ac4f7..9886b54b 100644 --- a/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/index.js +++ b/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/index.js @@ -1,12 +1,11 @@ import React, { useEffect, useState, forwardRef, useRef } from 'react'; import { findEnvironmentInCollection } from 'utils/collections'; -import toast from 'react-hot-toast'; -import { toastError } from 'utils/common/error'; import usePrevious from 'hooks/usePrevious'; import EnvironmentDetails from './EnvironmentDetails'; import CreateEnvironment from '../CreateEnvironment'; -import { IconDownload } from '@tabler/icons'; +import { IconDownload, IconShieldLock } from '@tabler/icons'; import ImportEnvironment from '../ImportEnvironment'; +import ManageSecrets from '../ManageSecrets'; import StyledWrapper from './StyledWrapper'; const EnvironmentList = ({ collection }) => { @@ -14,6 +13,7 @@ const EnvironmentList = ({ collection }) => { const [selectedEnvironment, setSelectedEnvironment] = useState(null); const [openCreateModal, setOpenCreateModal] = useState(false); const [openImportModal, setOpenImportModal] = useState(false); + const [openManageSecretsModal, setOpenManageSecretsModal] = useState(false); const envUids = environments ? environments.map((env) => env.uid) : []; const prevEnvUids = usePrevious(envUids); @@ -54,6 +54,7 @@ const EnvironmentList = ({ collection }) => { {openCreateModal && setOpenCreateModal(false)} />} {openImportModal && setOpenImportModal(false)} />} + {openManageSecretsModal && setOpenManageSecretsModal(false)} />}
@@ -72,9 +73,15 @@ const EnvironmentList = ({ collection }) => { + Create
-
setOpenImportModal(true)}> - - Import +
+
setOpenImportModal(true)}> + + Import +
+
setOpenManageSecretsModal(true)}> + + Managing Secrets +
diff --git a/packages/bruno-app/src/components/Environments/EnvironmentSettings/ManageSecrets/index.js b/packages/bruno-app/src/components/Environments/EnvironmentSettings/ManageSecrets/index.js new file mode 100644 index 00000000..6c71493f --- /dev/null +++ b/packages/bruno-app/src/components/Environments/EnvironmentSettings/ManageSecrets/index.js @@ -0,0 +1,31 @@ +import React from 'react'; +import Portal from 'components/Portal'; +import Modal from 'components/Modal'; + +const ManageSecrets = ({ onClose }) => { + return ( + + +
+

In any collection, there are secrets that need to be managed.

+

These secrets can be anything such as API keys, passwords, or tokens.

+

Bruno offers two approaches to manage secrets in collections.

+

+ Read more about it in our{' '} + + docs + + . +

+
+
+
+ ); +}; + +export default ManageSecrets; diff --git a/packages/bruno-app/src/components/ResponsePane/QueryResult/StyledWrapper.js b/packages/bruno-app/src/components/ResponsePane/QueryResult/StyledWrapper.js index 5429ef44..07f51b8b 100644 --- a/packages/bruno-app/src/components/ResponsePane/QueryResult/StyledWrapper.js +++ b/packages/bruno-app/src/components/ResponsePane/QueryResult/StyledWrapper.js @@ -23,6 +23,10 @@ const StyledWrapper = styled.div` color: ${(props) => props.theme.colors.text.yellow}; } } + + .muted { + color: ${(props) => props.theme.colors.text.muted}; + } `; export default StyledWrapper; diff --git a/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js b/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js index 18b9ec2c..b5508ba1 100644 --- a/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js +++ b/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js @@ -85,7 +85,16 @@ const QueryResult = ({ item, collection, data, dataBuffer, width, disableRunEven {tabs}
{error ? ( - {error} +
+
{error}
+ + {error && typeof error === 'string' && error.toLowerCase().includes('self signed certificate') ? ( +
+ You can disable SSL verification in the Preferences.
+ To open the Preferences, click on the gear icon in the bottom left corner. +
+ ) : null} +
) : ( props.theme.requestTabPanel.responseStatus}; +`; + +export default StyledWrapper; diff --git a/packages/bruno-app/src/components/ResponsePane/ResponseSave/index.js b/packages/bruno-app/src/components/ResponsePane/ResponseSave/index.js new file mode 100644 index 00000000..9af5e73a --- /dev/null +++ b/packages/bruno-app/src/components/ResponsePane/ResponseSave/index.js @@ -0,0 +1,32 @@ +import React from 'react'; +import StyledWrapper from './StyledWrapper'; +import toast from 'react-hot-toast'; +import get from 'lodash/get'; +import { IconDownload } from '@tabler/icons'; + +const ResponseSave = ({ item }) => { + const { ipcRenderer } = window; + const response = item.response || {}; + + const saveResponseToFile = () => { + return new Promise((resolve, reject) => { + console.log(item); + ipcRenderer + .invoke('renderer:save-response-to-file', response, item.requestSent.url) + .then(resolve) + .catch((err) => { + toast.error(get(err, 'error.message') || 'Something went wrong!'); + reject(err); + }); + }); + }; + + return ( + + + + ); +}; +export default ResponseSave; diff --git a/packages/bruno-app/src/components/ResponsePane/StatusCode/index.js b/packages/bruno-app/src/components/ResponsePane/StatusCode/index.js index 2917634a..9287899b 100644 --- a/packages/bruno-app/src/components/ResponsePane/StatusCode/index.js +++ b/packages/bruno-app/src/components/ResponsePane/StatusCode/index.js @@ -6,7 +6,7 @@ import StyledWrapper from './StyledWrapper'; // Todo: text-error class is not getting pulled in for 500 errors const StatusCode = ({ status }) => { const getTabClassname = (status) => { - return classnames('', { + return classnames('ml-2', { 'text-ok': status >= 100 && status < 200, 'text-ok': status >= 200 && status < 300, 'text-error': status >= 300 && status < 400, diff --git a/packages/bruno-app/src/components/ResponsePane/index.js b/packages/bruno-app/src/components/ResponsePane/index.js index dbae1550..fb5aab04 100644 --- a/packages/bruno-app/src/components/ResponsePane/index.js +++ b/packages/bruno-app/src/components/ResponsePane/index.js @@ -14,6 +14,7 @@ import Timeline from './Timeline'; import TestResults from './TestResults'; import TestResultsLabel from './TestResultsLabel'; import StyledWrapper from './StyledWrapper'; +import ResponseSave from 'src/components/ResponsePane/ResponseSave'; const ResponsePane = ({ rightPaneWidth, item, collection }) => { const dispatch = useDispatch(); @@ -112,6 +113,7 @@ const ResponsePane = ({ rightPaneWidth, item, collection }) => { {!isLoading ? (
+ diff --git a/packages/bruno-app/src/components/Sidebar/index.js b/packages/bruno-app/src/components/Sidebar/index.js index 89076197..a6df7141 100644 --- a/packages/bruno-app/src/components/Sidebar/index.js +++ b/packages/bruno-app/src/components/Sidebar/index.js @@ -7,7 +7,7 @@ import Preferences from 'components/Preferences'; import { useState, useEffect } from 'react'; import { useSelector, useDispatch } from 'react-redux'; import { IconSettings } from '@tabler/icons'; -import { updateLeftSidebarWidth, updateIsDragging } from 'providers/ReduxStore/slices/app'; +import { updateLeftSidebarWidth, updateIsDragging, showPreferences } from 'providers/ReduxStore/slices/app'; import { useTheme } from 'providers/Theme'; const MIN_LEFT_SIDEBAR_WIDTH = 222; @@ -15,7 +15,7 @@ const MAX_LEFT_SIDEBAR_WIDTH = 600; const Sidebar = () => { const leftSidebarWidth = useSelector((state) => state.app.leftSidebarWidth); - const [preferencesOpen, setPreferencesOpen] = useState(false); + const preferencesOpen = useSelector((state) => state.app.showPreferences); const [asideWidth, setAsideWidth] = useState(leftSidebarWidth); @@ -78,7 +78,7 @@ const Sidebar = () => {