diff --git a/client/.gitignore b/client/.gitignore index 4d29575..800f3a8 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -10,6 +10,7 @@ # production /build +/dist # misc .DS_Store diff --git a/client/src/App.tsx b/client/src/App.tsx index 57285da..c1fafd6 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -2,6 +2,10 @@ import { Stack, FormControl, TextField, + OutlinedInput, + InputLabel, + InputAdornment, + IconButton, Button, MenuItem, Typography, @@ -10,7 +14,9 @@ import { debounce, Box, LinearProgress, + FormHelperText, } from "@mui/material"; +import { Visibility, VisibilityOff } from "@mui/icons-material"; import React, { useEffect, useState } from "react"; import { createDockerDesktopClient } from "@docker/extension-api-client"; import { Header } from "./Header"; @@ -28,6 +34,12 @@ function App() { useApiContext(); const [apikeyError, setApikeyError] = useState(null); + const [showPassword, setShowPassword] = React.useState(false); + const handleClickShowPassword = () => setShowPassword((show) => !show); + const handleMouseDownPassword = (event: React.MouseEvent) => { + event.preventDefault(); + }; + // sample API key: PMAK-6245dae283d9d36ec467cb18-d5a238ce70ed8161d502b30f1db056847b async function runCommand(collectionID, environmentID, apiKey) { @@ -199,18 +211,31 @@ function App() { ) : null} {!apiKeyInContext || !postmanInfo ? ( <> - { - validateApikeyError(e.target.value); - }} - focused - fullWidth - /> + + Postman API key + { + validateApikeyError(e.target.value); + }} + label="Postman API key" + endAdornment={ + + + {showPassword ? : } + + + } + /> + {apikeyError ? apikeyError : ""} + Find your Postman API key in{" "}