// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 import React from "react"; import { Dialog, DialogTitle, DialogContent, DialogActions, Button } from "@mui/material"; import { WithDialogProps } from "store/dialog/with-dialog"; import { withDialog } from 'store/dialog/with-dialog'; import { DefaultCodeSnippet } from 'components/default-code-snippet/default-code-snippet'; import { CustomStyleRulesCallback } from 'common/custom-theme'; import { WithStyles } from '@mui/styles'; import withStyles from '@mui/styles/withStyles'; import { ArvadosTheme } from 'common/custom-theme'; import { compose } from "redux"; import { API_CLIENT_AUTHORIZATION_HELP_DIALOG } from 'store/api-client-authorizations/api-client-authorizations-actions'; type CssRules = 'codeSnippet'; const styles: CustomStyleRulesCallback = (theme: ArvadosTheme) => ({ codeSnippet: { borderRadius: theme.spacing(0.5), border: `1px solid ${theme.palette.grey["400"]}`, '& pre': { fontSize: '0.815rem' } } }); interface HelpApiClientAuthorizationDataProps { apiHost: string; apiToken: string; email: string; } export const HelpApiClientAuthorizationDialog = compose( withDialog(API_CLIENT_AUTHORIZATION_HELP_DIALOG), withStyles(styles))( (props: WithDialogProps & WithStyles) => HELP: {/* // lines={snippetText2(props.data)} /> */} ); const snippetText = (data: HelpApiClientAuthorizationDataProps) => `### Pasting the following lines at a shell prompt will allow Arvados SDKs ### to authenticate to your account, ${data.email} read ARVADOS_API_TOKEN <