[ARVADOS-WORKBENCH2] updated: 1.2.0-698-g265921d
Git user
git at public.curoverse.com
Tue Oct 23 03:51:46 EDT 2018
Summary of changes:
.../warning-collection/warning-collection.tsx | 30 ++++++++++++++++++++++
.../dialog-collection-files-upload.tsx | 10 ++------
.../rename-file-dialog/rename-file-dialog.tsx | 8 ++----
3 files changed, 34 insertions(+), 14 deletions(-)
create mode 100644 src/components/warning-collection/warning-collection.tsx
via 265921df601d0afb86e5634b7029dd89ab63db58 (commit)
from 1e3a5c5fde6ccbd893cdf654076c67ab5b0eaed3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 265921df601d0afb86e5634b7029dd89ab63db58
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date: Tue Oct 23 09:51:32 2018 +0200
cr change
Feature #14363
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
diff --git a/src/components/warning-collection/warning-collection.tsx b/src/components/warning-collection/warning-collection.tsx
new file mode 100644
index 0000000..59efc78
--- /dev/null
+++ b/src/components/warning-collection/warning-collection.tsx
@@ -0,0 +1,30 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import * as React from "react";
+import { WarningIcon } from "~/components/icon/icon";
+import { StyleRulesCallback, DialogContentText, WithStyles, withStyles } from "@material-ui/core";
+import { ArvadosTheme } from '~/common/custom-theme';
+
+type CssRules = 'container' | 'text';
+
+const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
+ container: {
+ display: 'flex',
+ alignItems: 'center',
+ },
+ text: {
+ paddingLeft: '8px'
+ }
+});
+
+interface WarningCollectionProps {
+ text: string;
+}
+
+export const WarningCollection = withStyles(styles)(({ classes, text }: WarningCollectionProps & WithStyles<CssRules>) =>
+ <span className={classes.container}>
+ <WarningIcon />
+ <DialogContentText className={classes.text}>{text}</DialogContentText>
+ </span>);
\ No newline at end of file
diff --git a/src/views-components/dialog-upload/dialog-collection-files-upload.tsx b/src/views-components/dialog-upload/dialog-collection-files-upload.tsx
index 7be3baf..1c062d5 100644
--- a/src/views-components/dialog-upload/dialog-collection-files-upload.tsx
+++ b/src/views-components/dialog-upload/dialog-collection-files-upload.tsx
@@ -9,9 +9,7 @@ import { CollectionCreateFormDialogData } from '~/store/collections/collection-c
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';
-
+import { WarningCollection } from '~/components/warning-collection/warning-collection';
type DialogCollectionFilesUploadProps = WithDialogProps<{}> & InjectedFormProps<CollectionCreateFormDialogData>;
@@ -28,13 +26,9 @@ const UploadCollectionFilesFields = () => <>
name='files'
validate={FILES_FIELD_VALIDATION}
component={FileUploaderField} />
- <span style={{ display: 'flex', alignItems: 'center', marginTop: '8px' }}>
- <WarningIcon />
- <DialogContentText style={{ paddingLeft: '8px' }}>Uploading new files will change content address.</DialogContentText>
- </span>
+ <WarningCollection text="Uploading new files will change content address." />
</>;
-
const FILES_FIELD_VALIDATION = [require];
diff --git a/src/views-components/rename-file-dialog/rename-file-dialog.tsx b/src/views-components/rename-file-dialog/rename-file-dialog.tsx
index 27f74b7..0abdb5d 100644
--- a/src/views-components/rename-file-dialog/rename-file-dialog.tsx
+++ b/src/views-components/rename-file-dialog/rename-file-dialog.tsx
@@ -10,7 +10,7 @@ import { FormDialog } from '~/components/form-dialog/form-dialog';
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";
+import { WarningCollection } from '~/components/warning-collection/warning-collection';
export const RenameFileDialog = compose(
withDialog(RENAME_FILE_DIALOG),
@@ -36,9 +36,5 @@ const RenameDialogFormFields = (props: WithDialogProps<RenameFileDialogData>) =>
name='name'
component={TextField}
/>
- <span style={{ display: 'flex', alignItems: 'center' }}>
- <WarningIcon />
- <DialogContentText style={{ paddingLeft: '8px' }}>Renaming a file will change content adress.</DialogContentText>
- </span>
-
+ <WarningCollection text="Renaming a file will change content adress." />
</>;
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list