diff --git a/package-lock.json b/package-lock.json index 25b94f4fd..7fdfd83c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17745,6 +17745,7 @@ "node-machine-id": "^1.1.12", "qs": "^6.11.0", "socks-proxy-agent": "^8.0.2", + "tough-cookie": "^4.1.3", "uuid": "^9.0.0", "vm2": "^3.9.13", "yup": "^0.32.11" @@ -17905,6 +17906,28 @@ "js-yaml": "bin/js-yaml.js" } }, + "packages/bruno-electron/node_modules/tough-cookie": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "packages/bruno-electron/node_modules/tough-cookie/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "engines": { + "node": ">= 4.0.0" + } + }, "packages/bruno-electron/node_modules/uuid": { "version": "9.0.0", "license": "MIT", @@ -22828,6 +22851,7 @@ "node-machine-id": "^1.1.12", "qs": "^6.11.0", "socks-proxy-agent": "^8.0.2", + "tough-cookie": "*", "uuid": "^9.0.0", "vm2": "^3.9.13", "yup": "^0.32.11" @@ -22926,6 +22950,24 @@ "argparse": "^2.0.1" } }, + "tough-cookie": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "dependencies": { + "universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==" + } + } + }, "uuid": { "version": "9.0.0" } diff --git a/packages/bruno-app/src/components/Cookies/index.js b/packages/bruno-app/src/components/Cookies/index.js new file mode 100644 index 000000000..f57d19213 --- /dev/null +++ b/packages/bruno-app/src/components/Cookies/index.js @@ -0,0 +1,30 @@ +import React from 'react'; +import { useSelector } from 'react-redux'; +import Modal from 'components/Modal'; + +const CollectionProperties = ({ onClose }) => { + const cookies = useSelector((state) => state.app.cookies) || []; + + return ( + + + + + + + + + + {cookies.map((cookie) => ( + + + + + ))} + +
DomainCookie
{cookie.domain}{cookie.cookieString}
+
+ ); +}; + +export default CollectionProperties; diff --git a/packages/bruno-app/src/components/Sidebar/index.js b/packages/bruno-app/src/components/Sidebar/index.js index 670d28d23..c08d82957 100644 --- a/packages/bruno-app/src/components/Sidebar/index.js +++ b/packages/bruno-app/src/components/Sidebar/index.js @@ -3,10 +3,11 @@ import Collections from './Collections'; import StyledWrapper from './StyledWrapper'; import GitHubButton from 'react-github-btn'; import Preferences from 'components/Preferences'; +import Cookies from 'components/Cookies'; import { useState, useEffect } from 'react'; import { useSelector, useDispatch } from 'react-redux'; -import { IconSettings } from '@tabler/icons'; +import { IconSettings, IconCookie } from '@tabler/icons'; import { updateLeftSidebarWidth, updateIsDragging, showPreferences } from 'providers/ReduxStore/slices/app'; import { useTheme } from 'providers/Theme'; @@ -18,6 +19,7 @@ const Sidebar = () => { const preferencesOpen = useSelector((state) => state.app.showPreferences); const [asideWidth, setAsideWidth] = useState(leftSidebarWidth); + const [cookiesOpen, setCookiesOpen] = useState(false); const { storedTheme } = useTheme(); @@ -79,6 +81,7 @@ const Sidebar = () => {