//
// SPDX-License-Identifier: AGPL-3.0
-import Axios from "../../node_modules/axios";
+import Axios from "axios";
export const CONFIG_URL = process.env.REACT_APP_ARVADOS_CONFIG_URL || "/config.json";
import * as React from 'react';
import { WrappedFieldProps } from 'redux-form';
import { ArvadosTheme } from '../../common/custom-theme';
-import { TextField as MaterialTextField, StyleRulesCallback, WithStyles, withStyles } from '../../../node_modules/@material-ui/core';
+import { TextField as MaterialTextField, StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core';
type CssRules = 'textField';
// SPDX-License-Identifier: AGPL-3.0
import { User } from "../../models/user";
-import { AxiosInstance } from "../../../node_modules/axios";
+import { AxiosInstance } from "axios";
export const API_TOKEN_KEY = 'apiToken';
export const USER_EMAIL_KEY = 'userEmail';
//
// SPDX-License-Identifier: AGPL-3.0
+import { reset } from "redux-form";
+
import { ContextMenuActionSet } from "../context-menu-action-set";
import { projectActions } from "../../../store/project/project-action";
import { NewProjectIcon } from "../../../components/icon/icon";
import { ToggleFavoriteAction } from "../actions/favorite-action";
import { toggleFavorite } from "../../../store/favorites/favorites-actions";
import { favoritePanelActions } from "../../../store/favorite-panel/favorite-panel-action";
+import { PROJECT_CREATE_DIALOG } from "../../dialog-create/dialog-project-create";
export const projectActionSet: ContextMenuActionSet = [[{
icon: NewProjectIcon,
name: "New project",
execute: (dispatch, resource) => {
+ dispatch(reset(PROJECT_CREATE_DIALOG));
dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid }));
}
}, {
//
// SPDX-License-Identifier: AGPL-3.0
+import { reset } from "redux-form";
+
import { ContextMenuActionSet } from "../context-menu-action-set";
import { projectActions } from "../../../store/project/project-action";
import { NewProjectIcon } from "../../../components/icon/icon";
+import { PROJECT_CREATE_DIALOG } from "../../dialog-create/dialog-project-create";
export const rootProjectActionSet: ContextMenuActionSet = [[{
icon: NewProjectIcon,
name: "New project",
execute: (dispatch, resource) => {
+ dispatch(reset(PROJECT_CREATE_DIALOG));
dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid }));
}
}]];
files: UploadFile[];
}
+export const COLLECTION_CREATE_DIALOG = "collectionCreateDialog";
+
export const DialogCollectionCreate = compose(
connect((state: RootState) => ({
files: state.collections.uploader
})),
- reduxForm({ form: 'collectionCreateDialog' }),
+ reduxForm({ form: COLLECTION_CREATE_DIALOG }),
withStyles(styles))(
class DialogCollectionCreate extends React.Component<DialogCollectionCreateProps & DispatchProp & WithStyles<CssRules>> {
render() {
pristine: boolean;
}
+export const PROJECT_CREATE_DIALOG = "projectCreateDialog";
+
export const DialogProjectCreate = compose(
- reduxForm({ form: 'projectCreateDialog' }),
+ reduxForm({ form: PROJECT_CREATE_DIALOG }),
withStyles(styles))(
class DialogProjectCreate extends React.Component<DialogProjectProps & WithStyles<CssRules>> {
render() {
import { reduxForm, Field } from 'redux-form';
import { compose } from 'redux';
import { ArvadosTheme } from '../../common/custom-theme';
-import { Dialog, DialogActions, DialogContent, DialogTitle, TextField, StyleRulesCallback, withStyles, WithStyles, Button, CircularProgress } from '../../../node_modules/@material-ui/core';
+import { Dialog, DialogActions, DialogContent, DialogTitle, TextField, StyleRulesCallback, withStyles, WithStyles, Button, CircularProgress } from '@material-ui/core';
import { COLLECTION_NAME_VALIDATION, COLLECTION_DESCRIPTION_VALIDATION } from '../../validators/create-collection/create-collection-validator';
import { COLLECTION_FORM_NAME } from '../../store/collections/updater/collection-updater-action';
import { MainAppBar, MainAppBarActionProps, MainAppBarMenuItem } from '../../views-components/main-app-bar/main-app-bar';
import { Breadcrumb } from '../../components/breadcrumbs/breadcrumbs';
import { push } from 'react-router-redux';
+import { reset } from 'redux-form';
import { ProjectTree } from '../../views-components/project-tree/project-tree';
import { TreeItem } from "../../components/tree/tree";
import { getTreePath } from '../../store/project/project-reducer';
import { FileRemoveDialog } from '../../views-components/file-remove-dialog/file-remove-dialog';
import { MultipleFilesRemoveDialog } from '../../views-components/file-remove-dialog/multiple-files-remove-dialog';
import { DialogCollectionCreateWithSelectedFile } from '../../views-components/create-collection-dialog-with-selected/create-collection-dialog-with-selected';
+import { COLLECTION_CREATE_DIALOG } from '../../views-components/dialog-create/dialog-collection-create';
+import { PROJECT_CREATE_DIALOG } from '../../views-components/dialog-create/dialog-project-create';
const DRAWER_WITDH = 240;
const APP_BAR_HEIGHT = 100;
}
handleProjectCreationDialogOpen = (itemUuid: string) => {
+ this.props.dispatch(reset(PROJECT_CREATE_DIALOG));
this.props.dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: itemUuid }));
}
handleCollectionCreationDialogOpen = (itemUuid: string) => {
+ this.props.dispatch(reset(COLLECTION_CREATE_DIALOG));
this.props.dispatch(collectionCreateActions.OPEN_COLLECTION_CREATOR({ ownerUuid: itemUuid }));
}