From c7030eb0fcf65f16a1fc7dd3faa63553dd01d389 Mon Sep 17 00:00:00 2001 From: Kalki Date: Mon, 31 Jul 2023 14:28:57 +0530 Subject: [PATCH] ToolkitWorkspace.js refactoring done --- .../Content/Toolkits/ToolkitWorkspace.js | 73 ++++++------------- gui/pages/_app.css | 30 ++++++++ 2 files changed, 54 insertions(+), 49 deletions(-) diff --git a/gui/pages/Content/Toolkits/ToolkitWorkspace.js b/gui/pages/Content/Toolkits/ToolkitWorkspace.js index 048b6b331..d47c483f7 100644 --- a/gui/pages/Content/Toolkits/ToolkitWorkspace.js +++ b/gui/pages/Content/Toolkits/ToolkitWorkspace.js @@ -109,87 +109,62 @@ export default function ToolkitWorkspace({env, toolkitDetails, internalId}) { }, [internalId]); return (<> + '
-
+
-
-
- toolkit-icon -
-
-
-
{toolkitDetails.name}
-
- {`${showDescription ? toolkitDetails.description : toolkitDetails.description.slice(0, 70)}`} - {toolkitDetails.description.length > 70 && +
+ toolkit-icon +
+
{toolkitDetails.name}
+
+ {`${showDescription ? toolkitDetails.description : toolkitDetails.description.slice(0, 70)}`} + {toolkitDetails.description.length > 70 && setShowDescription(!showDescription)}> {showDescription ? '...less' : '...more'} } -
-
-
setLocalStorageValue('toolkit_tab_' + String(internalId), 'configuration', setActiveTab)} - style={activeTab === 'configuration' ? {background: '#454254'} : {background: 'transparent'}}> +
+
setLocalStorageValue('toolkit_tab_' + String(internalId), 'configuration', setActiveTab)}>
Configuration
-
setLocalStorageValue('toolkit_tab_' + String(internalId), 'tools_included', setActiveTab)} - style={activeTab === 'tools_included' ? {background: '#454254'} : {background: 'transparent'}}> +
setLocalStorageValue('toolkit_tab_' + String(internalId), 'tools_included', setActiveTab)}>
Tools Included
{!loading && activeTab === 'configuration' &&
{apiConfigs.length > 0 ? (apiConfigs.map((config, index) => (
-
- +
+
- handleKeyChange(event, index)}/> + handleKeyChange(event, index)}/>
- ))) : (
+ ))) : (
no-permissions - No Keys found! + No Keys found!
)} {apiConfigs.length > 0 && ( -
-
{authenticateToolkits.includes(toolkitDetails.name) && - - }
-
+
+ {authenticateToolkits.includes(toolkitDetails.name) && + } -
)}
} {activeTab === 'tools_included' &&
{toolsIncluded.map((tool, index) => (
-
{tool.name}
-
{tool.description}
+
{tool.name}
+
{tool.description}
))} diff --git a/gui/pages/_app.css b/gui/pages/_app.css index cee450a3c..92a9a49e0 100644 --- a/gui/pages/_app.css +++ b/gui/pages/_app.css @@ -716,6 +716,7 @@ p { } .mt_4{margin-top: 4px;} +.mt_5{margin-top: 5px;} .mt_6{margin-top: 6px;} .mt_8{margin-top: 8px;} .mt_10{margin-top: 10px;} @@ -895,6 +896,14 @@ p { line-height: normal; } +.text_17{ + color: #FFF; + font-size: 17px; + font-style: normal; + font-weight: 400; + line-height: normal; +} + .text_20_bold{ color: #FFF; font-size: 20px; @@ -986,6 +995,7 @@ p { .justify_center{justify-content: center} .justify_end{justify-content: flex-end} +.justify_start{justify-content: flex-start} .justify_space_between{justify-content: space-between} .display_flex{display: inline-flex} @@ -1015,6 +1025,7 @@ p { .gap_20{gap:20px;} .border_radius_8{border-radius: 8px;} +.border_radius_25{border-radius: 25px;} .color_white{color:#FFFFFF} .color_gray{color:#888888} @@ -1455,6 +1466,25 @@ tr{ background: #454254; } +.tab_button_small, .tab_button_small_selected{ + height: 30px; + font-size: 12px; + text-align: center; + display: flex; + align-items: center; + padding: 8px; + border-radius: 8px; + cursor: pointer; +} + +.tab_button_small{ + background: transparent; +} + +.tab_button_small_selected{ + background: #454254; +} + .detail_top { width: 100%; height: fit-content;