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