From 35068b6b69dc413beebfc378a364f5a634eba8ac Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Thu, 4 May 2023 18:49:56 -0500 Subject: [PATCH 1/3] Reverting unintented change to code-viewer layout (keeping reveal layout good) --- src/qqq/pages/records/view/RecordView.tsx | 4 ++-- src/qqq/utils/qqq/ValueUtils.tsx | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/qqq/pages/records/view/RecordView.tsx b/src/qqq/pages/records/view/RecordView.tsx index 90c1b0c..aac96eb 100644 --- a/src/qqq/pages/records/view/RecordView.tsx +++ b/src/qqq/pages/records/view/RecordView.tsx @@ -369,8 +369,8 @@ function RecordView({table, launchProcess}: Props): JSX.Element { section.fieldNames.map((fieldName: string) => ( - - + + {tableMetaData.fields.get(fieldName).label}:
 
diff --git a/src/qqq/utils/qqq/ValueUtils.tsx b/src/qqq/utils/qqq/ValueUtils.tsx index d7e27fb..8ec1324 100644 --- a/src/qqq/utils/qqq/ValueUtils.tsx +++ b/src/qqq/utils/qqq/ValueUtils.tsx @@ -456,7 +456,7 @@ function CodeViewer({name, mode, code}: {name: string; mode: string; code: strin }; return ( - <> + {mode == "json" && code && } {code && } {errorMessage} @@ -471,10 +471,11 @@ function CodeViewer({name, mode, code}: {name: string; mode: string; code: strin readOnly highlightActiveLine={false} width="100%" + style={{border: "1px solid gray", marginBottom: "1rem"}} showPrintMargin={false} height={isExpanded ? "80vh" : code ? "200px" : "50px"} /> - ); + ); } //////////////////////////////////////////////////////////////////////////////////////////////// @@ -514,7 +515,7 @@ function RevealComponent({fieldName, value, usage}: {fieldName: string, value: s return ( usage === "view" && adornmentFieldsMap.get(fieldName) === true ? ( - + handleRevealIconClick(fieldName)} sx={{cursor: "pointer", fontSize: "15px !important", position: "relative", top: "3px", marginRight: "5px"}}>visibility_on {displayValue} @@ -534,7 +535,7 @@ function RevealComponent({fieldName, value, usage}: {fieldName: string, value: s ):( - handleRevealIconClick(fieldName)} sx={{cursor: "pointer", fontSize: "15px !important", position: "relative", top: "3px", marginRight: "5px"}}>visibility_off{displayValue} + handleRevealIconClick(fieldName)} sx={{cursor: "pointer", fontSize: "15px !important", position: "relative", top: "3px", marginRight: "5px"}}>visibility_off{displayValue} ) ); } From 25414a85155a5d8f998608d265208d2a465fcbae Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Thu, 4 May 2023 18:50:18 -0500 Subject: [PATCH 2/3] push sticky top down a bit, to not touch sticky title when it sticks --- src/qqq/components/misc/RecordSidebar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qqq/components/misc/RecordSidebar.tsx b/src/qqq/components/misc/RecordSidebar.tsx index 86a52e0..4c8a06b 100644 --- a/src/qqq/components/misc/RecordSidebar.tsx +++ b/src/qqq/components/misc/RecordSidebar.tsx @@ -41,7 +41,7 @@ interface Props QRecordSidebar.defaultProps = { light: false, - stickyTop: "100px", + stickyTop: "110px", }; interface SidebarEntry From 97d499b0b62dae1e9bd4e8ca7a8f49573c445116 Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Fri, 5 May 2023 11:38:46 -0500 Subject: [PATCH 3/3] Update to allow auth (api-key) --- src/qqq/pages/records/developer/TableDeveloperView.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/qqq/pages/records/developer/TableDeveloperView.tsx b/src/qqq/pages/records/developer/TableDeveloperView.tsx index 5917f67..2f128a6 100644 --- a/src/qqq/pages/records/developer/TableDeveloperView.tsx +++ b/src/qqq/pages/records/developer/TableDeveloperView.tsx @@ -117,11 +117,6 @@ function TableDeveloperView({table}: Props): JSX.Element })(); } - const beforeTry = (e: any) => - { - e.detail.request.headers.append("Authorization", "Bearer " + accessToken); - }; - const selectApi = async (event: SelectChangeEvent) => { setSelectedApi(null); @@ -208,11 +203,11 @@ function TableDeveloperView({table}: Props): JSX.Element font-size="large" render-style="view" show-header={false} - allow-authentication={false} + allow-authentication={true} + persist-auth={true} allow-server-selection={false} allow-spec-file-download={true} sort-endpoints-by="method" - beforeTry={beforeTry} schema-description-expanded={true} css-file={"/api/rapi-doc.css"} css-classes={"qqq-rapi-doc"}