import * as React from "react";
import { Dialog, DialogTitle, DialogContent, DialogActions, Button, DialogContentText } from "@material-ui/core";
import { WithDialogProps } from "~/store/dialog/with-dialog";
+import { WarningIcon } from '~/components/icon/icon';
export interface ConfirmationDialogDataProps {
title: string;
export const ConfirmationDialog = (props: ConfirmationDialogProps & WithDialogProps<ConfirmationDialogDataProps>) =>
<Dialog open={props.open}>
<DialogTitle>{props.data.title}</DialogTitle>
- <DialogContent>
- <DialogContentText>
+ <DialogContent style={{ display: 'flex', alignItems: 'center' }}>
+ <WarningIcon />
+ <DialogContentText style={{ paddingLeft: '8px' }}>
{props.data.text}
+ <br />
+ {props.data.title === 'Removing file' ? 'Removing a file will change content adress.' : 'Removing files will change content adress.'}
</DialogContentText>
</DialogContent>
<DialogActions>
import SettingsEthernet from '@material-ui/icons/SettingsEthernet';
import Star from '@material-ui/icons/Star';
import StarBorder from '@material-ui/icons/StarBorder';
+import Warning from '@material-ui/icons/Warning';
export type IconType = React.SFC<{ className?: string }>;
export const UserPanelIcon: IconType = (props) => <Person {...props} />;
export const UsedByIcon: IconType = (props) => <Folder {...props} />;
export const WorkflowIcon: IconType = (props) => <Code {...props} />;
+export const WarningIcon: IconType = (props) => <Warning style={{ color: '#fbc02d', height: '30px', width: '30px' }} {...props} />;
import { FormDialog } from '~/components/form-dialog/form-dialog';
import { require } from '~/validators/require';
import { FileUploaderField } from '~/views-components/file-uploader/file-uploader';
+import { WarningIcon } from '~/components/icon/icon';
+import { DialogContentText } from '@material-ui/core';
type DialogCollectionFilesUploadProps = WithDialogProps<{}> & InjectedFormProps<CollectionCreateFormDialogData>;
{...props}
/>;
-const UploadCollectionFilesFields = () =>
+const UploadCollectionFilesFields = () => <>
<Field
name='files'
validate={FILES_FIELD_VALIDATION}
- component={FileUploaderField} />;
+ component={FileUploaderField} />
+ <span style={{ display: 'flex', alignItems: 'center', marginTop: '8px' }}>
+ <WarningIcon />
+ <DialogContentText style={{ paddingLeft: '8px' }}>Uploading new files will change content address.</DialogContentText>
+ </span>
+</>;
+
const FILES_FIELD_VALIDATION = [require];
import { DialogContentText } from '@material-ui/core';
import { TextField } from '~/components/text-field/text-field';
import { RENAME_FILE_DIALOG, RenameFileDialogData, renameFile } from '~/store/collection-panel/collection-panel-files/collection-panel-files-actions';
+import { WarningIcon } from "~/components/icon/icon";
export const RenameFileDialog = compose(
withDialog(RENAME_FILE_DIALOG),
name='name'
component={TextField}
/>
+ <span style={{ display: 'flex', alignItems: 'center' }}>
+ <WarningIcon />
+ <DialogContentText style={{ paddingLeft: '8px' }}>Renaming a file will change content adress.</DialogContentText>
+ </span>
+
</>;