-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
715bef5
commit a90a0d8
Showing
7 changed files
with
137 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<widget id="com.cymbit.paras" version="0.1.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | ||
<widget id="com.cymbit.paras" version="0.2.1" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | ||
<name>ASP NYC</name> | ||
<description>Get updates on alternate street parking rules & schedules with NYC parking app.</description> | ||
<author email="[email protected]" href="http://braxtondiggs.com/">Braxton Diggs</author> | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ import { omitBy, isNil } from 'lodash-es'; | |
import { distinctUntilChanged, take } from 'rxjs/operators'; | ||
import { AlertController, IonDatetime, LoadingController, ToastController } from '@ionic/angular'; | ||
import { LaunchReview } from '@ionic-native/launch-review/ngx'; | ||
import { InAppPurchase2 } from '@ionic-native/in-app-purchase-2/ngx'; | ||
import { EmailComposer } from '@ionic-native/email-composer/ngx'; | ||
@Component({ | ||
selector: 'app-settings', | ||
templateUrl: './settings.page.html', | ||
|
@@ -25,9 +27,11 @@ export class SettingsPage implements OnInit { | |
private alert: AlertController, | ||
private auth: AuthService, | ||
private db: DbService, | ||
private email: EmailComposer, | ||
private fcm: FcmService, | ||
private launchReview: LaunchReview, | ||
private loading: LoadingController, | ||
private store: InAppPurchase2, | ||
private toast: ToastController) { | ||
this.settings = { | ||
today: 'none', | ||
|
@@ -162,4 +166,62 @@ export class SettingsPage implements OnInit { | |
this.launchReview.launch(); | ||
} | ||
} | ||
|
||
async about() { | ||
const alert = await this.alert.create({ | ||
header: 'ASP For NYC', | ||
message: 'This app was built and designed by Braxton Diggs of Cymbit Creative Studios.<br /><br />For more info and inquiries, email us at <strong>[email protected]</strong>', | ||
buttons: [ | ||
{ | ||
text: 'Dismiss', | ||
role: 'cancel' | ||
}, { | ||
text: 'Contact Us', | ||
handler: () => { | ||
this.email.open({ to: '[email protected]', subject: 'ASP for NYC' }); | ||
} | ||
} | ||
] | ||
}); | ||
|
||
await alert.present(); | ||
} | ||
|
||
async donate() { | ||
const alert = await this.alert.create({ | ||
header: 'Support Development', | ||
message: 'Hello, there! Hundreds of hours have been put into developing and perfecting ASP, so if you use this app quite often, why not considering supporting development.<br /><br />Your support ensures that we can keep up development, keeping the app alive.', | ||
buttons: [ | ||
{ | ||
text: 'No, Thanks', | ||
role: 'cancel' | ||
}, { | ||
text: 'Yes, Please', | ||
handler: () => { | ||
this.store.register({ | ||
id: 'donation_99', | ||
type: this.store.CONSUMABLE, | ||
}); | ||
|
||
this.store.when('donation_99') | ||
.approved(p => p.verify()) | ||
.verified(async (p) => { | ||
p.finish(); | ||
const toast = await this.toast.create({ message: 'Your support is always appreciated!', duration: 10000 }); | ||
toast.present(); | ||
}) | ||
.error(async () => { | ||
const toast = await this.toast.create({ message: 'Something went wrong', duration: 10000 }); | ||
toast.present(); | ||
}); | ||
this.store.refresh(); | ||
|
||
this.store.order('donation_99'); | ||
} | ||
} | ||
] | ||
}); | ||
|
||
await alert.present(); | ||
} | ||
} |