diff --git a/client/public/index.html b/client/public/index.html index 7744282..fbfdfe7 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -9,35 +9,10 @@ name="description" content="Web site created using create-react-app" /> - - - - ChatBridge
- diff --git a/client/public/manifest.json b/client/public/manifest.json index 080d6c7..2e4060b 100644 --- a/client/public/manifest.json +++ b/client/public/manifest.json @@ -1,25 +1,8 @@ { - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], + "short_name": "ChatBridge", + "name": "ChatBridge: Bridge ur chatz", "start_url": ".", "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" + "theme_color": "#FFFFFF", + "background_color": "#1C1B22" } diff --git a/client/src/App.tsx b/client/src/App.tsx index ebeb59d..856d5b6 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -1,8 +1,7 @@ import React from 'react'; -import logo from './logo.svg'; import { createTheme, ThemeProvider } from '@mui/material/styles'; -import { yellow} from "@mui/material/colors"; -import './sass/index.scss'; +import { yellow } from "@mui/material/colors"; + const theme = createTheme({ palette:{ @@ -28,4 +27,4 @@ function App() { ); } -export default App; \ No newline at end of file +export default App; diff --git a/client/src/components/groups/groupPanel.tsx b/client/src/components/groups/groupPanel.tsx index f64b230..09be21b 100644 --- a/client/src/components/groups/groupPanel.tsx +++ b/client/src/components/groups/groupPanel.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import {useState, useEffect} from "react"; import Table from '@mui/material/Table'; import TableBody from '@mui/material/TableBody'; @@ -7,7 +6,6 @@ import TableCell from '@mui/material/TableCell'; import TableRow from "@mui/material/TableRow"; import TableContainer from '@mui/material/TableContainer'; import TableHead from '@mui/material/TableHead'; -import Typography from "@mui/material/Typography"; import GroupRow from "./groupRow"; @@ -45,4 +43,4 @@ export default function GroupPanel({ ) -} \ No newline at end of file +} diff --git a/client/src/components/groups/groupRow.tsx b/client/src/components/groups/groupRow.tsx index d936628..18888b3 100644 --- a/client/src/components/groups/groupRow.tsx +++ b/client/src/components/groups/groupRow.tsx @@ -1,6 +1,4 @@ import TableCell from '@mui/material/TableCell'; -import TableContainer from '@mui/material/TableContainer'; -import TableHead from '@mui/material/TableHead'; import TableRow from '@mui/material/TableRow'; import DeleteForeverIcon from '@mui/icons-material/DeleteForever'; import IconButton from "@mui/material/IconButton" @@ -46,4 +44,4 @@ export default function GroupRow( ) -} \ No newline at end of file +} diff --git a/client/src/components/join/joinBridge.tsx b/client/src/components/join/joinBridge.tsx index 6f7b280..19e330a 100644 --- a/client/src/components/join/joinBridge.tsx +++ b/client/src/components/join/joinBridge.tsx @@ -1,9 +1,10 @@ -import Grid from "@mui/material/Grid"; +import {useState} from "react"; + import TextField from "@mui/material/TextField"; import Button from "@mui/material/Button"; import {setBridgeLabel} from "../../api/bridge"; -import {useState} from "react"; + export const JoinBridge = ({ diff --git a/client/src/components/join/joinChannel.tsx b/client/src/components/join/joinChannel.tsx index a858880..de95762 100644 --- a/client/src/components/join/joinChannel.tsx +++ b/client/src/components/join/joinChannel.tsx @@ -1,15 +1,17 @@ +import {useEffect, useState} from "react"; + import FormControl from "@mui/material/FormControl"; import InputLabel from "@mui/material/InputLabel"; import Select from "@mui/material/Select"; import MenuItem from "@mui/material/MenuItem"; import Button from "@mui/material/Button"; -import {stepCompleteType} from "./joinForm"; +import {stepCompleteType} from "./joinForm"; import {getSlackChannels, joinSlackChannel} from "../../api/slack"; -import {useEffect, useState} from "react"; +import {getDiscordChannels} from "../../api/discord"; + import {channelsType} from "../../types/channel"; import {bridgeType} from "../../types/bridge"; -import {getDiscordChannels} from "../../api/discord"; export interface JoinChannelProps { diff --git a/client/src/components/join/joinForm.tsx b/client/src/components/join/joinForm.tsx index 15aa11d..fd31272 100644 --- a/client/src/components/join/joinForm.tsx +++ b/client/src/components/join/joinForm.tsx @@ -1,12 +1,13 @@ +import {useState, useEffect} from "react"; + +import Button from '@mui/material/Button'; -import {Group} from "../../types/group"; import {JoinStep} from './joinStep'; import {JoinLogin} from "./joinLogin"; -import {useState, useEffect} from "react"; -import Button from '@mui/material/Button'; -import {createChannel} from "../../api/channel"; import {JoinBridge} from "./joinBridge"; import JoinChannel from "./joinChannel"; +import {createChannel} from "../../api/channel"; +import {Group} from "../../types/group"; import {bridgeType} from "../../types/bridge"; export interface JoinFormProps { diff --git a/client/src/components/join/joinGroup.tsx b/client/src/components/join/joinGroup.tsx index 334e5c0..4263b7c 100644 --- a/client/src/components/join/joinGroup.tsx +++ b/client/src/components/join/joinGroup.tsx @@ -1,10 +1,12 @@ import React, {useState} from 'react'; -import {Group} from '../../types/group' -import {groupInvite} from '../../api/groups' import TextField from "@mui/material/TextField"; import Button from "@mui/material/Button"; +import {groupInvite} from '../../api/groups' +import {Group} from '../../types/group' + + export interface JoinGroupProps { group: Group; setGroup: React.Dispatch> diff --git a/client/src/components/join/joinLogin.tsx b/client/src/components/join/joinLogin.tsx index 41791c2..7d266fb 100644 --- a/client/src/components/join/joinLogin.tsx +++ b/client/src/components/join/joinLogin.tsx @@ -1,8 +1,8 @@ /* Select which platform you're joining from! */ - import React, {useEffect, useState} from 'react'; + import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import FormControl from '@mui/material/FormControl'; diff --git a/client/src/components/join/joinStep.tsx b/client/src/components/join/joinStep.tsx index 83adeb9..f7d9a36 100644 --- a/client/src/components/join/joinStep.tsx +++ b/client/src/components/join/joinStep.tsx @@ -1,4 +1,5 @@ import * as React from 'react'; + import Accordion from '@mui/material/Accordion'; import AccordionDetails from '@mui/material/AccordionDetails'; import AccordionSummary from '@mui/material/AccordionSummary'; @@ -6,7 +7,6 @@ import Typography from '@mui/material/Typography'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked'; import TaskAltIcon from '@mui/icons-material/TaskAlt'; -import {useState} from "react"; export interface JoinStepProps { children: any; @@ -57,4 +57,4 @@ export function JoinStep( ) -} \ No newline at end of file +} diff --git a/client/src/components/modePanel.tsx b/client/src/components/modePanel.tsx index 05e9fba..3347b89 100644 --- a/client/src/components/modePanel.tsx +++ b/client/src/components/modePanel.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import Tab from '@mui/material/Tab'; -import TabsList from '@mui/base/TabsList'; import Tabs from '@mui/material/Tabs'; import Box from "@mui/material/Box"; import { styled } from '@mui/material/styles'; diff --git a/client/src/components/panels/joinPanel.tsx b/client/src/components/panels/joinPanel.tsx index 36f55aa..c96fadb 100644 --- a/client/src/components/panels/joinPanel.tsx +++ b/client/src/components/panels/joinPanel.tsx @@ -1,13 +1,10 @@ import React from 'react'; import {useState, useEffect} from "react"; -import TextField from '@mui/material/TextField'; -import Button from '@mui/material/Button'; import {JoinForm} from "../join/joinForm"; import {JoinGroup} from '../join/joinGroup'; import {Group} from "../../types/group"; -import {groupInvite} from "../../api/groups"; export default function JoinPanel(){ const [group, setGroup] = useState(undefined); diff --git a/client/src/components/panels/managePanel.tsx b/client/src/components/panels/managePanel.tsx index d2ec627..4ebc7fa 100644 --- a/client/src/components/panels/managePanel.tsx +++ b/client/src/components/panels/managePanel.tsx @@ -1,5 +1,6 @@ import React from 'react'; import {useState, useEffect} from "react"; + import TextField from '@mui/material/TextField'; import Button from '@mui/material/Button'; @@ -142,4 +143,4 @@ export default function ManagePanel(){ } ) -} \ No newline at end of file +} diff --git a/client/src/components/platforms/discordLogin.tsx b/client/src/components/platforms/discordLogin.tsx index 1f59496..2e78410 100644 --- a/client/src/components/platforms/discordLogin.tsx +++ b/client/src/components/platforms/discordLogin.tsx @@ -1,7 +1,9 @@ import {useEffect, useRef, useState} from "react"; + +import Button from "@mui/material/Button"; + import {getDiscordInstallURL} from "../../api/discord"; import {getBridgeByStateToken} from "../../api/bridge"; -import Button from "@mui/material/Button"; export const DiscordLogin = ({ @@ -53,4 +55,4 @@ export const DiscordLogin = ({ {installLink === undefined ? 'Waiting for Install Link...' : 'Add to Discord'} ) -} \ No newline at end of file +} diff --git a/client/src/components/platforms/slackLogin.tsx b/client/src/components/platforms/slackLogin.tsx index 4122f57..c49ad15 100644 --- a/client/src/components/platforms/slackLogin.tsx +++ b/client/src/components/platforms/slackLogin.tsx @@ -1,5 +1,7 @@ import React, {useEffect, useRef, useState} from 'react' + import Button from "@mui/material/Button"; + import {getSlackInstallURL} from "../../api/slack"; import {getBridgeByStateToken} from "../../api/bridge"; diff --git a/client/src/components/tabPanel.tsx b/client/src/components/tabPanel.tsx index af3c6aa..e3682c3 100644 --- a/client/src/components/tabPanel.tsx +++ b/client/src/components/tabPanel.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import Typography from '@mui/material/Typography'; import Box from '@mui/material/Box'; export default function TabPanel(props) { @@ -27,4 +26,4 @@ TabPanel.propTypes = { children: PropTypes.node, index: PropTypes.number.isRequired, value: PropTypes.number.isRequired, -}; \ No newline at end of file +}; diff --git a/client/src/index.tsx b/client/src/index.tsx index 5d6db87..7258d73 100644 --- a/client/src/index.tsx +++ b/client/src/index.tsx @@ -1,8 +1,9 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; -import './sass/index.scss'; import App from './App'; +import './sass/index.scss'; + const root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement ); diff --git a/client/styles/App.css b/client/styles/App.css deleted file mode 100644 index 74b5e05..0000000 --- a/client/styles/App.css +++ /dev/null @@ -1,38 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/client/styles/index.css b/client/styles/index.css deleted file mode 100644 index ec2585e..0000000 --- a/client/styles/index.css +++ /dev/null @@ -1,13 +0,0 @@ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -}