import { ConnectedRouter } from "react-router-redux";
import { ApiToken } from "~/views-components/api-token/api-token";
import { initAuth } from "~/store/auth/auth-action";
-import { configActions } from "~/store/config/config-action";
import { createServices } from "~/services/services";
import { MuiThemeProvider } from '@material-ui/core/styles';
import { CustomTheme } from '~/common/custom-theme';
import { setCurrentTokenDialogApiHost } from '~/store/current-token-dialog/current-token-dialog-actions';
import { processResourceActionSet } from '~/views-components/context-menu/action-sets/process-resource-action-set';
import { progressIndicatorActions } from '~/store/progress-indicator/progress-indicator-actions';
-import { setUuidPrefix } from '~/store/workflow-panel/workflow-panel-actions';
import { trashedCollectionActionSet } from '~/views-components/context-menu/action-sets/trashed-collection-action-set';
import { ContainerRequestState } from '~/models/container-request';
import { MountKind } from '~/models/mount-types';
import { collectionAdminActionSet } from '~/views-components/context-menu/action-sets/collection-admin-action-set';
import { processResourceAdminActionSet } from '~/views-components/context-menu/action-sets/process-resource-admin-action-set';
import { projectAdminActionSet } from '~/views-components/context-menu/action-sets/project-admin-action-set';
-import { ACCOUNT_LINK_STATUS_KEY } from '~/services/link-account-service/link-account-service';
-import { cancelLinking } from '~/store/link-account-panel/link-account-panel-actions';
-import { matchTokenRoute } from '~/routes/routes';
console.log(`Starting arvados [${getBuildInfo()}]`);
});
const store = configureStore(history, services);
- // Cancel any link account ops in progess unless the user has
- // just logged in or there has been a successful link operation
- const data = sessionStorage.getItem(ACCOUNT_LINK_STATUS_KEY);
- if (!matchTokenRoute(history.location.pathname) && data === null) {
- store.dispatch<any>(cancelLinking());
- }
-
store.subscribe(initListener(history, store, services, config));
store.dispatch(initAuth(config));
store.dispatch(setBuildInfo());
store.dispatch(loadVocabulary);
store.dispatch(loadFileViewersConfig);
- const TokenComponent = (props: any) => <ApiToken authService={services.authService} config={config} {...props} />;
+ const TokenComponent = (props: any) => <ApiToken authService={services.authService} config={config} loadMainApp={true} {...props} />;
+ const FedTokenComponent = (props: any) => <ApiToken authService={services.authService} config={config} loadMainApp={false} {...props} />;
const MainPanelComponent = (props: any) => <MainPanel {...props} />;
const App = () =>
<ConnectedRouter history={history}>
<Switch>
<Route path={Routes.TOKEN} component={TokenComponent} />
+ <Route path={Routes.FED_LOGIN} component={FedTokenComponent} />
<Route path={Routes.ROOT} component={MainPanelComponent} />
</Switch>
</ConnectedRouter>