// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; import { StyleRulesCallback, WithStyles, withStyles, Card, CardContent, Button, Typography, Grid, } from '@material-ui/core'; import { ArvadosTheme } from '~/common/custom-theme'; import { User } from "~/models/user"; import { LinkAccountType } from "~/models/link-account"; import { formatDate }from "~/common/formatters"; type CssRules = 'root';// | 'gridItem' | 'label' | 'title' | 'actions'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ root: { width: '100%', overflow: 'auto' } }); export interface LinkAccountPanelRootDataProps { user?: User; } export interface LinkAccountPanelRootActionProps { saveAccountLinkData: (type: LinkAccountType) => void; } type LinkAccountPanelRootProps = LinkAccountPanelRootDataProps & LinkAccountPanelRootActionProps & WithStyles; export const LinkAccountPanelRoot = withStyles(styles) ( ({classes, user, saveAccountLinkData}: LinkAccountPanelRootProps) => { return { user && You are currently logged in as {user.email} ({user.username}, {user.uuid}) created on {formatDate(user.createdAt)} You can link Arvados accounts. After linking, either login will take you to the same account. } ; });