From 16e77087f5832cd1f9378e6bd6dd98c142dfa8d0 Mon Sep 17 00:00:00 2001 From: Davide Passoni Date: Fri, 7 Mar 2025 11:12:17 +0100 Subject: [PATCH] fix: Removed unnecessary entries from sidebar and header, fixed non working main menu links --- frontend/react/src/ui/panels/header.tsx | 57 +++++--------- frontend/react/src/ui/panels/mainmenu.tsx | 96 +++-------------------- frontend/react/src/ui/panels/sidebar.tsx | 4 +- 3 files changed, 35 insertions(+), 122 deletions(-) diff --git a/frontend/react/src/ui/panels/header.tsx b/frontend/react/src/ui/panels/header.tsx index 8f2f008b..e3891a3a 100644 --- a/frontend/react/src/ui/panels/header.tsx +++ b/frontend/react/src/ui/panels/header.tsx @@ -145,33 +145,6 @@ export function Header() { {IP} - { - getApp().setState(OlympusState.IMPORT_EXPORT, ImportExportSubstate.EXPORT); - }} - checked={false} - tooltip={() => ( - - )} - tooltipRelativeToParent={true} - /> - { - getApp().setState(OlympusState.IMPORT_EXPORT, ImportExportSubstate.IMPORT); - }} - checked={false} - tooltip={() => ( - - )} - /> {savingSessionData ? (
@@ -208,9 +181,16 @@ export function Header() { tooltip={() => (

By default, Mission Editor units are protected from being commanded or deleted. This option allows you to unlock them, so they can be commanded or deleted like any other unit.

-

If units are protected, you will still be able to control them, but a prompt will be shown to require your confirmation.

-

Once a unit has been commanded, it will be unlocked and will become an Olympus unit, completely abandoning its previuos mission.

} + content={ + <> +

+ By default, Mission Editor units are protected from being commanded or deleted. This option allows you to unlock them, so they can be + commanded or deleted like any other unit.{" "} +

+

If units are protected, you will still be able to control them, but a prompt will be shown to require your confirmation.

+

Once a unit has been commanded, it will be unlocked and will become an Olympus unit, completely abandoning its previuos mission.

+ + } /> )} /> @@ -223,9 +203,16 @@ export function Header() { tooltip={() => (

If this option is enabled, you will be able to access the radio and audio features of DCS Olympus.

-

For this to work, a SRS Server need to be installed and running on the same machine on which the DCS Olympus server is running.

-

For security reasons, this feature will only work if a secure connection (i.e., using https) is established with the server. It is also suggested to use Google Chrome for optimal compatibility.

} + content={ + <> +

If this option is enabled, you will be able to access the radio and audio features of DCS Olympus.

+

For this to work, a SRS Server need to be installed and running on the same machine on which the DCS Olympus server is running.

+

+ For security reasons, this feature will only work if a secure connection (i.e., using https) is established with the server. It is also + suggested to use Google Chrome for optimal compatibility.{" "} +

+ + } /> )} icon={faVolumeHigh} @@ -368,10 +355,6 @@ export function Header() { ); })} - getApp().setState(OlympusState.TRAINING)} - className={`cursor-pointer text-2xl text-white`} - />
{!scrolledRight && ( void; children?: JSX.Element | JSX.Element[] }) { return ( @@ -46,6 +35,7 @@ export function MainMenu(props: { open: boolean; onClose: () => void; children?: dark:hover:bg-olympus-500 hover:bg-gray-900/10 `} + onClick={() => window.open("https://github.com/Pax1601/DCSOlympus")} > {/**/} View GitHub Repo @@ -74,6 +64,7 @@ export function MainMenu(props: { open: boolean; onClose: () => void; children?: dark:hover:bg-olympus-500 hover:bg-gray-900/10 `} + onClick={() => window.open("https://github.com/Pax1601/DCSOlympus/wiki")} > {/**/} View User Guide @@ -101,6 +92,7 @@ export function MainMenu(props: { open: boolean; onClose: () => void; children?: dark:border-olympus-500 `} > +
void; children?: dark:hover:bg-olympus-500 hover:bg-gray-900/10 `} - > - {/**/} - Open Olympus Manager -
- -
-
-
- {/**/} - Database Manager -
- -
-
-
{ + getApp().setState(OlympusState.IMPORT_EXPORT, ImportExportSubstate.EXPORT); + }} > {/**/} Export to file @@ -171,6 +124,10 @@ export function MainMenu(props: { open: boolean; onClose: () => void; children?: dark:hover:bg-olympus-500 hover:bg-gray-900/10 `} + + onClick={() => { + getApp().setState(OlympusState.IMPORT_EXPORT, ImportExportSubstate.IMPORT); + }} > {/**/} Import from file @@ -185,33 +142,6 @@ export function MainMenu(props: { open: boolean; onClose: () => void; children?: />
-
-
- {/**/} - Close Olympus -
- -
-
); diff --git a/frontend/react/src/ui/panels/sidebar.tsx b/frontend/react/src/ui/panels/sidebar.tsx index 9b4b99c7..ae194330 100644 --- a/frontend/react/src/ui/panels/sidebar.tsx +++ b/frontend/react/src/ui/panels/sidebar.tsx @@ -101,10 +101,10 @@ export function SideBar() {
window.open("https://github.com/Pax1601/DCSOlympus/wiki")} + onClick={() => getApp().setState(OlympusState.TRAINING)} checked={false} icon={faQuestionCircle} - tooltip="Open user guide on separate window" + tooltip="Open Quick Start Guide" tooltipPosition="side" >