From 24ea28165070709ca30b65df2fd9dff6821057a8 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 22 Mar 2025 13:35:52 +0000 Subject: [PATCH] Fixed Voice Channels type and display, updated vulnerable modules, fully re-worked dev docker compose file. Production usage not ready. --- frontend/env/.env.dev | 18 +++++++++--------- frontend/env/.env.prod | 18 +++++++++--------- .../src/components/modals/create-channel.tsx | 2 +- .../navigation/sidebar/channel-tabs.tsx | 2 +- frontend/src/components/pages/page-wrapper.tsx | 2 +- frontend/src/services/ws-service.ts | 4 ++-- frontend/types/dotenv.d.ts | 1 + 7 files changed, 24 insertions(+), 23 deletions(-) diff --git a/frontend/env/.env.dev b/frontend/env/.env.dev index 3ab554bf..1b25cd74 100644 --- a/frontend/env/.env.dev +++ b/frontend/env/.env.dev @@ -1,10 +1,10 @@ -PORT=4200 -REACT_APP_API_URL="http://localhost:3000/v2" -REACT_APP_CDN_URL="http://localhost:3000/assets" -REACT_APP_WEBSITE_URL="http://localhost:4200" +PORT=3000 +REACT_APP_API_URL="https://lisa.root.sx/api/v2" +REACT_APP_CDN_URL="https://lisa.root.sx/api/assets" +REACT_APP_WEBSITE_URL="https://lisa.root.sx" REACT_APP_REPO_URL="https://github.com/theadamjr/acrd.app" -REACT_APP_VERSION_NAME="Cyan" -REACT_APP_VERSION_NUMBER="0.6.0-in-development" -REACT_APP_ROOT_API_URL="http://localhost:3000" -REACT_APP_OWNER_USER_ID="450428712295456768" -REACT_APP_RECAPTCHA_SITE_KEY="6Ldzz2omAAAAAAZ7Ey6ZmDtCS5rMSxVYc3Uf5EpQ" \ No newline at end of file +REACT_APP_VERSION_NAME="PVTChat" +REACT_APP_VERSION_NUMBER="0.0.1" +REACT_APP_ROOT_API_URL="https://lisa.root.sx/api" +REACT_APP_OWNER_USER_ID="691264629460029440" +REACT_APP_RECAPTCHA_SITE_KEY="6LfKs_wqAAAAAFj0E4Dk10TeMkBoKJkEMoG6C23G" \ No newline at end of file diff --git a/frontend/env/.env.prod b/frontend/env/.env.prod index 273457d7..19124cd0 100644 --- a/frontend/env/.env.prod +++ b/frontend/env/.env.prod @@ -1,10 +1,10 @@ -PORT=4200 -REACT_APP_API_URL="https://api.acrd.app/v2" -REACT_APP_CDN_URL="https://api.acrd.app/assets" -REACT_APP_WEBSITE_URL="https://acrd.app" +PORT=3000 +REACT_APP_API_URL="http://192.168.2.100:3000/v2" +REACT_APP_CDN_URL="http://192.168.2.100:3000/assets" +REACT_APP_WEBSITE_URL="http://192.168.2.100:3000" REACT_APP_REPO_URL="https://github.com/theadamjr/acrd.app" -REACT_APP_VERSION_NAME="Cyan" -REACT_APP_VERSION_NUMBER="0.6.0-in-development" -REACT_APP_ROOT_API_URL="https://api.acrd.app" -REACT_APP_OWNER_USER_ID="451453819310678016" -REACT_APP_RECAPTCHA_SITE_KEY="6Ldzz2omAAAAAAZ7Ey6ZmDtCS5rMSxVYc3Uf5EpQ" \ No newline at end of file +REACT_APP_VERSION_NAME="PVTChat" +REACT_APP_VERSION_NUMBER="0.0.1" +REACT_APP_ROOT_API_URL="http://192.168.2.100:3001" +REACT_APP_OWNER_USER_ID="450428712295456768" +REACT_APP_RECAPTCHA_SITE_KEY="" \ No newline at end of file diff --git a/frontend/src/components/modals/create-channel.tsx b/frontend/src/components/modals/create-channel.tsx index 9cbfa83a..86a56ea8 100644 --- a/frontend/src/components/modals/create-channel.tsx +++ b/frontend/src/components/modals/create-channel.tsx @@ -16,7 +16,7 @@ const CreateChannel: React.FunctionComponent = () => { setValue('name', ''); }; - const types: ChannelTypes.Type[] = ['TEXT']; + const types: ChannelTypes.Type[] = ['TEXT','VOICE']; return ( diff --git a/frontend/src/components/navigation/sidebar/channel-tabs.tsx b/frontend/src/components/navigation/sidebar/channel-tabs.tsx index e7da0f6e..04c50301 100644 --- a/frontend/src/components/navigation/sidebar/channel-tabs.tsx +++ b/frontend/src/components/navigation/sidebar/channel-tabs.tsx @@ -18,7 +18,7 @@ const ChannelTabs: React.FunctionComponent = () => { const dispatch = useDispatch(); const { activeGuild, activeChannel } = useSelector((s: Store.AppState) => s.ui); const guildChannels = useSelector(getGuildChannels(activeGuild?.id)) - .filter(c => c.type !== 'VOICE'); + .filter(c => c.type); const perms = usePerms(); if (!activeGuild || !perms.can('VIEW_CHANNELS', activeGuild.id)) return null; diff --git a/frontend/src/components/pages/page-wrapper.tsx b/frontend/src/components/pages/page-wrapper.tsx index 696e6490..52e46328 100644 --- a/frontend/src/components/pages/page-wrapper.tsx +++ b/frontend/src/components/pages/page-wrapper.tsx @@ -24,7 +24,7 @@ const PageWrapper: React.FunctionComponent = (props) => { const [hasAnnoyedUser, setHasAnnoyedUser] = useState(false); useEffect(() => { - document.title = props.pageTitle ?? 'acrd.app'; + document.title = props.pageTitle ?? 'PVTChat'; }, []); const onClick = () => dropdown && dispatch(ui.toggleDropdown({})); diff --git a/frontend/src/services/ws-service.ts b/frontend/src/services/ws-service.ts index 59e08675..5411eee1 100644 --- a/frontend/src/services/ws-service.ts +++ b/frontend/src/services/ws-service.ts @@ -2,13 +2,13 @@ import '@acrd/types'; import { WS } from '@acrd/types'; import io from 'socket.io-client'; -const ws = (io as any).connect(process.env.REACT_APP_ROOT_API_URL, { +const ws = (io as any).connect(process.env.REACT_APP_WEBSITE_URL, { secure: true, path: `/ws`, transports: ['websocket', 'polling', 'flashsocket'], }); -ws.io.on('open', () => console.log('Connected to WS Server')); +ws.io.on('open', () => console.log(`Connected to WS Server ${process.env.REACT_APP_WEBSITE_URL}/ws`)); export default ws as WSClient; diff --git a/frontend/types/dotenv.d.ts b/frontend/types/dotenv.d.ts index 6d7fdce1..6bdbd0bb 100644 --- a/frontend/types/dotenv.d.ts +++ b/frontend/types/dotenv.d.ts @@ -11,6 +11,7 @@ declare global { REACT_APP_ROOT_API_URL: string; REACT_APP_OWNER_USER_ID: string; REACT_APP_RECAPTCHA_SITE_KEY: string; + REACT_APP_DISABLE_CAPTCHA: string; } } }