Skip to content

Commit

Permalink
Merge pull request #212 from HPI-Information-Systems/develop
Browse files Browse the repository at this point in the history
Release v3.2.1
  • Loading branch information
phpfs authored Jul 21, 2021
2 parents a74be86 + 0c5d377 commit ce12bcf
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "snowman-app",
"author": "Snowman Team",
"description": "Compare data matching algorithms with each other",
"version": "3.1.0",
"version": "3.2.1",
"license": "MIT",
"homepage": "./",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
import { IonSpinner } from '@ionic/react';
import { IonIcon, IonSpinner } from '@ionic/react';
import { ActivityIndicatorProps } from 'apps/SnowmanApp/components/ActivityIndicator/ActivityIndicatorProps';
import styles from 'apps/SnowmanApp/components/ActivityIndicator/ActivityIndicatorStyles.module.css';
import { refreshOutline } from 'ionicons/icons';
import React from 'react';

const ActivityIndicatorView = ({
existsActiveRequest,
triggerRefresh,
}: ActivityIndicatorProps): JSX.Element => (
<>
{existsActiveRequest ? (
<IonSpinner className={styles.spinnerWhite} />
) : null}
) : (
<IonIcon
icon={refreshOutline}
slot="icon-only"
size="large"
className={styles.buttonWhite}
onClick={triggerRefresh}
/>
)}
</>
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import ActivityIndicatorView from 'apps/SnowmanApp/components/ActivityIndicator/ActivityIndicator.View';
import { ActivityIndicatorStateProps } from 'apps/SnowmanApp/components/ActivityIndicator/ActivityIndicatorProps';
import {
ActivityIndicatorDispatchProps,
ActivityIndicatorStateProps,
} from 'apps/SnowmanApp/components/ActivityIndicator/ActivityIndicatorProps';
import { refreshCentralResources } from 'apps/SnowmanApp/store/CentralResourcesActions';
import { SnowmanAppMagistrate } from 'apps/SnowmanApp/store/SnowmanAppStore';
import { SnowmanAppModel } from 'apps/SnowmanApp/types/SnowmanAppModel';
import { connect } from 'react-redux';
import { SnowmanDispatch } from 'types/SnowmanDispatch';
import GenericStoreComponentFactory from 'utils/GenericStoreComponentFactory';

const mapStateToProps = (
Expand All @@ -11,9 +16,15 @@ const mapStateToProps = (
existsActiveRequest: state.ActionLogicStore.ongoingRequestsCount > 0,
});

const mapDispatchToProps = (
dispatch: SnowmanDispatch<SnowmanAppModel>
): ActivityIndicatorDispatchProps => ({
triggerRefresh: () => dispatch(refreshCentralResources()),
});

export const ActivityIndicator = GenericStoreComponentFactory(
SnowmanAppMagistrate,
connect(mapStateToProps)(ActivityIndicatorView)
connect(mapStateToProps, mapDispatchToProps)(ActivityIndicatorView)
);

export default ActivityIndicator;
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ export interface ActivityIndicatorStateProps {
existsActiveRequest: boolean;
}

export type ActivityIndicatorProps = ActivityIndicatorStateProps;
export interface ActivityIndicatorDispatchProps {
triggerRefresh: () => void;
}

export type ActivityIndicatorProps = ActivityIndicatorStateProps &
ActivityIndicatorDispatchProps;
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.spinnerWhite {
color: #fff !important;
}

.buttonWhite {
color: #fff !important;
cursor: pointer;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "snowman",
"author": "Snowman Team",
"description": "Compare data matching algorithms with each other",
"version": "3.1.0",
"version": "3.2.1",
"license": "MIT",
"repository": "https://github.com/HPI-Information-Systems/snowman",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion wrapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "snowman-wrapper",
"author": "Snowman Team",
"description": "Compare data matching algorithms with each other",
"version": "3.1.0",
"version": "3.2.1",
"license": "MIT",
"main": "dist/main.js",
"scripts": {
Expand Down

0 comments on commit ce12bcf

Please sign in to comment.