mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
fix: Removed unnecessary entries from sidebar and header, fixed non working main menu links
This commit is contained in:
@@ -145,33 +145,6 @@ export function Header() {
|
|||||||
{IP}
|
{IP}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<OlStateButton
|
|
||||||
icon={faDownload}
|
|
||||||
onClick={() => {
|
|
||||||
getApp().setState(OlympusState.IMPORT_EXPORT, ImportExportSubstate.EXPORT);
|
|
||||||
}}
|
|
||||||
checked={false}
|
|
||||||
tooltip={() => (
|
|
||||||
<OlExpandingTooltip
|
|
||||||
title="Export scenario from file"
|
|
||||||
content="Selectively export the current scenario to a file. This file can be shared with other users or imported later. Currently, only ground and naval units can be exported."
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
tooltipRelativeToParent={true}
|
|
||||||
/>
|
|
||||||
<OlStateButton
|
|
||||||
icon={faUpload}
|
|
||||||
onClick={() => {
|
|
||||||
getApp().setState(OlympusState.IMPORT_EXPORT, ImportExportSubstate.IMPORT);
|
|
||||||
}}
|
|
||||||
checked={false}
|
|
||||||
tooltip={() => (
|
|
||||||
<OlExpandingTooltip
|
|
||||||
title="Import scenario from file"
|
|
||||||
content="Import a scenario from a previously exported file. This will add the imported units to the current scenario, so make sure to delete any unwanted units before importing."
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
{savingSessionData ? (
|
{savingSessionData ? (
|
||||||
<div className="text-white">
|
<div className="text-white">
|
||||||
<FaSpinner className={`animate-spin text-2xl`} />
|
<FaSpinner className={`animate-spin text-2xl`} />
|
||||||
@@ -208,9 +181,16 @@ export function Header() {
|
|||||||
tooltip={() => (
|
tooltip={() => (
|
||||||
<OlExpandingTooltip
|
<OlExpandingTooltip
|
||||||
title="Lock/unlock protected units"
|
title="Lock/unlock protected units"
|
||||||
content={<><p>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. </p>
|
content={
|
||||||
<p>If units are protected, you will still be able to control them, but a prompt will be shown to require your confirmation. </p>
|
<>
|
||||||
<p>Once a unit has been commanded, it will be unlocked and will become an Olympus unit, completely abandoning its previuos mission. </p></>}
|
<p>
|
||||||
|
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.{" "}
|
||||||
|
</p>
|
||||||
|
<p>If units are protected, you will still be able to control them, but a prompt will be shown to require your confirmation. </p>
|
||||||
|
<p>Once a unit has been commanded, it will be unlocked and will become an Olympus unit, completely abandoning its previuos mission. </p>
|
||||||
|
</>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
@@ -223,9 +203,16 @@ export function Header() {
|
|||||||
tooltip={() => (
|
tooltip={() => (
|
||||||
<OlExpandingTooltip
|
<OlExpandingTooltip
|
||||||
title="Enable/disable audio"
|
title="Enable/disable audio"
|
||||||
content={<><p>If this option is enabled, you will be able to access the radio and audio features of DCS Olympus. </p>
|
content={
|
||||||
<p>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.</p>
|
<>
|
||||||
<p>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. </p></>}
|
<p>If this option is enabled, you will be able to access the radio and audio features of DCS Olympus. </p>
|
||||||
|
<p>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.</p>
|
||||||
|
<p>
|
||||||
|
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.{" "}
|
||||||
|
</p>
|
||||||
|
</>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
icon={faVolumeHigh}
|
icon={faVolumeHigh}
|
||||||
@@ -368,10 +355,6 @@ export function Header() {
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</OlDropdown>
|
</OlDropdown>
|
||||||
<FaQuestionCircle
|
|
||||||
onClick={() => getApp().setState(OlympusState.TRAINING)}
|
|
||||||
className={`cursor-pointer text-2xl text-white`}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
{!scrolledRight && (
|
{!scrolledRight && (
|
||||||
<FaChevronRight
|
<FaChevronRight
|
||||||
|
|||||||
@@ -1,20 +1,9 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Menu } from "./components/menu";
|
import { Menu } from "./components/menu";
|
||||||
import {
|
import { faArrowRightLong, faCheckCircle, faExternalLinkAlt } from "@fortawesome/free-solid-svg-icons";
|
||||||
faArrowRightLong,
|
|
||||||
faCheckCircle,
|
|
||||||
faDatabase,
|
|
||||||
faExternalLink,
|
|
||||||
faExternalLinkAlt,
|
|
||||||
faFile,
|
|
||||||
faFileAlt,
|
|
||||||
faFileExport,
|
|
||||||
faFileImport,
|
|
||||||
faTimesCircle,
|
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { VERSION } from "../../olympusapp";
|
import { getApp, VERSION } from "../../olympusapp";
|
||||||
import { faGithub } from "@fortawesome/free-brands-svg-icons";
|
import { ImportExportSubstate, OlympusState } from "../../constants/constants";
|
||||||
|
|
||||||
export function MainMenu(props: { open: boolean; onClose: () => void; children?: JSX.Element | JSX.Element[] }) {
|
export function MainMenu(props: { open: boolean; onClose: () => void; children?: JSX.Element | JSX.Element[] }) {
|
||||||
return (
|
return (
|
||||||
@@ -46,6 +35,7 @@ export function MainMenu(props: { open: boolean; onClose: () => void; children?:
|
|||||||
dark:hover:bg-olympus-500
|
dark:hover:bg-olympus-500
|
||||||
hover:bg-gray-900/10
|
hover:bg-gray-900/10
|
||||||
`}
|
`}
|
||||||
|
onClick={() => window.open("https://github.com/Pax1601/DCSOlympus")}
|
||||||
>
|
>
|
||||||
{/*<FontAwesomeIcon icon={faGithub} className="my-auto w-4 text-gray-800 dark:text-gray-500" />*/}
|
{/*<FontAwesomeIcon icon={faGithub} className="my-auto w-4 text-gray-800 dark:text-gray-500" />*/}
|
||||||
View GitHub Repo
|
View GitHub Repo
|
||||||
@@ -74,6 +64,7 @@ export function MainMenu(props: { open: boolean; onClose: () => void; children?:
|
|||||||
dark:hover:bg-olympus-500
|
dark:hover:bg-olympus-500
|
||||||
hover:bg-gray-900/10
|
hover:bg-gray-900/10
|
||||||
`}
|
`}
|
||||||
|
onClick={() => window.open("https://github.com/Pax1601/DCSOlympus/wiki")}
|
||||||
>
|
>
|
||||||
{/*<FontAwesomeIcon icon={faFile} className="my-auto w-4 text-gray-800 dark:text-gray-500" />*/}
|
{/*<FontAwesomeIcon icon={faFile} className="my-auto w-4 text-gray-800 dark:text-gray-500" />*/}
|
||||||
View User Guide
|
View User Guide
|
||||||
@@ -101,6 +92,7 @@ export function MainMenu(props: { open: boolean; onClose: () => void; children?:
|
|||||||
dark:border-olympus-500
|
dark:border-olympus-500
|
||||||
`}
|
`}
|
||||||
></hr>
|
></hr>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className={`
|
className={`
|
||||||
group flex cursor-pointer select-none content-center gap-3
|
group flex cursor-pointer select-none content-center gap-3
|
||||||
@@ -108,48 +100,9 @@ export function MainMenu(props: { open: boolean; onClose: () => void; children?:
|
|||||||
dark:hover:bg-olympus-500
|
dark:hover:bg-olympus-500
|
||||||
hover:bg-gray-900/10
|
hover:bg-gray-900/10
|
||||||
`}
|
`}
|
||||||
>
|
onClick={() => {
|
||||||
{/*<FontAwesomeIcon icon={faDatabase} className="my-auto w-4 text-gray-800 dark:text-gray-500" />*/}
|
getApp().setState(OlympusState.IMPORT_EXPORT, ImportExportSubstate.EXPORT);
|
||||||
Open Olympus Manager
|
}}
|
||||||
<div className={`ml-auto flex items-center`}>
|
|
||||||
<FontAwesomeIcon
|
|
||||||
icon={faArrowRightLong}
|
|
||||||
className={`
|
|
||||||
my-auto px-2 text-right text-gray-800 transition-transform
|
|
||||||
dark:text-olympus-50
|
|
||||||
group-hover:translate-x-2
|
|
||||||
`}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className={`
|
|
||||||
group flex cursor-pointer select-none content-center gap-3
|
|
||||||
rounded-md p-2
|
|
||||||
dark:hover:bg-olympus-500
|
|
||||||
hover:bg-gray-900/10
|
|
||||||
`}
|
|
||||||
>
|
|
||||||
{/*<FontAwesomeIcon icon={faDatabase} className="my-auto w-4 text-gray-800 dark:text-gray-500" />*/}
|
|
||||||
Database Manager
|
|
||||||
<div className={`ml-auto flex items-center`}>
|
|
||||||
<FontAwesomeIcon
|
|
||||||
icon={faArrowRightLong}
|
|
||||||
className={`
|
|
||||||
my-auto px-2 text-right text-gray-800 transition-transform
|
|
||||||
dark:text-olympus-50
|
|
||||||
group-hover:translate-x-2
|
|
||||||
`}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className={`
|
|
||||||
group flex cursor-pointer select-none content-center gap-3
|
|
||||||
rounded-md p-2
|
|
||||||
dark:hover:bg-olympus-500
|
|
||||||
hover:bg-gray-900/10
|
|
||||||
`}
|
|
||||||
>
|
>
|
||||||
{/*<FontAwesomeIcon icon={faFileExport} className="my-auto w-4 text-gray-800 dark:text-gray-500" />*/}
|
{/*<FontAwesomeIcon icon={faFileExport} className="my-auto w-4 text-gray-800 dark:text-gray-500" />*/}
|
||||||
Export to file
|
Export to file
|
||||||
@@ -171,6 +124,10 @@ export function MainMenu(props: { open: boolean; onClose: () => void; children?:
|
|||||||
dark:hover:bg-olympus-500
|
dark:hover:bg-olympus-500
|
||||||
hover:bg-gray-900/10
|
hover:bg-gray-900/10
|
||||||
`}
|
`}
|
||||||
|
|
||||||
|
onClick={() => {
|
||||||
|
getApp().setState(OlympusState.IMPORT_EXPORT, ImportExportSubstate.IMPORT);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{/*<FontAwesomeIcon icon={faFileImport} className="my-auto w-4 text-gray-800 dark:text-gray-500" />*/}
|
{/*<FontAwesomeIcon icon={faFileImport} className="my-auto w-4 text-gray-800 dark:text-gray-500" />*/}
|
||||||
Import from file
|
Import from file
|
||||||
@@ -185,33 +142,6 @@ export function MainMenu(props: { open: boolean; onClose: () => void; children?:
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr
|
|
||||||
className={`
|
|
||||||
m-2 my-1 w-auto border-[1px] bg-gray-700
|
|
||||||
dark:border-olympus-500
|
|
||||||
`}
|
|
||||||
></hr>
|
|
||||||
<div
|
|
||||||
className={`
|
|
||||||
group flex cursor-pointer select-none content-center gap-3
|
|
||||||
rounded-md p-2
|
|
||||||
dark:hover:bg-olympus-500
|
|
||||||
hover:bg-gray-900/10
|
|
||||||
`}
|
|
||||||
>
|
|
||||||
{/*<FontAwesomeIcon icon={faTimesCircle} className="my-auto w-4 text-gray-800 dark:text-gray-500" />*/}
|
|
||||||
Close Olympus
|
|
||||||
<div className={`ml-auto flex items-center`}>
|
|
||||||
<FontAwesomeIcon
|
|
||||||
icon={faArrowRightLong}
|
|
||||||
className={`
|
|
||||||
my-auto px-2 text-right text-gray-800 transition-transform
|
|
||||||
dark:text-olympus-50
|
|
||||||
group-hover:translate-x-2
|
|
||||||
`}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</Menu>
|
</Menu>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -101,10 +101,10 @@ export function SideBar() {
|
|||||||
<div className="flex w-16 flex-wrap content-end justify-center p-4">
|
<div className="flex w-16 flex-wrap content-end justify-center p-4">
|
||||||
<div className={`flex flex-col items-center justify-center gap-2.5`}>
|
<div className={`flex flex-col items-center justify-center gap-2.5`}>
|
||||||
<OlStateButton
|
<OlStateButton
|
||||||
onClick={() => window.open("https://github.com/Pax1601/DCSOlympus/wiki")}
|
onClick={() => getApp().setState(OlympusState.TRAINING)}
|
||||||
checked={false}
|
checked={false}
|
||||||
icon={faQuestionCircle}
|
icon={faQuestionCircle}
|
||||||
tooltip="Open user guide on separate window"
|
tooltip="Open Quick Start Guide"
|
||||||
tooltipPosition="side"
|
tooltipPosition="side"
|
||||||
></OlStateButton>
|
></OlStateButton>
|
||||||
<OlStateButton
|
<OlStateButton
|
||||||
|
|||||||
Reference in New Issue
Block a user