Skip to content
Snippets Groups Projects
Select Git revision
  • 77374373830f1cda2e64408f09defbab915da111
  • annotation-on-video default protected
  • demo_ci
  • 3-upstream-01022023
  • master
  • gh3538-captions
  • 16-adapt-for-images-annot
  • 15-api-for-annotations-on-video
  • 15-annotations-on-videos
  • video_for_annotations
  • wip-1-annotations-on-videos
  • 9-videoviewer-tests
  • 9_wip_videotests
  • 6-fix-tests-and-ci
  • _fix_ci
  • wip-webpack-from-git
16 results

WindowAuthenticationBar.js

Blame
  • WindowAuthenticationBar.js 1.69 KiB
    import { compose } from 'redux';
    import { withTranslation } from 'react-i18next';
    import { withStyles } from '@material-ui/core/styles';
    import { alpha } from '@material-ui/core/styles/colorManipulator';
    import { withPlugins } from '../extend/withPlugins';
    import { WindowAuthenticationBar } from '../components/WindowAuthenticationBar';
    
    /**
     * @param theme
     * @returns {{typographyBody: {flexGrow: number, fontSize: number|string},
     * windowTopBarStyle: {minHeight: number, paddingLeft: number, backgroundColor: string}}}
     */
    const styles = theme => ({
      buttonInvert: {
        '&:hover': {
          backgroundColor: alpha(
            theme.palette.secondary.contrastText, 1 - theme.palette.action.hoverOpacity,
          ),
        },
        backgroundColor: theme.palette.secondary.contrastText,
        marginLeft: theme.spacing(5),
        paddingBottom: 0,
        paddingTop: 0,
      },
      expanded: {
        paddingLeft: theme.spacing(),
        paddingRight: theme.spacing(),
      },
      failure: {
        backgroundColor: theme.palette.error.dark,
      },
      fauxButton: {
        marginLeft: theme.spacing(2.5),
      },
      icon: {
        marginRight: theme.spacing(1.5),
        verticalAlign: 'text-bottom',
      },
      label: {
        lineHeight: 2.25,
      },
      paper: {
        backgroundColor: theme.palette.secondary.main,
        color: theme.palette.secondary.contrastText,
        cursor: 'pointer',
      },
      topBar: {
        '&:hover': {
          backgroundColor: theme.palette.secondary.main,
        },
        alignItems: 'center',
        display: 'flex',
        justifyContent: 'inherit',
        padding: theme.spacing(1),
        textTransform: 'none',
      },
    });
    
    const enhance = compose(
      withTranslation(),
      withStyles(styles),
      withPlugins('WindowAuthenticationBar'),
    );
    
    export default enhance(WindowAuthenticationBar);