|
@@ -1,5 +1,6 @@
|
|
|
import * as React from "react";
|
|
|
import { Breadcrumb, ContextualMenuItemType, DefaultPalette, FontSizes, IBreadcrumbItem, IBreadcrumbStyleProps, IBreadcrumbStyles, IconButton, IContextualMenuProps, IIconProps, Image, IStyleFunctionOrObject, Link, SearchBox, Stack, Toggle } from "@fluentui/react";
|
|
|
+import { About } from "./About";
|
|
|
|
|
|
import nlsHPCC from "src/nlsHPCC";
|
|
|
|
|
@@ -7,6 +8,8 @@ const breadCrumbStyles: IStyleFunctionOrObject<IBreadcrumbStyleProps, IBreadcrum
|
|
|
itemLink: { fontSize: FontSizes.size10, lineHeight: 14, paddingLeft: 2, paddingRight: 2 },
|
|
|
};
|
|
|
|
|
|
+const collapseMenuIcon: IIconProps = { iconName: "CollapseMenu" };
|
|
|
+
|
|
|
interface DevTitleProps {
|
|
|
paths: string[],
|
|
|
useDarkMode: boolean,
|
|
@@ -19,6 +22,8 @@ export const DevTitle: React.FunctionComponent<DevTitleProps> = ({
|
|
|
setUseDarkMode
|
|
|
}) => {
|
|
|
|
|
|
+ const [showAbout, setShowAbout] = React.useState(false);
|
|
|
+
|
|
|
let fullPath = "#";
|
|
|
const itemsWithHref = [{ text: "HOME", key: "home", href: "#/" },
|
|
|
...paths.filter(path => !!path).map((path, idx) => {
|
|
@@ -37,25 +42,27 @@ export const DevTitle: React.FunctionComponent<DevTitleProps> = ({
|
|
|
{ key: "docs", href: "https://hpccsystems.com/training/documentation/", text: nlsHPCC.Documentation, target: "_blank" },
|
|
|
{ key: "downloads", href: "https://hpccsystems.com/download", text: nlsHPCC.Downloads, target: "_blank" },
|
|
|
{ key: "releaseNotes", href: "https://hpccsystems.com/download/release-notes", text: nlsHPCC.ReleaseNotes, target: "_blank" },
|
|
|
- { key: "additionalResources", text: nlsHPCC.AdditionalResources, subMenuProps: {
|
|
|
- items: [
|
|
|
- { key: "redBook", href: "https://wiki.hpccsystems.com/display/hpcc/HPCC+Systems+Red+Book", text: nlsHPCC.RedBook, target: "_blank" },
|
|
|
- { key: "forums", href: "https://hpccsystems.com/bb/", text: nlsHPCC.Forums, target: "_blank" },
|
|
|
- { key: "issues", href: "https://track.hpccsystems.com/issues/", text: nlsHPCC.IssueReporting, target: "_blank" },
|
|
|
- ]
|
|
|
- }},
|
|
|
+ {
|
|
|
+ key: "additionalResources", text: nlsHPCC.AdditionalResources, subMenuProps: {
|
|
|
+ items: [
|
|
|
+ { key: "redBook", href: "https://wiki.hpccsystems.com/display/hpcc/HPCC+Systems+Red+Book", text: nlsHPCC.RedBook, target: "_blank" },
|
|
|
+ { key: "forums", href: "https://hpccsystems.com/bb/", text: nlsHPCC.Forums, target: "_blank" },
|
|
|
+ { key: "issues", href: "https://track.hpccsystems.com/issues/", text: nlsHPCC.IssueReporting, target: "_blank" },
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
{ key: "divider_3", itemType: ContextualMenuItemType.Divider },
|
|
|
{ key: "lock", text: nlsHPCC.Lock },
|
|
|
{ key: "logout", text: nlsHPCC.Logout },
|
|
|
{ key: "divider_4", itemType: ContextualMenuItemType.Divider },
|
|
|
+ { key: "legacy", text: nlsHPCC.OpenLegacyECLWatch, href: "/esp/files/stub.htm" },
|
|
|
+ { key: "divider_5", itemType: ContextualMenuItemType.Divider },
|
|
|
{ key: "config", text: nlsHPCC.Configuration },
|
|
|
- { key: "about", text: nlsHPCC.About },
|
|
|
+ { key: "about", text: nlsHPCC.About, onClick: () => setShowAbout(true) }
|
|
|
],
|
|
|
directionalHintFixed: true
|
|
|
};
|
|
|
|
|
|
- const advMenuIconProps: IIconProps = { iconName: "ContextMenu" };
|
|
|
-
|
|
|
return <>
|
|
|
<Stack tokens={{ padding: 9, childrenGap: 9 }} >
|
|
|
<Stack horizontal disableShrink horizontalAlign="space-between">
|
|
@@ -72,7 +79,6 @@ export const DevTitle: React.FunctionComponent<DevTitleProps> = ({
|
|
|
</Stack>
|
|
|
<Stack horizontal tokens={{ childrenGap: 18 }} >
|
|
|
<Stack.Item align="center">
|
|
|
- <Link href="/esp/files/stub.htm">Legacy ECL Watch</Link>
|
|
|
<Toggle
|
|
|
label="Change themes"
|
|
|
onText="Dark Mode"
|
|
@@ -80,13 +86,14 @@ export const DevTitle: React.FunctionComponent<DevTitleProps> = ({
|
|
|
onChange={() => setUseDarkMode(!useDarkMode)}
|
|
|
/>
|
|
|
</Stack.Item>
|
|
|
- <Stack.Item>
|
|
|
- <IconButton title="Advanced" ariaLabel="Advanced" menuProps={ advMenuProps } iconProps={ advMenuIconProps } />
|
|
|
+ <Stack.Item align="center">
|
|
|
+ <IconButton title={nlsHPCC.Advanced} iconProps={collapseMenuIcon} menuProps={advMenuProps} />
|
|
|
</Stack.Item>
|
|
|
</Stack>
|
|
|
</Stack>
|
|
|
</Stack>
|
|
|
<Stack horizontal styles={{ root: { background: DefaultPalette.themeLighter } }} >
|
|
|
</Stack>
|
|
|
+ <About show={showAbout} onClose={() => setShowAbout(false)} ></About>
|
|
|
</>;
|
|
|
};
|