Correct Sentry env value
This commit is contained in:
parent
7fd1aaf925
commit
adb9c7296a
|
|
@ -18,15 +18,12 @@ const String kAppProductionUrl =
|
||||||
'https://staging.invoicing.co'; // TODO remove staging
|
'https://staging.invoicing.co'; // TODO remove staging
|
||||||
const String kAppStagingUrl = 'https://staging.invoicing.co';
|
const String kAppStagingUrl = 'https://staging.invoicing.co';
|
||||||
const String kAppDemoUrl = 'https://demo.invoiceninja.com';
|
const String kAppDemoUrl = 'https://demo.invoiceninja.com';
|
||||||
|
|
||||||
const String kWhiteLabelUrl =
|
const String kWhiteLabelUrl =
|
||||||
'https://app.invoiceninja.com/buy_now/?account_key=AsFmBAeLXF0IKf7tmi0eiyZfmWW9hxMT&product_id=3';
|
'https://app.invoiceninja.com/buy_now/?account_key=AsFmBAeLXF0IKf7tmi0eiyZfmWW9hxMT&product_id=3';
|
||||||
|
|
||||||
const String kAppPlansURL =
|
const String kAppPlansURL =
|
||||||
'https://www.invoiceninja.com/invoicing-pricing-plans/';
|
'https://www.invoiceninja.com/invoicing-pricing-plans/';
|
||||||
const String kPrivacyPolicyURL = 'https://www.invoiceninja.com/privacy-policy';
|
const String kPrivacyPolicyURL = 'https://www.invoiceninja.com/privacy-policy';
|
||||||
const String kTermsOfServiceURL = 'https://www.invoiceninja.com/terms';
|
const String kTermsOfServiceURL = 'https://www.invoiceninja.com/terms';
|
||||||
|
|
||||||
const String kAppleStoreUrl =
|
const String kAppleStoreUrl =
|
||||||
'https://itunes.apple.com/us/app/invoice-ninja/id1435514417?ls=1&mt=8';
|
'https://itunes.apple.com/us/app/invoice-ninja/id1435514417?ls=1&mt=8';
|
||||||
const String kGoogleStoreUrl =
|
const String kGoogleStoreUrl =
|
||||||
|
|
@ -35,6 +32,14 @@ const String kCapterralUrl = 'https://www.capterra.com/p/145215/Invoice-Ninja/';
|
||||||
const String kCronsHelpUrl =
|
const String kCronsHelpUrl =
|
||||||
'https://invoiceninja.github.io/selfhost.html#cron-configuration';
|
'https://invoiceninja.github.io/selfhost.html#cron-configuration';
|
||||||
|
|
||||||
|
enum AppEnvironment {
|
||||||
|
hosted,
|
||||||
|
selfhosted,
|
||||||
|
demo,
|
||||||
|
staging,
|
||||||
|
develop,
|
||||||
|
}
|
||||||
|
|
||||||
const String kSharedPrefs = 'shared_prefs';
|
const String kSharedPrefs = 'shared_prefs';
|
||||||
const String kSharedPrefAppVersion = 'app_version';
|
const String kSharedPrefAppVersion = 'app_version';
|
||||||
const String kSharedPrefEmail = 'email';
|
const String kSharedPrefEmail = 'email';
|
||||||
|
|
|
||||||
|
|
@ -557,18 +557,18 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String get environment {
|
AppEnvironment get environment {
|
||||||
if (isHosted) {
|
if (isHosted) {
|
||||||
final url = cleanApiUrl(authState.url);
|
final url = cleanApiUrl(authState.url);
|
||||||
if (url == kAppDemoUrl) {
|
if (url == kAppDemoUrl) {
|
||||||
return 'demo';
|
return AppEnvironment.demo;
|
||||||
} else if (url == kAppStagingUrl) {
|
} else if (url == kAppStagingUrl) {
|
||||||
return 'staging';
|
return AppEnvironment.staging;
|
||||||
} else {
|
} else {
|
||||||
return 'hosted';
|
return AppEnvironment.hosted;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return 'selfhosted';
|
return AppEnvironment.selfhosted;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue