1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from "react";
6 import { AppBar, Toolbar, Typography, Grid } from "@material-ui/core";
7 import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
8 import { Link } from "react-router-dom";
9 import { User } from "~/models/user";
10 import { SearchBar } from "~/components/search-bar/search-bar";
11 import { Routes } from '~/routes/routes';
12 import { NotificationsMenu } from "~/views-components/main-app-bar/notifications-menu";
13 import { AccountMenu } from "~/views-components/main-app-bar/account-menu";
14 import { AnonymousMenu } from "~/views-components/main-app-bar/anonymous-menu";
15 import { HelpMenu } from './help-menu';
16 import { ReactNode } from "react";
18 type CssRules = 'toolbar' | 'link';
20 const styles: StyleRulesCallback<CssRules> = () => ({
22 textDecoration: 'none',
30 interface MainAppBarDataProps {
31 // searchText: string;
32 // searchDebounce?: number;
38 // export interface MainAppBarActionProps {
39 // onSearch: (searchText: string) => void;
42 export type MainAppBarProps = MainAppBarDataProps & WithStyles<CssRules>;
44 export const MainAppBar = withStyles(styles)(
45 (props: MainAppBarProps) => {
46 return <AppBar position="absolute">
47 <Toolbar className={props.classes.toolbar}>
48 <Grid container justify="space-between">
49 <Grid container item xs={3} direction="column" justify="center">
50 <Typography variant="title" color="inherit" noWrap>
51 <Link to={Routes.ROOT} className={props.classes.link}>
55 <Typography variant="caption" color="inherit">{props.buildInfo}</Typography>
62 {/* {props.user && <SearchBar
63 value={props.searchText}
64 onSearch={props.onSearch}
65 debounce={props.searchDebounce}