From 0466cd62336ca8c666f6f1176e9fc536d0d1aea9 Mon Sep 17 00:00:00 2001 From: Nikhil569 Date: Thu, 12 Oct 2023 00:49:49 +0530 Subject: [PATCH 1/5] Shorten method name in sidebar --- .../Collection/CollectionItem/RequestMethod/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/index.js index 87315dfea..342216592 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/index.js @@ -23,7 +23,9 @@ const RequestMethod = ({ item }) => { return (
- {item.request.method} + + {item.request.method.length > 4 ? item.request.method.substring(0, 3) : item.request.method} +
); From 60d3d07459ce32bcd458251aba6a85d9cde73575 Mon Sep 17 00:00:00 2001 From: Nikhil569 <48991799+Nikhil569@users.noreply.github.com> Date: Fri, 13 Oct 2023 19:00:26 +0530 Subject: [PATCH 2/5] Update index.js --- .../Collection/CollectionItem/RequestMethod/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/index.js index 342216592..f055e97e1 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/index.js @@ -24,7 +24,7 @@ const RequestMethod = ({ item }) => {
- {item.request.method.length > 4 ? item.request.method.substring(0, 3) : item.request.method} + {item.request.method}
From ce5917075273e5bd586e5cf4c690b3004817579b Mon Sep 17 00:00:00 2001 From: Nikhil569 <48991799+Nikhil569@users.noreply.github.com> Date: Fri, 13 Oct 2023 19:00:57 +0530 Subject: [PATCH 3/5] Update StyledWrapper.js --- .../Collection/CollectionItem/RequestMethod/StyledWrapper.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/StyledWrapper.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/StyledWrapper.js index d9dfe622f..bdb62e843 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/StyledWrapper.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/StyledWrapper.js @@ -6,6 +6,7 @@ const Wrapper = styled.div` align-self: stretch; align-items: center; min-width: 34px; + flex-shrink: 0; span { position: relative; From 79072785e2b2c25cb573379ce58c8a7d17ac795b Mon Sep 17 00:00:00 2001 From: Nikhil569 <48991799+Nikhil569@users.noreply.github.com> Date: Fri, 13 Oct 2023 19:05:13 +0530 Subject: [PATCH 4/5] Update index.js --- .../Collection/CollectionItem/RequestMethod/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/index.js index f055e97e1..87315dfea 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/index.js @@ -23,9 +23,7 @@ const RequestMethod = ({ item }) => { return (
- - {item.request.method} - + {item.request.method}
); From e90fc466b4cda251e9e5235ca047b5626e8823eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linhart=20Luk=C3=A1=C5=A1?= Date: Fri, 13 Oct 2023 17:27:17 +0200 Subject: [PATCH 5/5] Dont reset timer when switch tabs --- .../bruno-app/src/components/ResponsePane/Overlay/index.js | 2 +- packages/bruno-app/src/components/StopWatch/index.js | 6 +++++- packages/bruno-electron/src/ipc/network/index.js | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/bruno-app/src/components/ResponsePane/Overlay/index.js b/packages/bruno-app/src/components/ResponsePane/Overlay/index.js index e5f659862..247c341ed 100644 --- a/packages/bruno-app/src/components/ResponsePane/Overlay/index.js +++ b/packages/bruno-app/src/components/ResponsePane/Overlay/index.js @@ -17,7 +17,7 @@ const ResponseLoadingOverlay = ({ item, collection }) => {
- +
diff --git a/packages/bruno-app/src/components/StopWatch/index.js b/packages/bruno-app/src/components/StopWatch/index.js index 49bd8c175..e2b069532 100644 --- a/packages/bruno-app/src/components/StopWatch/index.js +++ b/packages/bruno-app/src/components/StopWatch/index.js @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react'; -const StopWatch = () => { +const StopWatch = ({ requestTimestamp }) => { const [milliseconds, setMilliseconds] = useState(0); const tickInterval = 200; @@ -15,6 +15,10 @@ const StopWatch = () => { }; }); + useEffect(() => { + setMilliseconds(Date.now() - requestTimestamp); + }, [requestTimestamp]); + if (milliseconds < 1000) { return 'Loading...'; } diff --git a/packages/bruno-electron/src/ipc/network/index.js b/packages/bruno-electron/src/ipc/network/index.js index 1def8d964..8e8cb6247 100644 --- a/packages/bruno-electron/src/ipc/network/index.js +++ b/packages/bruno-electron/src/ipc/network/index.js @@ -195,7 +195,8 @@ const registerNetworkIpc = (mainWindow) => { url: request.url, method: request.method, headers: request.headers, - data: safeParseJSON(safeStringifyJSON(request.data)) + data: safeParseJSON(safeStringifyJSON(request.data)), + timestamp: Date.now() }, collectionUid, itemUid: item.uid,