diff --git a/client/src/components/Apps/Figma/Figma.js b/client/src/components/Apps/Figma/Figma.js index c81c7a15..1a616e2b 100644 --- a/client/src/components/Apps/Figma/Figma.js +++ b/client/src/components/Apps/Figma/Figma.js @@ -1,68 +1,68 @@ -import React, { Component } from "react"; -import "./../../searchbar.component"; -import SearchBar from "./../../searchbar.component"; -import FigmaAbout from "./about-secttion/FigmaAbout"; -import FigmaMessages from "./messages-section/FigmaMessages"; -import logo from "./images/fignaLogo.png"; -import "./css/Figma.css"; -// import ToolsHeader from "../../toolsheader/toolsheader"; - -const initialState = { - page: "about", -}; -class Figma extends Component { - constructor() { - super(); - this.state = initialState; - } - - render() { - const localHostUrl = - "https://www.figma.com/oauth?client_id=V2IvPlEApDfBT9uNS5Rbrf&redirect_uri=http://localhost:3000/figma/authenticate/&scope=file_read&state=state&response_type=code"; - const deployedUrl = - "https://www.figma.com/oauth?client_id=V2IvPlEApDfBT9uNS5Rbrf&redirect_uri=http://externaltools.zuri.chat/figma/authenticate/&scope=file_read&state=state&response_type=code"; - - return ( - <> - {/* */} - -
-
- -
-

Figma

-
^
-
-
- - Connect to figma - -
-
-

{ - this.setState({ page: "messages" }); - }} - className={this.state.page === "about" ? "" : "selected"} - > - Messages -

-

{ - this.setState({ page: "about" }); - }} - className={this.state.page === "about" ? "selected" : ""} - > - About -

-
- {this.state.page === "about" ? : } - - ); - } -} - -export default Figma; +import React, { Component } from "react"; +import "./../../searchbar.component"; +import SearchBar from "./../../searchbar.component"; +import FigmaAbout from "./about-secttion/FigmaAbout"; +import FigmaMessages from "./messages-section/FigmaMessages"; +import logo from "./images/fignaLogo.png"; +import "./css/Figma.css"; +// import ToolsHeader from "../../toolsheader/toolsheader"; + +const initialState = { + page: "about", +}; +class Figma extends Component { + constructor() { + super(); + this.state = initialState; + } + + render() { + const localHostUrl = + "https://www.figma.com/oauth?client_id=V2IvPlEApDfBT9uNS5Rbrf&redirect_uri=http://localhost:3000/figma/authenticate/&scope=file_read&state=state&response_type=code"; + const deployedUrl = + "https://www.figma.com/oauth?client_id=V2IvPlEApDfBT9uNS5Rbrf&redirect_uri=http://externaltools.zuri.chat/figma/authenticate/&scope=file_read&state=state&response_type=code"; + + return ( + <> + {/* */} + +
+
+ +
+

Figma

+
^
+
+ +
+

{ + this.setState({ page: "messages" }); + }} + className={this.state.page === "about" ? "" : "selected"} + > + Messages +

+

{ + this.setState({ page: "about" }); + }} + className={this.state.page === "about" ? "selected" : ""} + > + About +

+
+ {this.state.page === "about" ? : } + + ); + } +} + +export default Figma; diff --git a/client/src/components/Apps/Figma/css/Figma.css b/client/src/components/Apps/Figma/css/Figma.css index 34021eec..a04d5960 100644 --- a/client/src/components/Apps/Figma/css/Figma.css +++ b/client/src/components/Apps/Figma/css/Figma.css @@ -1,69 +1,69 @@ -@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400&display=swap'); - -*{ - font-family: 'Lato', sans-serif; - -} -.Start-title { - display: flex; - padding: 20px 0 20px 20px; - justify-content: flex-start; - align-items: center; - position :relative; -} - -.Start-title h4 { - font-size: 25px; - margin-left: 5px; - font-weight: 700; -} - -.Start-title .arrow-down { - transform: rotate(180deg) translateX(-5px); - font-size: 15px; -} - -.figmalogo-container { - width: 44px; - -} - -.figmalogo-container img { - border-radius: 8px; -} - -.welcome-nav { - display: flex; - justify-content: flex-start; - align-items: center; - height: auto; - width: 100%; - border-top: .7px solid #cfcfcf; - border-bottom: .7px solid #cfcfcf; - padding-left: 20px; -} -.welcome-nav h4 { - padding: 10px; - font-size: 14px; - font-weight: 700; - cursor: pointer; -} - -.selected { - border-bottom: 1px solid #0ACF83; -} - -.welcome-nav h4:hover { - border-bottom: 1px solid #0ACF83; -} - -.fig-connect-btn { - position: absolute; - top: 95px; - left: 180px; - -} - -.fig-connect-btn a { - background-color: #0ACF83 ; +@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400&display=swap'); + +*{ + font-family: 'Lato', sans-serif; + +} +.Start-title { + display: flex; + padding: 20px 0 20px 20px; + justify-content: flex-start; + align-items: center; + position :relative; +} + +.Start-title h4 { + font-size: 25px; + margin-left: 5px; + font-weight: 700; +} + +.Start-title .arrow-down { + transform: rotate(180deg) translateX(-5px); + font-size: 15px; +} + +.figmalogo-container { + width: 44px; + +} + +.figmalogo-container img { + border-radius: 8px; +} + +.welcome-nav { + display: flex; + justify-content: flex-start; + align-items: center; + height: auto; + width: 100%; + border-top: .7px solid #cfcfcf; + border-bottom: .7px solid #cfcfcf; + padding-left: 20px; +} +.welcome-nav h4 { + padding: 10px; + font-size: 14px; + font-weight: 700; + cursor: pointer; +} + +.selected { + border-bottom: 1px solid #0ACF83; +} + +.welcome-nav h4:hover { + border-bottom: 1px solid #0ACF83; +} + +.fig-connect-btn { + position: absolute; + top: 95px; + left: 180px; + +} + +.fig-connect-btn a { + background-color: #0ACF83 ; } \ No newline at end of file diff --git a/client/src/components/Apps/Github/containers/GithubHome.js b/client/src/components/Apps/Github/containers/GithubHome.js index 02123ee9..109cf55f 100644 --- a/client/src/components/Apps/Github/containers/GithubHome.js +++ b/client/src/components/Apps/Github/containers/GithubHome.js @@ -1,3 +1,128 @@ +<<<<<<< HEAD +import React from "react"; +import { Link } from "react-router-dom"; +import { Link } from "react-router-dom"; +import { IoChevronBackOutline } from "react-icons/io5"; +import Image from "../assets/ZV_64LdGoao.jpg"; +import GithubLogo from "../assets/Rectangle 693.jpg"; +import "../style/GithubHome.css"; +const GithubHome = () => { + return ( +
+ {/*
+

+ Tool Directory +

+ + + Back home + +
*/} +
+
+
+
+ github logo +
+
+ + +
+
+
+
+

+ + Supported Languages + + English +

+

+ Pricing + + Currently Free + +

+

+ Categories +

    +
  • Productivity
  • +
  • Communication
  • +
  • Developer Tools
  • +
+

+
+
+
+

Github

+
+ +
+
+

+ Bring your code to the conversations you care about +

+
+ repository +
+
+
+

+ Stay up to date about what’s happening on github without + leaving Zuri by connecting GitHub and Zuri app. +

+

+ With Github on Zuri, you can stay updated on: +

    +
  • New commits
  • +
  • New pull requests
  • +
  • New commits
  • +
  • Code reviews
  • +
+

+
+
+
+
+
+
+ ); +}; + +export default GithubHome; +======= import React from "react"; import { Link } from "react-router-dom"; import { IoChevronBackOutline } from "react-icons/io5"; @@ -108,3 +233,4 @@ const GithubHome = () => { }; export default GithubHome; +>>>>>>> 32423cfb69d2238af2d70fde23b950060807d52f diff --git a/client/src/components/MainPage/installedcard.js b/client/src/components/MainPage/installedcard.js index 90f09459..9a43bff3 100644 --- a/client/src/components/MainPage/installedcard.js +++ b/client/src/components/MainPage/installedcard.js @@ -1,104 +1,104 @@ -import React, { useState } from "react"; -// import ModalComponent from "../Modal/Modal"; -// import Modal from "react-bootstrap/Modal"; -import { useHistory, Link } from "react-router-dom"; - -const InstallToolsCard = ({ name, image, description, linkName }) => { - const [modalShowContent, setModalShowContent] = useState(false); - // console.log(linkName); - function MyVerticallyCenteredModal(props) { - return ( - - {/* - - Modal heading - - */} - -
-
-
-
ToolDescription
-
- -
-
- - -
-
-
- Supported Language -
-
English
-
-
-
Pricing
-
Currently Free
-
-
-
-
{props.name}
-
- -
-
- Google Drive lets you store files securely online, access them - from anywhere, and collaborate with others. Add the Google - Drive app to create Google Docs, import any type of file from - Google Drive, and get notifications on new comments, files, - and access requests — all without leaving your conversations - in Slack. -
-
-
-
-
- {/* - - */} -
- ); - } - - const history = useHistory(); - - const handleClick = () => { - history.push(`/${linkName}`); - }; - return ( -
- -
-
-
- -
-
-
{name}
-
{description}
-
-
-
- - {/* setModalShowContent(false)} - name={name} - image={image} - /> */} -
- ); -}; - -export default InstallToolsCard; +import React, { useState } from "react"; +// import ModalComponent from "../Modal/Modal"; +// import Modal from "react-bootstrap/Modal"; +import { useHistory, Link } from "react-router-dom"; + +const InstallToolsCard = ({ name, image, description, linkName }) => { + const [modalShowContent, setModalShowContent] = useState(false); + // console.log(linkName); + function MyVerticallyCenteredModal(props) { + return ( + + {/* + + Modal heading + + */} + +
+
+
+
ToolDescription
+
+ +
+
+ + +
+
+
+ Supported Language +
+
English
+
+
+
Pricing
+
Currently Free
+
+
+
+
{props.name}
+
+ +
+
+ Google Drive lets you store files securely online, access them + from anywhere, and collaborate with others. Add the Google + Drive app to create Google Docs, import any type of file from + Google Drive, and get notifications on new comments, files, + and access requests — all without leaving your conversations + in Slack. +
+
+
+
+
+ {/* + + */} +
+ ); + } + + const history = useHistory(); + + const handleClick = () => { + history.push(`/${linkName}`); + }; + return ( +
+ +
+
+
+ +
+
+
{name}
+
{description}
+
+
+
+ + {/* setModalShowContent(false)} + name={name} + image={image} + /> */} +
+ ); +}; + +export default InstallToolsCard; diff --git a/server/package.json b/server/package.json index 5f171890..081b114d 100644 --- a/server/package.json +++ b/server/package.json @@ -15,6 +15,7 @@ "author": "", "license": "ISC", "dependencies": { + "axios": "^0.21.1", "compression": "^1.7.3", "cors": "^2.8.5", "dotenv": "^10.0.0", diff --git a/server/src/controllers/github.js b/server/src/controllers/github.js new file mode 100644 index 00000000..3711bdd9 --- /dev/null +++ b/server/src/controllers/github.js @@ -0,0 +1,15 @@ +const axios = require("axios"); + +class GithubController { + async getUser(req, res) { + try { + const { user } = req.params; + const resp = await axios.get(`https://api.github.com/users/${user}`); + res.status(200).json(resp.data); + } catch (error) { + res.status(400).json(error); + } + } +} + +module.exports = new GithubController(); diff --git a/server/src/routes/github.js b/server/src/routes/github.js new file mode 100644 index 00000000..76e84ee6 --- /dev/null +++ b/server/src/routes/github.js @@ -0,0 +1,9 @@ +const githubRouter = require("express").Router(); + +const githubController = require("../controllers/github"); + +module.exports = function () { + githubRouter.get("/github/:user", githubController.getUser); + + return githubRouter; +}; diff --git a/server/src/routes/index.js b/server/src/routes/index.js index 542ca213..2d4ad0e2 100644 --- a/server/src/routes/index.js +++ b/server/src/routes/index.js @@ -2,6 +2,7 @@ const router = require("express").Router(); const pluginInfoRouter = require("./plugin-info"); const googleDriveApi = require("./googledrive"); const sideBarRouter = require("./sidebar"); +const githubRouter = require("./github"); const giphy = require("./giphy"); module.exports = () => { @@ -9,6 +10,7 @@ module.exports = () => { router.use(googleDriveApi()); router.use(sideBarRouter()); router.use(giphy()); + router.use(githubRouter()); // Handle Invalid API routes router.use((req, res, next) => { diff --git a/server/yarn.lock b/server/yarn.lock index 930582d0..5cdfa016 100644 --- a/server/yarn.lock +++ b/server/yarn.lock @@ -675,12 +675,7 @@ async@^3.1.0, async@~3.2.0: resolved "https://registry.yarnpkg.com/async/-/async-3.2.1.tgz#d3274ec66d107a47476a4c49136aacdb00665fc8" integrity sha512-XdD5lRO/87udXCMC9meWdYiR+Nq6ZjUfXidViUZGu2F1MO4T3XwZ1et0hb2++BgLfhyJwy44BGB/yx80ABx8hg== -axe-core@^4.0.2: - version "4.3.3" - resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.3.3.tgz#b55cd8e8ddf659fe89b064680e1c6a4dceab0325" - integrity sha512-/lqqLAmuIPi79WYfRpy2i8z+x+vxU3zX2uAm0gs1q52qTuKwolOj1P8XbufpXcsydrpKx2yGn2wzAnxCMV86QA== - -axios@^0.21.0: +axios@^0.21.0, axios@^0.21.1: version "0.21.1" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==