diff --git a/.gitignore b/.gitignore index 386035b5..98d1f194 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ lib-cov coverage *.lcov +.vs # nyc test coverage .nyc_output diff --git a/.vscode/launch.json b/.vscode/launch.json index 0b6b9a64..ad09500d 100755 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -25,6 +25,12 @@ "presentation": { "hidden": true } + }, + { + "type": "lldb", + "request": "attach", + "name": "Debug Electron Renderer", + "pid": "${command:pickProcess}" } ], "compounds": [ diff --git a/.vscode/settings.json b/.vscode/settings.json index 4c05394e..adcec785 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,5 +7,8 @@ }, "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "files.associations": { + "xstring": "cpp" } } diff --git a/package-lock.json b/package-lock.json index d9750b1f..7d7446d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,9 +16,11 @@ "bootstrap-typeahead": "^2.3.2", "clsx": "^2.1.1", "electron-store": "^8.2.0", + "electron-updater": "^6.3.9", "react": "^18.3.1", "react-bootstrap-icons": "^1.11.4", "react-dom": "^18.3.1", + "react-responsive": "^10.0.0", "scss": "^0.2.4", "trackaudio-afv": "file:backend/trackaudio-afv-1.0.0.tgz", "use-debounce": "^10.0.1", @@ -35,7 +37,7 @@ "@types/react": "^18.3.3", "@vitejs/plugin-react": "^4.0.0", "electron": "^32.0.2", - "electron-builder": "24.13.3", + "electron-builder": "^24.13.3", "electron-vite": "^2.0.0", "eslint": "^8.57.0", "eslint-plugin-react": "^7.34.2", @@ -2634,8 +2636,7 @@ "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "node_modules/array-buffer-byte-length": { "version": "1.0.1", @@ -3613,6 +3614,11 @@ "node": ">= 8" } }, + "node_modules/css-mediaquery": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/css-mediaquery/-/css-mediaquery-0.1.2.tgz", + "integrity": "sha512-COtn4EROW5dBGlE/4PiKnh6rZpAPxDeFLaEEwt4i10jpDMFt2EhQGS79QmmrO+iKCHv0PU/HrOWEhijFd1x99Q==" + }, "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", @@ -4191,6 +4197,65 @@ "dev": true, "license": "ISC" }, + "node_modules/electron-updater": { + "version": "6.3.9", + "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-6.3.9.tgz", + "integrity": "sha512-2PJNONi+iBidkoC5D1nzT9XqsE8Q1X28Fn6xRQhO3YX8qRRyJ3mkV4F1aQsuRnYPqq6Hw+E51y27W75WgDoofw==", + "dependencies": { + "builder-util-runtime": "9.2.10", + "fs-extra": "^10.1.0", + "js-yaml": "^4.1.0", + "lazy-val": "^1.0.5", + "lodash.escaperegexp": "^4.1.2", + "lodash.isequal": "^4.5.0", + "semver": "^7.6.3", + "tiny-typed-emitter": "^2.1.0" + } + }, + "node_modules/electron-updater/node_modules/builder-util-runtime": { + "version": "9.2.10", + "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-9.2.10.tgz", + "integrity": "sha512-6p/gfG1RJSQeIbz8TK5aPNkoztgY1q5TgmGFMAXcY8itsGW6Y2ld1ALsZ5UJn8rog7hKF3zHx5iQbNQ8uLcRlw==", + "dependencies": { + "debug": "^4.3.4", + "sax": "^1.2.4" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/electron-updater/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/electron-updater/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/electron-updater/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/electron-vite": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/electron-vite/-/electron-vite-2.0.0.tgz", @@ -5529,6 +5594,11 @@ "node": ">= 6" } }, + "node_modules/hyphenate-style-name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.1.0.tgz", + "integrity": "sha512-WDC/ui2VVRrz3jOVi+XtjqkDjiVjTtFaAGiW37k6b+ohyQ5wYDOGkvCZa8+H0nx3gyvv0+BST9xuOgIyGQ00gw==" + }, "node_modules/iconv-corefoundation": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/iconv-corefoundation/-/iconv-corefoundation-1.1.7.tgz", @@ -6168,7 +6238,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, "dependencies": { "argparse": "^2.0.1" }, @@ -6265,8 +6334,7 @@ "node_modules/lazy-val": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/lazy-val/-/lazy-val-1.0.5.tgz", - "integrity": "sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q==", - "dev": true + "integrity": "sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q==" }, "node_modules/lazystream": { "version": "1.0.1", @@ -6362,6 +6430,11 @@ "dev": true, "peer": true }, + "node_modules/lodash.escaperegexp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", + "integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==" + }, "node_modules/lodash.flatten": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", @@ -6369,6 +6442,11 @@ "dev": true, "peer": true }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" + }, "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", @@ -6444,6 +6522,14 @@ "node": ">=10" } }, + "node_modules/matchmediaquery": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/matchmediaquery/-/matchmediaquery-0.4.2.tgz", + "integrity": "sha512-wrZpoT50ehYOudhDjt/YvUJc6eUzcdFPdmbizfgvswCKNHD1/OBOHYJpHie+HXpu6bSkEGieFMYk6VuutaiRfA==", + "dependencies": { + "css-mediaquery": "^0.1.2" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -7277,6 +7363,23 @@ "node": ">=0.10.0" } }, + "node_modules/react-responsive": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/react-responsive/-/react-responsive-10.0.0.tgz", + "integrity": "sha512-N6/UiRLGQyGUqrarhBZmrSmHi2FXSD++N5VbSKsBBvWfG0ZV7asvUBluSv5lSzdMyEVjzZ6Y8DL4OHABiztDOg==", + "dependencies": { + "hyphenate-style-name": "^1.0.0", + "matchmediaquery": "^0.4.2", + "prop-types": "^15.6.1", + "shallow-equal": "^3.1.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, "node_modules/read-config-file": { "version": "6.3.2", "resolved": "https://registry.npmjs.org/read-config-file/-/read-config-file-6.3.2.tgz", @@ -7639,8 +7742,7 @@ "node_modules/sax": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", - "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", - "dev": true + "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==" }, "node_modules/scheduler": { "version": "0.23.2", @@ -7663,10 +7765,9 @@ } }, "node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "license": "ISC", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "bin": { "semver": "bin/semver.js" }, @@ -7729,6 +7830,11 @@ "node": ">= 0.4" } }, + "node_modules/shallow-equal": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/shallow-equal/-/shallow-equal-3.1.0.tgz", + "integrity": "sha512-pfVOw8QZIXpMbhBWvzBISicvToTiM5WBF1EeAUZDDSb5Dt29yl4AYbyywbJFSEsRUMr7gJaxqCdr4L3tQf9wVg==" + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -8153,6 +8259,11 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/tiny-typed-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-typed-emitter/-/tiny-typed-emitter-2.1.0.tgz", + "integrity": "sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA==" + }, "node_modules/tmp": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", @@ -8196,8 +8307,7 @@ "node_modules/trackaudio-afv": { "version": "1.0.0", "resolved": "file:backend/trackaudio-afv-1.0.0.tgz", - "integrity": "sha512-oK6MjM//VaGwM58DCQJl4hf4B2rA3TSM7uzVz/s3ta0tS4r52scjZohZIM7H8k9tGrZDOdoFsVGAAE8jvVapaA==", - "license": "GPL-3.0-only", + "integrity": "sha512-nImUxtANHb8n2YvRHtSja+GPUeAXO+MivFKvjQIzF1r5IkNN2P0lnwFT39xb0WLRa+bWhiGW1ORBP4ubX8npzA==", "dependencies": { "bindings": "^1.5.0", "node-addon-api": "^1.1.0" diff --git a/src/renderer/src/components/add-station-model/station-modal.tsx b/src/renderer/src/components/add-station-model/station-modal.tsx index 779d50cb..214a61cd 100644 --- a/src/renderer/src/components/add-station-model/station-modal.tsx +++ b/src/renderer/src/components/add-station-model/station-modal.tsx @@ -24,7 +24,7 @@ const AddStationModal: React.FC = ({ closeModal }) => {
-
AFV Configuration
+
New Ration
= ({ closeModal }) => {
diff --git a/src/renderer/src/components/bootstrap.tsx b/src/renderer/src/components/bootstrap.tsx index 2abed1d2..20ec113c 100644 --- a/src/renderer/src/components/bootstrap.tsx +++ b/src/renderer/src/components/bootstrap.tsx @@ -120,6 +120,7 @@ const Bootsrap: React.FC = () => { }); window.api.on('VoiceDisconnected', () => { + console.log('Voice disconnected'); useSessionStore.getState().setIsConnecting(false); useSessionStore.getState().setIsConnected(false); useRadioState.getState().reset(); @@ -137,6 +138,7 @@ const Bootsrap: React.FC = () => { }); window.api.on('network-disconnected', () => { + console.log('Network connected'); useSessionStore.getState().setNetworkConnected(false); useSessionStore.getState().setCallsign(''); useSessionStore.getState().setIsAtc(false); diff --git a/src/renderer/src/components/navbar.tsx b/src/renderer/src/components/navbar.tsx index 7a13ca0a..0c8c0c52 100644 --- a/src/renderer/src/components/navbar.tsx +++ b/src/renderer/src/components/navbar.tsx @@ -83,13 +83,13 @@ const Navbar: React.FC = () => {
@@ -97,15 +97,16 @@ const Navbar: React.FC = () => { {!isEditMode && (
- - {platform === 'linux' && ( - - )} +
)} @@ -122,27 +123,26 @@ const Navbar: React.FC = () => { - {isNetworkConnected && ( - -
+ {/* {isNetworkConnected && ( */} + +
+ + {platform === 'linux' && ( -
-
- )} - {isNetworkConnected && ( - - - - )} + )} +
+
+ {/* )} */} + {/* {isNetworkConnected && ( */} + + + + {/* )} */}
diff --git a/src/renderer/src/components/radio/global-radio-gain.tsx b/src/renderer/src/components/radio/global-radio-gain.tsx index f6ae45d8..6214abbf 100644 --- a/src/renderer/src/components/radio/global-radio-gain.tsx +++ b/src/renderer/src/components/radio/global-radio-gain.tsx @@ -67,7 +67,7 @@ const GlobalRadioGain = () => { lineHeight: '29px' }} > - MASTER + MAIN
)} diff --git a/src/renderer/src/components/radio/radio-container.tsx b/src/renderer/src/components/radio/radio-container.tsx index cbb1a5a9..9bf4873b 100644 --- a/src/renderer/src/components/radio/radio-container.tsx +++ b/src/renderer/src/components/radio/radio-container.tsx @@ -26,12 +26,11 @@ const RadioContainer: React.FC = () => { if (!isNetworkConnected) { return (
-
- No VATSIM connection found! +
+ No VATSIM connection detected!
- Ensure you have established a valid connection to the VATSIM network before attempting to - connect to AFV. + Please ensure your ATC client is running and connected to the VATSIM network.
); @@ -40,11 +39,11 @@ const RadioContainer: React.FC = () => { if (!isConnected) { return (
-
- VATSIM connection found! +
+ VATSIM connection detected!
- Click the connect button to establish a connection to AFV. + Click the connect button to establish a connection to the VATSIM audio network.
); diff --git a/src/renderer/src/components/radio/rxinfo.tsx b/src/renderer/src/components/radio/rxinfo.tsx index 1b4de1ae..e7821409 100644 --- a/src/renderer/src/components/radio/rxinfo.tsx +++ b/src/renderer/src/components/radio/rxinfo.tsx @@ -1,7 +1,12 @@ import useRadioState from '@renderer/store/radioStore'; import React, { useMemo, useState, useEffect } from 'react'; import type { RadioType } from '@renderer/store/radioStore'; -import { ArrowsAngleExpand } from 'react-bootstrap-icons'; +import { + ArrowsAngleExpand, + LayoutSidebarInset, + LayoutSidebarInsetReverse, + LayoutSidebarReverse +} from 'react-bootstrap-icons'; import useUtilStore from '@renderer/store/utilStore'; import clsx from 'clsx'; import { useMediaQuery } from 'react-responsive'; @@ -75,7 +80,7 @@ const RxInfo: React.FC = () => { setShowExpandedRxInfo(!showExpandedRxInfo); }} > - + {!showExpandedRxInfo ? : }
)} diff --git a/src/renderer/src/components/sidebar/add-frequency.tsx b/src/renderer/src/components/sidebar/add-frequency.tsx index 1487210c..d0dbb0bb 100644 --- a/src/renderer/src/components/sidebar/add-frequency.tsx +++ b/src/renderer/src/components/sidebar/add-frequency.tsx @@ -73,7 +73,7 @@ const AddFrequency: React.FC = ({ onAddFrequency }) => { return (
-
Add a VHF frequency
+
Add a VHF Frequency
= ({ className = '' }) = ? 'CONNECTING' : callsign ? `CONNECT` - : 'NO ACTIVE CONNECTION'} + : 'CONNECT'} ); diff --git a/src/renderer/src/style/app.scss b/src/renderer/src/style/app.scss index fc80c47e..02a5321d 100644 --- a/src/renderer/src/style/app.scss +++ b/src/renderer/src/style/app.scss @@ -374,17 +374,17 @@ button:disabled { flex-direction: column; align-items: center; justify-content: center; - gap: 2px; + // gap: 1px; } .frequency { - font-size: 0.9rem; + font-size: 15px; line-height: 1; font-weight: 500; } .callsign { - font-size: 0.85rem; + font-size: 14px; line-height: 1; font-weight: normal; }