diff --git a/gui/pages/Content/Marketplace/EachTool.js b/gui/pages/Content/Marketplace/EachTool.js index d5dd5a484..046e76707 100644 --- a/gui/pages/Content/Marketplace/EachTool.js +++ b/gui/pages/Content/Marketplace/EachTool.js @@ -14,6 +14,27 @@ export default function EachTool({template, env}) { const [rightPanel, setRightPanel] = useState('overview') const [installed, setInstalled] = useState('') const [markdownContent, setMarkdownContent] = useState(''); + const toolkitData = [ + { name: 'Jira Toolkit', imageSrc: '/images/jira_icon.svg' }, + { name: 'Email Toolkit', imageSrc: '/images/gmail_icon.svg' }, + { name: 'Google Calendar Toolkit', imageSrc: '/images/google_calender_icon.svg' }, + { name: 'GitHub Toolkit', imageSrc: '/images/github_icon.svg' }, + { name: 'Google Search Toolkit', imageSrc: '/images/google_search_icon.svg' }, + { name: 'Searx Toolkit', imageSrc: '/images/searx_icon.svg' }, + { name: 'Slack Toolkit', imageSrc: '/images/slack_icon.svg' }, + { name: 'Web Scrapper Toolkit', imageSrc: '/images/webscraper_icon.svg' }, + { name: 'Twitter Toolkit', imageSrc: '/images/twitter_icon.svg' }, + { name: 'Google SERP Toolkit', imageSrc: '/images/google_serp_icon.svg' }, + { name: 'File Toolkit', imageSrc: '/images/filemanager_icon.svg' }, + ]; + const getImageSource = (name) => { + for (let i = 0; i < toolkitData.length; i++) { + if (toolkitData[i].name === name) { + return toolkitData[i].imageSrc; + } + } + return '/images/app-logo-light.png'; + }; useEffect(() => { setInstalled(template && template.is_installed ? 'Installed' : 'Install'); @@ -84,7 +105,7 @@ export default function EachTool({template, env}) {
tool-icon + src={getImageSource(template.name)} alt="tool-icon"/>
{template.name} By SuperAGI { const updatedData = [...apiConfigs]; @@ -97,11 +112,20 @@ export default function ToolkitWorkspace({toolkitDetails, internalId}){ } }, [internalId]); + const getImageSource = () => { + for (let i = 0; i < toolkitData.length; i++) { + if (toolkitData[i].name === toolkitDetails.name) { + return toolkitData[i].imageSrc; + } + } + return '/images/custom_tool.svg'; + }; + return (<>
- toolkit-icon + toolkit-icon
diff --git a/gui/pages/Content/Toolkits/Toolkits.js b/gui/pages/Content/Toolkits/Toolkits.js index 67fd29663..a01c905b3 100644 --- a/gui/pages/Content/Toolkits/Toolkits.js +++ b/gui/pages/Content/Toolkits/Toolkits.js @@ -7,6 +7,29 @@ import {createInternalId} from "@/utils/utils"; export default function Toolkits({ sendToolkitData, toolkits, env }) { const excludedToolkits = ["Thinking Toolkit", "Human Input Toolkit","Resource Toolkit"]; + const toolkitData = [ + { name: 'Jira Toolkit', imageSrc: '/images/jira_icon.svg' }, + { name: 'Email Toolkit', imageSrc: '/images/gmail_icon.svg' }, + { name: 'Google Calendar Toolkit', imageSrc: '/images/google_calender_icon.svg' }, + { name: 'GitHub Toolkit', imageSrc: '/images/github_icon.svg' }, + { name: 'Google Search Toolkit', imageSrc: '/images/google_search_icon.svg' }, + { name: 'Searx Toolkit', imageSrc: '/images/searx_icon.svg' }, + { name: 'Slack Toolkit', imageSrc: '/images/slack_icon.svg' }, + { name: 'Web Scrapper Toolkit', imageSrc: '/images/webscraper_icon.svg' }, + { name: 'Twitter Toolkit', imageSrc: '/images/twitter_icon.svg' }, + { name: 'Google SERP Toolkit', imageSrc: '/images/google_serp_icon.svg' }, + { name: 'File Toolkit', imageSrc: '/images/filemanager_icon.svg' }, + { name: 'CodingToolkit', imageSrc: '/images/app-logo-light.png' }, + { name: 'Image Generation Toolkit', imageSrc: '/images/app-logo-light.png' }, + ]; + const getImageSource = (name) => { + for (let i = 0; i < toolkitData.length; i++) { + if (toolkitData[i].name === name) { + return toolkitData[i].imageSrc; + } + } + return '/images/custom_tool.svg'; + }; return ( <> @@ -30,7 +53,7 @@ export default function Toolkits({ sendToolkitData, toolkits, env }) {
- tool-icon
diff --git a/gui/public/images/filemanager_icon.svg b/gui/public/images/filemanager_icon.svg new file mode 100644 index 000000000..55ec3478a --- /dev/null +++ b/gui/public/images/filemanager_icon.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/gui/public/images/github_icon.svg b/gui/public/images/github_icon.svg new file mode 100644 index 000000000..6d377ae16 --- /dev/null +++ b/gui/public/images/github_icon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/gui/public/images/gmail_icon.svg b/gui/public/images/gmail_icon.svg new file mode 100644 index 000000000..457ddaf13 --- /dev/null +++ b/gui/public/images/gmail_icon.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/gui/public/images/google_calender_icon.svg b/gui/public/images/google_calender_icon.svg new file mode 100644 index 000000000..19793fa13 --- /dev/null +++ b/gui/public/images/google_calender_icon.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/gui/public/images/google_search_icon.svg b/gui/public/images/google_search_icon.svg new file mode 100644 index 000000000..00875fbf2 --- /dev/null +++ b/gui/public/images/google_search_icon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/gui/public/images/google_serp_icon.svg b/gui/public/images/google_serp_icon.svg new file mode 100644 index 000000000..dd6e19f0f --- /dev/null +++ b/gui/public/images/google_serp_icon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/gui/public/images/jira_icon.svg b/gui/public/images/jira_icon.svg new file mode 100644 index 000000000..5b68b443f --- /dev/null +++ b/gui/public/images/jira_icon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/gui/public/images/searx_icon.svg b/gui/public/images/searx_icon.svg new file mode 100644 index 000000000..cbe8eb401 --- /dev/null +++ b/gui/public/images/searx_icon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/gui/public/images/slack_icon.svg b/gui/public/images/slack_icon.svg new file mode 100644 index 000000000..47267a585 --- /dev/null +++ b/gui/public/images/slack_icon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/gui/public/images/twitter_icon.svg b/gui/public/images/twitter_icon.svg new file mode 100644 index 000000000..cbd05ea9d --- /dev/null +++ b/gui/public/images/twitter_icon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/gui/public/images/webscraper_icon.svg b/gui/public/images/webscraper_icon.svg new file mode 100644 index 000000000..e50b21be7 --- /dev/null +++ b/gui/public/images/webscraper_icon.svg @@ -0,0 +1,9 @@ + + + + + + + + +