Skip to content

Commit

Permalink
Added donation button
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian committed Feb 5, 2020
1 parent ade30bf commit b6e6c2c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Nice JSON-Data formatting
- Custom AES-Ecryption
- Communication-Protocoll
- Protocoll Presets - Till now hardcoded available: [Crescience Deneb](https://cre.science) and [RTOC](https://haschtl.github.io/RealTimeOpenControl/)

## Example Ionic4 React project
This app can be seen as an Ionic4 React example, that can be deployed on all available platforms with the following features:
Expand Down
2 changes: 2 additions & 0 deletions src/locales/de/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"Connect": "Verbinden",
"Disconnect": "Trennen",
"Commands": "Befehle",
"Compatible Tools": "Weitere Tools",
"Disconnected": "Verbindung getrennt",
"Donate": "Spenden",
"Connected": "Verbindung hergestellt",
"Message from ":"Nachricht von ",
"Remove": "Entfernen",
Expand Down
14 changes: 10 additions & 4 deletions src/pages/AboutPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,21 @@ class AboutPage extends PureComponent<Props & WithTranslation> {
<IonButton expand="full" fill="solid" color="secondary" onClick={this.share}>
<Trans>Share</Trans>
</IonButton>
<IonButton expand="full" fill="solid" color="secondary" onClick={() => Browser.open({ url: 'https://haschtl.github.io/ModernWebsocketClient/' })}>
<IonButton expand="full" fill="solid" color="danger" onClick={() => Browser.open({ url: 'https://www.paypal.com/donate/?token=ECCLajboRrJcPTW0AvKLtiw114LrXmBEpAy0y3AWQEZfz0u2ZXFbN63lxjFceNOSqu2YQW&country.x=DE&locale.x=DE' })}>
<Trans>Donate</Trans>
</IonButton>
<IonButton expand="full" fill="solid" color="tertiary" onClick={() => Browser.open({ url: 'https://haschtl.github.io/ModernWebsocketClient/' })}>
<Trans>Github Page</Trans>
</IonButton>
<IonButton expand="full" fill="solid" color="secondary" onClick={() => this.exportConnections()}>
<IonButton expand="full" fill="solid" color="tertiary" onClick={() => Browser.open({ url: 'https://haschtl.github.io/RealTimeOpenControl/' })}>
<Trans>Compatible Tools</Trans>
</IonButton>
<IonButton expand="full" fill="solid" color="primary" onClick={() => this.exportConnections()}>
<Trans>Export App settings</Trans>
</IonButton>
<IonButton expand="full" fill="solid" color="secondary" onClick={() => this.importConnections()}>
<IonButton expand="full" fill="solid" color="primary" onClick={() => this.importConnections()}>
<Trans>Import App settings</Trans>
</IonButton>
</IonButton>
</IonContent>
</IonPage>
);
Expand Down
6 changes: 4 additions & 2 deletions src/store/connections/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ export default (state = connectionDefaultState, action: ActionType<typeof connec
action.payload.id = newId

state.connections.push(action.payload)
return state;
return {...state,
connections: [...state.connections]};;
case getType(connections.removeConnection):
con = state.connections.find(e => e.id === action.payload.id);
if (con === undefined) {
console.error('Failed')
return state;
}
state.connections.splice(state.connections.indexOf(con), 1)
return state;
return {...state,
connections: [...state.connections]};
case getType(connections.editConnection):
con = state.connections.find(e => e.id === action.payload.id);
if (con === undefined) {
Expand Down

0 comments on commit b6e6c2c

Please sign in to comment.