Crypto iOS
This commit is contained in:
@@ -170,10 +170,12 @@ public class ScannerActivity extends AppCompatActivity implements
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mSearchType == SearchType.CARD) {
|
||||
resetSearchType(SearchType.PHONE_NUMBER, R.drawable.ic_phone, "enter_phone");
|
||||
} else {
|
||||
resetSearchType(SearchType.CARD, R.drawable.ic_card, "enter_manual");
|
||||
if (!"crypto".equals(BuildConfig.FLAVOR)) {
|
||||
if (mSearchType == SearchType.CARD) {
|
||||
resetSearchType(SearchType.PHONE_NUMBER, R.drawable.ic_phone, "enter_phone");
|
||||
} else {
|
||||
resetSearchType(SearchType.CARD, R.drawable.ic_card, "enter_manual");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<string name="confirmation">Сonfirmation</string>
|
||||
<string name="no">No</string>
|
||||
<string name="purchase_complite">A purchase of %s %s was completed</string>
|
||||
<string name="payment_complite">The payment of %s %s was completed</string>
|
||||
<string name="registration">Registration</string>
|
||||
<string name="usage">Usage</string>
|
||||
<string name="support">Support contacts</string>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<string name="confirmation">Confirmacón</string>
|
||||
<string name="no">No</string>
|
||||
<string name="purchase_complite">Compra por %s %s está realizada</string>
|
||||
<string name="payment_complite">The payment of %s %s was completed</string>
|
||||
<string name="registration">Registro</string>
|
||||
<string name="usage">Explotación</string>
|
||||
<string name="support">Contactos del soporte técnico</string>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<string name="confirmation">Подтверждение</string>
|
||||
<string name="no">Нет</string>
|
||||
<string name="purchase_complite">Покупка на сумму %s %s проведена</string>
|
||||
<string name="payment_complite">Оплата на %s %s совершена</string>
|
||||
<string name="registration">Регистрация</string>
|
||||
<string name="usage">Использование</string>
|
||||
<string name="support">Контакты поддержки</string>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<string name="confirmation">Підтвердження</string>
|
||||
<string name="no">Ні</string>
|
||||
<string name="purchase_complite">Купівля на суму %s %s проведена</string>
|
||||
<string name="payment_complite">The payment of %s %s was completed</string>
|
||||
<string name="registration">Реєстрація</string>
|
||||
<string name="usage">Використання</string>
|
||||
<string name="support">Контакти підтримки</string>
|
||||
|
||||
@@ -63,7 +63,18 @@
|
||||
@"appTitle" : @"Autobonus",
|
||||
@"showBonus" : @NO,
|
||||
},
|
||||
@"digital.joys.checker" : @{
|
||||
@"digital.joys.checker.app" : @{
|
||||
@"locale" : @"ru",
|
||||
@"flavor" : @"crypto",
|
||||
@"currency" : @643,
|
||||
@"supportPhone" : @"support@joys.digital",
|
||||
@"supportUrl" : @"https://joys.digital/",
|
||||
@"endPoint" : @"https://pos.api.joys.digital/20130701/",
|
||||
@"appToken" : @"bdea0f3ba9034b688019a7cac753d1209e2b227f",
|
||||
@"appTitle" : @"POSapp Joys",
|
||||
@"showBonus" : @YES,
|
||||
},
|
||||
@"digital.joys.checker.int" : @{
|
||||
@"locale" : @"ru",
|
||||
@"flavor" : @"crypto",
|
||||
@"currency" : @643,
|
||||
@@ -71,7 +82,7 @@
|
||||
@"supportUrl" : @"https://joys.digital/",
|
||||
@"endPoint" : @"https://pos-api-crypto-int.dinect.com/20130701/",
|
||||
@"appToken" : @"bdea0f3ba9034b688019a7cac753d1209e2b227f",
|
||||
@"appTitle" : @"POSapp Joys",
|
||||
@"appTitle" : @"POSapp Joys INT",
|
||||
@"showBonus" : @YES,
|
||||
},
|
||||
@"com.dinect.checker.pip" : @{
|
||||
|
||||
@@ -5,16 +5,11 @@ class Resources {
|
||||
static String getLogo(String app) => 'assets/${app}_logo.png';
|
||||
|
||||
static String getSplash(String app) {
|
||||
if (app == 'autobonus') {
|
||||
return 'assets/${app}_splash.png';
|
||||
} else {
|
||||
return 'assets/dinect_splash.png';
|
||||
}
|
||||
}
|
||||
|
||||
static Color getPrimaryColor(String app) {
|
||||
switch (app) {
|
||||
case 'pip': return new Color(0xff008794);
|
||||
case 'autobonus': return new Color(0xffeb0004);
|
||||
case 'dinect': return new Color(0xff3daee3);
|
||||
case 'crypto': return new Color(0xff0f3d87);
|
||||
@@ -25,13 +20,11 @@ class Resources {
|
||||
|
||||
static Color getButtonColor(String app) {
|
||||
switch (app) {
|
||||
case 'pip': return new Color(0xfff49935);
|
||||
case 'autobonus': return new Color(0xffeb0004);
|
||||
case 'dinect': return new Color(0xff33cc99);
|
||||
case 'crypto': return new Color(0xffffc34d);
|
||||
case 'biohacker': return new Color(0xffff6134);
|
||||
default: return new Color(0xffffffff);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,10 +78,8 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
widgetList.add(getValueWithDescription(StringsLocalization.reward(), loyalty));
|
||||
}
|
||||
|
||||
if (bonus.length > 0) {
|
||||
if (app == 'crypto') {
|
||||
widgetList.add(getValueWithDescription(StringsLocalization.joys(), bonus));
|
||||
} else {
|
||||
if (app != 'crypto') {
|
||||
if (bonus.length > 0) {
|
||||
widgetList.add(getValueWithDescription(StringsLocalization.bonus(), bonus));
|
||||
}
|
||||
}
|
||||
@@ -89,7 +87,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
widgetList.add(getHintLabel());
|
||||
widgetList.add(getInputField()); // Нельзя добавить еще одно поле таким же способом
|
||||
|
||||
if (app != 'autobonus') {
|
||||
if ((app != 'autobonus') || (app != 'crypto')) {
|
||||
|
||||
if (this.loyalityType == 'bonus') {
|
||||
widgetList.add(getBonusInputField());
|
||||
|
||||
@@ -98,9 +98,7 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
}
|
||||
|
||||
if (bonusMinus > 0) {
|
||||
widgetList.add(getValueWithDescription(app == 'crypto'
|
||||
? StringsLocalization.joysMinus()
|
||||
: StringsLocalization.bonusMinus(), bonusMinus.toString()));
|
||||
widgetList.add(getValueWithDescription(StringsLocalization.bonusMinus(), bonusMinus.toString()));
|
||||
}
|
||||
|
||||
if (app != 'autobonus') {
|
||||
@@ -167,7 +165,11 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
|
||||
getMessageTitle() {
|
||||
if (currency != null) {
|
||||
return StringsLocalization.purchaseCompleted(sum, currency);
|
||||
if (app != 'crypto') {
|
||||
return StringsLocalization.paymentCompleted(sum, currency);
|
||||
} else {
|
||||
return StringsLocalization.purchaseCompleted(sum, currency);
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -85,27 +85,27 @@ class StringsLocalization {
|
||||
nominative = nominativeManat();
|
||||
singular = singularManat();
|
||||
plural = pluralManat();
|
||||
break;
|
||||
break;
|
||||
case 051:
|
||||
nominative = nominativeDram();
|
||||
singular = singularDram();
|
||||
plural = pluralDram();
|
||||
break;
|
||||
break;
|
||||
case 417:
|
||||
nominative = nominativeSom();
|
||||
singular = singularSom();
|
||||
plural = pluralSom();
|
||||
break;
|
||||
break;
|
||||
case 498:
|
||||
nominative = nominativeLeu();
|
||||
singular = singularLeu();
|
||||
plural = pluralLeu();
|
||||
break;
|
||||
break;
|
||||
case 972:
|
||||
nominative = nominativeSomoni();
|
||||
singular = singularSomoni();
|
||||
plural = pluralSomoni();
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
return [nominative, singular, plural];
|
||||
@@ -121,6 +121,10 @@ class StringsLocalization {
|
||||
String trimmedVal = val.substring(0, val.length - 3);
|
||||
return sprintf(strings['purchase_complite'], [val, declineCurrency(int.parse(trimmedVal), code)]);
|
||||
}
|
||||
static String paymentCompleted(String val, int code) {
|
||||
String trimmedVal = val.substring(0, val.length - 3);
|
||||
return sprintf(strings['payment_complite'], [val, declineCurrency(int.parse(trimmedVal), code)]);
|
||||
}
|
||||
|
||||
static String registration() => strings['registration'];
|
||||
static String usage() => strings['usage'];
|
||||
@@ -167,12 +171,12 @@ class StringsLocalization {
|
||||
static String ukhryvnia() => strings['uk_hryvnia'];
|
||||
static String kztenge() => strings['kz_tenge'];
|
||||
static String beruble() => strings['be_ruble'];
|
||||
static String uzbsum() => strings['uz_sum'];
|
||||
static String azbman() => strings['az_manat'];
|
||||
static String armdram() => strings['ar_dram'];
|
||||
static String kgssom() => strings['kg_som'];
|
||||
static String mdlleu() => strings['md_leu'];
|
||||
static String tjssomoni() => strings['tj_somoni'];
|
||||
static String uzbsum() => strings['uz_sum'];
|
||||
static String azbman() => strings['az_manat'];
|
||||
static String armdram() => strings['ar_dram'];
|
||||
static String kgssom() => strings['kg_som'];
|
||||
static String mdlleu() => strings['md_leu'];
|
||||
static String tjssomoni() => strings['tj_somoni'];
|
||||
static String nominativeRuble() => strings['nominative_ruble'];
|
||||
static String singularRuble() => strings['singular_ruble'];
|
||||
static String pluralRuble() => strings['plural_ruble'];
|
||||
|
||||
Reference in New Issue
Block a user